aspose file tools*
The moose likes JSP and the fly likes Error accessing jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Error accessing jsp page" Watch "Error accessing jsp page" New topic
Author

Error accessing jsp page

Deepan Ignatius
Ranch Hand

Joined: Mar 29, 2010
Posts: 41
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

Joined: Sep 08, 2007
Posts: 3071
    
  33

Did you restart the Server after the changes to the class file? You could try that.


Mohamed Sanaulla | My Blog
Deepan Ignatius
Ranch Hand

Joined: Mar 29, 2010
Posts: 41
yes restarted. but issue is still present

correct jsp code

Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Deepan Ignatius wrote:yes restarted. but issue is still present

correct jsp code



You got it working?
Ilari Moilanen
Ranch Hand

Joined: Apr 15, 2008
Posts: 198
Not sure if this is the issue but change your ” characters to quotation characters i.e "
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error accessing jsp page