• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error accessing jsp page

 
Deepan Ignatius
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

I am trying to execute the first example given in our very own "HFSJ" book regarding JSP.

Problem Description:

Java file:


complies with out any issues

and the jsp file



When trying to access the jsp file, it is showing an error page with the below message

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: 5 in the jsp file: /BasicCounter.jsp
Counter cannot be resolved
2: <body>
3: The page count is:
4: <%
5: out.println(Counter.getCount());
6: %>
7: </body>
8: </html>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Software Details:

Server - Apache Tomcat Ver 6
JDK - 1.5

What could be the possible reason for this?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you restart the Server after the changes to the class file? You could try that.
 
Deepan Ignatius
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes restarted. but issue is still present

correct jsp code

 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepan Ignatius wrote:yes restarted. but issue is still present

correct jsp code



You got it working?
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this is the issue but change your ” characters to quotation characters i.e "
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic