wood burning stoves*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes When JSP page is compiled? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "When JSP page is compiled?" Watch "When JSP page is compiled?" New topic
Author

When JSP page is compiled?

Varun Garg
Greenhorn

Joined: Jul 30, 2008
Posts: 16
Hello,

I want to know when the JSP pages are compiled? When we save them or when they are accessed.

Actually, i created a JSP page and later i made some modification, but i am not getting the updated page in the browser. I think the automatically created servlet class is not getting updated.

Please help me out.


Regards,<br />Varun garg<br />MS in Computer Science<br />SCJP - 1.4 @ 91 %
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

A caching issue perhaps?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Varun Garg
Greenhorn

Joined: Jul 30, 2008
Posts: 16
Some times i get the old result and sometimes the follwoing error :-

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: 12 in the jsp file: /CounterDisplay.jsp
Counter cannot be resolved
9: <body>
10:
11: Count is :
12: <% out.println(Counter.getCount()); %>
13: </body>
14: </html>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Sounds like a problem in your JSP.
sharad sinha
Greenhorn

Joined: Jul 13, 2008
Posts: 26
Although your JSP has errors which needs to be corrected. But the following line makes it confusing

Some times i get the old result and sometimes the follwoing error :-

The problem should be reported consistently by the container. Try clearing the tomcat cache. I think It should be at work/Catalina/


Thanks, Sharad<br />SCJP 5 (July, 2008)
 
jQuery in Action, 2nd edition
 
subject: When JSP page is compiled?
 
Similar Threads
Are JSPs really Servlets ?
Ajax call problem
HTTP 404
Which three occur during JSP page translationf
JSP page display problem