Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jasper exception (tomcat)

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
Hi all, I encountered the following error when I tried to transfer control from a servlet to displayCMR1.jsp

up to now, i belive the following should be ok: displayCMR1.jsp, servlet, and dispatch path.
could be it due to the lack of certain jar?

any kind soul, pls advise what could be the cause.


the statment I'd used is

getServletContext().getRequestDispatcher("/DisplayCMR1.jsp").forward(request, response);

=======the error message is=========================
A Servlet Exception Has Occurred

org.apache.jasper.JasperException: Unable to compile class for JSPimport javax.servlet.*;
^
public class DisplayCMR1$jsp extends HttpJspBase {
^

 
Looks to me as if DisplayCMR1.jsp threw compilation errors. I would check there first. A good ideal would be to dispatch to a plain JSP that you know works (Hello World or Something). Then you will know for sure if the Servlet or Dispatcher is working correctly.
 
Please use
getServletConfig().getServletContext().getRequestDispatcher(request, response);
instead of
getServletContext().getRequestDispatcher("/DisplayCMR1.jsp").forward(request, response);

I am not sure but you can test it by yourself!


IPO_z@cmmail.com
Garbage in,Garbage out
 
Jasper will create .java files in tomcat's work directory. Look for a .java file which is named similiar to your .jsp file. This generated java source will make finding errors much easier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top