How to run a simple jsp page in tomcat???



Share on Google+Share on Google+

How to run a simple jsp page in tomcat???
2 Answer(s)      7 years 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


description The server encountered an internal error () that prevented it from fulfilling this request.


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( org.apache.jasper.compiler.ErrorDispatcher.javacError( org.apache.jasper.compiler.JDTCompiler.generateClass( org.apache.jasper.compiler.Compiler.compile( org.apache.jasper.compiler.Compiler.compile( org.apache.jasper.compiler.Compiler.compile( org.apache.jasper.JspCompilationContext.compile( org.apache.jasper.servlet.JspServletWrapper.service( org.apache.jasper.servlet.JspServlet.serviceJspFile( org.apache.jasper.servlet.JspServlet.service( javax.servlet.http.HttpServlet.service(

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.


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.



Advertisement null