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

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.









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?
Unable to run the jsp page - JSP-Servlet
how to run jsp appication in eclipse
how to run a vlc player in jsp
how to run a .exe file in jsp
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?
How to Create 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
How Run JSP in Apache TomCat Server? - JSP-Servlet
extract data fom table when a button is clicked in front end page using mysql5.0 and tomcat6.0
How to run JSP program in Tomcat server step by step?
How to make first JSP page?
how to create web page on jsp?
How to make first JSP page?
Integrate tomcat5.5 and JWSDP2.0
Run a simple EJB code
Run a simple EJB code
how to set time in jsp page
How To Include Two Jsp page in another jsp page?
how to redirect jsp page to extjs
run jsp file
Simple JSP program example
How to use Jquery in jsp page
How to pass parametes from JSP page to HTML page? - JSP-Servlet
how to generate captcha in jsp page ? - JSP-Servlet
How to use 'for' loop in jsp page?
how to give link from jsp to jsp page
how to give link from jsp to jsp page
Apache Tomcat6.0
How to use 'if' statement in jsp page?
JSP handle run-time exceptions
JSP run problem
Simple JSP program
how to access JQuery array in jsp page?
How to save run time created text-file on a disk using jsp/servlet?
Tomcat5.5 - Java Beginners
Easily create JSP page
how to get data in jsp page - Framework
How to use an object properties in jsp page

Ads