| Author |
Oracle 10G Application Server : Getting Servlet error
|
Pavan Kat
Greenhorn
Joined: Mar 24, 2008
Posts: 3
|
|
Hi, When I am trying to execute the JSP after deploying the same as war file in Oracle 10G Application server, I am getting the following exception. I am not sure why this sample jsp is not compiling and giving this classnot found exception. Exception is: -------------------------------- SampleJSP: Servlet error javax.servlet.ServletException: java.lang.ClassNotFoundException: _Sample__Hello at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:323) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
Pavan, Welcome to JavaRanch! What package is that class in? Can you show your import?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Pavan Kat
Greenhorn
Joined: Mar 24, 2008
Posts: 3
|
|
Hi Thanks for reply.. My JSP files are giving that error. So I tried to deploy a simple JSP file <html> <head><title>Hello World JSP Example</title></head> <body> <h1>Hello World</h1> It is <%= new java.util.Date().toString() %> and is a beautiful Spring day. </body></html> This simple JSP is working fine, If I run through Tomcat. My web.xml file which is (WEB-INF folder is ) <?xml version = '1.0' encoding = 'UTF-8'?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <description>web.xml file for Web Application</description> <distributable /> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file> Logi_Index.jsp </welcome-file> </welcome-file-list> </web-app>
|
 |
Pavan Kat
Greenhorn
Joined: Mar 24, 2008
Posts: 3
|
|
Hi I could figure out the problem. For Oracle AS, we need to include the folloiwng in web.xml file. Now every thing is working fine for me. <servlet> <servlet-name>jsp</servlet-name> <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class> <init-param> <param-name>check_page_scope</param-name> <param-value>false</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> Thanks
|
 |
 |
|
|
subject: Oracle 10G Application Server : Getting Servlet error
|
|
|