Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9160629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:47:00+00:00 2026-06-17T13:47:00+00:00

While trying to run a jsp page I get the following exceptions : HTTP

  • 0

While trying to run a jsp page I get the following exceptions :

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it 
from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 17 in the generated java file
Syntax error on token ";", delete this token

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:644)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.22 logs.

Seeing these exceptions I unable to reach the root cause of it. Can anyone help me with it. My IDE doesn’t show any red-marks that could indicate , that I am trying to compile a jsp that has errors. Instead it shows no signs of it.

Note: Also I do not see the generated Java file, as the exception says

JSP Code:

<%-- 
Document   : index
Created on : Dec 8, 2012, 10:55:43 AM
Author     : user
--%>

<%@page import="internet.CommunicationWithServer.PingTheServer"%>
<%@page import="java.util.GregorianCalendar"%>
<%@page import="internet.CommunicationWithServer.SendNodeInfo"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="internet.HelperClasses.*;" %>
<%@page import="General.HelperClasses.*;" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Client Nappster</title>
    <style type="text/css">
        @import url("css/index_css.css");
    </style>
</head>
<body bgcolor="#000000">
<center> <h2 id="Head">Client Nappster</h2> </center>

<center> <h4 id="Head"><%= new GregorianCalendar().getTime().toString() %></h4> </center>

<%-- Call a method that checks for the internet connection --%>
<%! 
   boolean isConnectionAvailable;
   String networkIP;
%>
<% if(request.getAttribute("File-Sharing-Status") != null && ((Boolean)request.getAttribute("File-Sharing-Status")) == true) {%>
<script type="text/javascript"> alert("Success ! File shared with the nappster server"); </script>
<%}%>
<%
    isConnectionAvailable = new CheckConnection().checkConnection();
    if(isConnectionAvailable) {
        // send a message,the app is conneted to the nappster central server
        System.out.println("returned true");
        // call a method that sends the client's IP address to the nappster central server
        networkIP = new ClientAddress().getNetworkIP();
        // send to the server the address and the name of the node online
        boolean informationSent = new SendNodeInfo().sendInfo(networkIP);
        // call a method that starts a thread that after certain intervals checks if the node is still connected 
        // to the internet
        new PingTheServer().startPingThread();
        // make a 'Shared' Directory
        boolean directoryMade = new DirectoryMaker().makeDirectory(request.getServletContext().getRealPath("/"), "Shared");
        if(directoryMade == false) {
            //Warning : Unable to make a directory | Directory already exists
            System.out.println("Unable to create the 'Shared' directory | or directory already exists");
        }
    } else {
        // send an error message,unable to connect the app to the napster cental server
        System.out.println("returned false");
    }
%>

<jsp:include page="EmbeddedJSP/form_table.jsp" />

</body>

EmbeddedJSP/form_table.jsp:

    <%@page import="internet.CommunicationWithServer.QueryConnectedNodes"%>
    <%@page import="java.io.File"%>
    <%@page import="java.io.FileReader"%>
    <%@page import="java.io.BufferedReader"%>
    <%@page import="java.util.Iterator"%>
    <%@page import="java.util.ArrayList"%>
    <%@page import="General.HelperClasses.Stashed"%>
    <%@page import="internet.CommunicationWithServer.QueryFileNames"%>

    <%! String fileSharingStatusString; 
        Boolean fileSharingStatus;
        String nodesConnected;
        boolean ncStashed;
    %>

    <% BufferedReader sharingStatusReader = new BufferedReader(new FileReader(request.getServletContext().getRealPath("/") + Constants.FilePaths.fstPath));
   while((fileSharingStatusString = sharingStatusReader.readLine()) != null) {
       fileSharingStatus = new Boolean(fileSharingStatusString.trim());
   }
    %>

   <% if(new File(request.getServletContext().getRealPath("/") + Constants.FilePaths.nlPath).exists())
        ncStashed = true;
   %>

   <table width="100%" border="+3" id="Table_border_color">
    <tr>
        <th id="Nodes_Connected_Heading"> Nodes Connected </th>
        <th id="Files_to_be_shared_heading"> Select a File to share  </th>
        <th id="Files_shared_heading"> Files Shared  </th>
    </tr>

    <tr>
        <td width="20%" id="List_of_nodes_connected"> List <br />
            <%-- Get the list of all the nodes connected to the nappster server --%>
            <% if(new QueryConnectedNodes().getConnectedNodes() && ncStashed) {
                BufferedReader nodesConnectedReader = new BufferedReader(new FileReader(Constants.FilePaths.nlPath));
                String line;
                while((line = nodesConnectedReader.readLine()) != null) {
            %>
                    <%= line %>
            <%  } // end of while loop
              } // end of if block 
                  else {
            %>
            <em>No node connected to the nappster server !</em>
            <%}%>
        </td>
        <td width="60%" valign="top" align="center">  
            <form method="post" action="SendTheFileName" enctype="multipart/form-data">
                <div id="Files_to_be_shared"> 
                      <input type="file" id="File" name="FileTag" />
                      <input type="submit" value="Share" /> 
                    </div>
            </form>
        </td>

        <td id="List_of_files_shared">
            List of files shared. <br />
            <%-- check if the user has shared any file --%>
            <% if(fileSharingStatus.booleanValue()) {
                    // if true, get the name of the files
                    boolean requestSent = new QueryFileNames().getFileNames();
                    if(requestSent) {
                        BufferedReader reader = new BufferedReader(new FileReader(request.getServletContext().getRealPath("/") + Constants.FilePaths.fsPath));
                        String line;
                        while((line = reader.readLine()) != null) {
             %>
                            <%= line %>
                            <br />

            <%
                        }
                    }                        
            } else {
            %>                
                <em>No file has been shared till now !</em>
                 <%}%>
        </td>
    </tr>
</table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:47:02+00:00Added an answer on June 17, 2026 at 1:47 pm

    Remove the semicolons :

    <%@page import="internet.HelperClasses.*;" %>
    <%@page import="General.HelperClasses.*;" %>
    

    to

    <%@page import="internet.HelperClasses.*" %>
    <%@page import="General.HelperClasses.*" %>
    

    In the generated java file the above snippet would be :

    import internet.HelperClasses.*;;
    import General.HelperClasses.*;;
    

    You see, it will generate an error !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to JSP. I'm trying to run JSP page in TOMCAT server. Following
I am getting following exception while I am trying to run a basic JSF
I was following Azure Tutorial and found error while trying to run the Azure
i am experiencing following error while trying to run application on heroku 2011-06-03T11:24:25-07:00 heroku[nginx]:
{Configuration system failed to initialize} i get this error while trying to run a
I am getting the following exception when trying to run my jar through java
I' getting the following error while trying to run my application from oauth2client.appengine import
I get a Name error while trying to run my project, urls.py import os
While trying to run my application I'm getting this error. Sys.WebForms.PageRequestManagerServerErrorException:500 How can i
I have to upload a file ,while iam trying to run showing the message

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.