Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet How to run a simple jsp page in tomcat???

Have Programming Question? Ask it here!
 
 
 


sthitaprajna
How to run a simple jsp page in tomcat???
2 Answer(s)      3 years and 9 months ago
Posted in : JSP-Servlet


i am trying to run a simple jsp page in tomcat,i am having web.xml also in WEB-INF folder. but it is giving me this error below....please help me to solve it.

my jsp page code is given below and its in webapps/pintu/pintu.jsp

Hello<%=new String("world!") %>

and then i tried in browser http://localhost:8080/pintu/pintu.jsp

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: 22 in the generated java file The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

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:423) org.apache.jasper.compiler.Compiler.compile(Compiler.java:317) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:282) 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:810)


Advertisement
View Answers

October 29, 2010 at 3:40 PM


Hello Friend,

Have you set the class path of your apache tomcat? It seems that problem might be there.

Thanks



October 29, 2010 at 4:47 PM


yes...i did. i.e

SET CLASSPATH=.;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar

using this ,i am able to run all servlet programs but not .jsp files.



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com