- This topic has 2 replies, 3 voices, and was last updated 20 years, 7 months ago by Scott Anderson.
-
AuthorPosts
-
datapowerMemberMy environment: MyEclipse 3.8 Eclipse3.0 WLS7 SP5
I followed the tutorial for “Web development” and created the HelloWorld.java and the jsp in the src directory.
MyEclipse did generate an almost empty web.xml which I edited to have the following final web.xml in my WebRoot/WEB-INF directory
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<jsp-file>src/HelloWorld.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>hello</url-pattern>
</servlet-mapping>
<session-config> <session-timeout>5</session-timeout></session-config></web-app>
=============================================
When deploying the packaged result in WLS 7 SP5 I get the following
error:
<Jun 30, 2004 3:42:49 AM EDT> <Notice> <WebLogicServer> <000365> <Server state changed to RUNNING>
<Jun 30, 2004 3:42:49 AM EDT> <Notice> <WebLogicServer> <000360> <Server started in RUNNING mode>
<Jun 30, 2004 3:47:01 AM EDT> <Error> <HTTP> <101019> <[ServletContext(id=16693793,name=HelloWorld,context-path=/HelloWorld)] Servlet failed with IOException
weblogic.servlet.jsp.JspFileNotFoundException: Requested JSP source file ‘/src/HelloWorld.jsp’ no longer exists
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:191)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:165)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:553)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:377)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:319)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5626)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3213)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2555)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:251)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:219)
>
==============================================
1) is there a way to have MyEclipse automatically/wizardly generate the web.xml?
2) Why WLS does not see my jsp?Thank you
Riyad KallaMember1) Not currently, but as you add Servlet classes and use the File > New > Other… > J2EE > Web > Servlet template, you have the option to configure and add the new servlet to the web.xml file for you.
2) Try doing a packaged deployment and see if that fixes the problem.
Scott AndersonParticipant1) Another option is that you can automatically generate the web.xml file using our XDoclet support
2) Most likely because it’s in your src folder, not under a web project’s web root which should be outside your Java src hierarchy. -
AuthorPosts