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

Ads
 

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

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)

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.

Ads









Related Tutorials/Questions & Answers:
How to run a simple jsp page in tomcat???
How to run our application after deploying .war file in tomcat6.0
Advertisements
How to run our application after deploying .war file in tomcat6.0
How to Register Custom MBeans in Tomcat5.5
How to compile and run the JSP
How to run JSP program inEclipse?
how to run a vlc player in jsp
how to run a .exe file in jsp
how to run jsp appication in eclipse
how to run jdbc in jsp program - JSP-Servlet
how to deploy and run jsp - JSP-Servlet
how to run servlet - JSP-Servlet
how to pass variable from simple java main class(not servlet) to the jsp page?
Unable to run the jsp page - JSP-Servlet
Run a simple EJB code
Run a simple EJB code
How Run JSP in Apache TomCat Server? - JSP-Servlet
How to Create JSP Page
How to run JSP program in Tomcat server step by step?
How to make first JSP page?
extract data fom table when a button is clicked in front end page using mysql5.0 and tomcat6.0
Integrate tomcat5.5 and JWSDP2.0
how to create web page on jsp?
How to make first JSP page?
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page
Simple JSP program example
how to set time in jsp page
how to run this program?

Ads