Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to run dynamic project - File(JAP) not found

 
Deepan Ignatius
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to create a dynamic web project using sitemesh, struts2, hibernate, tomcat6.0 in eclipse galileo.

After creating and executing it, I am getting the below error:

SEVERE: Servlet.service() for servlet default threw exception
java.lang.RuntimeException: javax.servlet.ServletException: File "/sitemesh/main.jsp" not found
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:39)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:595)

Showing like my main.jsp is not found.

What could be the reaon for this error?

main.jsp for your reference



I have included jsp-api-2.2.jar, servlet-api-2.3.jar, sitemesh-2.4.1.jar and other jars as part of the build path and still getting this error.

 
Deepan Ignatius
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry and thanks.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might not be an Eclipse issue, but rather a simple issue of not creating the WAR correctly.

1) Please tell use the full URL you used to access the JSP.

2) Post the web.xml

3) Post the contents of the WAR. If it was deployed as a file, use "jar -ft xxx.war". If it was deployed as an exploded directory, you will have to use an OS-specific command to get the full contents. (If you don't know hoe, tell us which OS you are using.)

4) It appears that you are using OpenSymphony, please post any configuration files related to main.jsp.

The error message is from OpenSymphony and essentially means that OpenSymphony cannot find main.jsp in that location within the WAR file.
 
Deepan Ignatius
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Please tell use the full URL you used to access the JSP.

http://localhost:8881/Events/WEB-INF/sitemesh/main.jsp
2) Post the web.xml




3) Post the contents of the WAR. If it was deployed as a file, use "jar -ft xxx.war". If it was deployed as an exploded directory, you will have to use an OS-specific command to get the full contents. (If you don't know hoe, tell us which OS you are using.)

META-INF/MANIFEST.MF
META-INF/
WEB-INF/
WEB-INF/classes/
WEB-INF/New Folder/
WEB-INF/applicationContext.xml
WEB-INF/assets/
WEB-INF/assets/Thumbs.db
WEB-INF/assets/alpha-b.png
WEB-INF/assets/alpha-w.png
WEB-INF/assets/bg.jpg
WEB-INF/assets/styles.css
WEB-INF/decorators.xml
WEB-INF/lib/
WEB-INF/lib/commons-fileupload-1.2.1.jar
WEB-INF/lib/jsp-api-2.2.jar
WEB-INF/lib/jstl-1.2.jar
WEB-INF/lib/servlet-api-2.3.jar
WEB-INF/lib/sitemesh-2.4.1.jar
WEB-INF/sitemesh/
WEB-INF/sitemesh/main.jsp
WEB-INF/web.xml
index.html

OS: Windows XP

4) It appears that you are using OpenSymphony, please post any configuration files related to main.jsp.

decoratos.xml:



applicationContext.xml:



Please let me know if you need any other information.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is not a workable URL - Tomcat will not serve any files in the WEB-INF directory. You need to move main.jsp out of WEB-INF. Actually, all of WEB-INF/sitemesh/* should be at sitemesh/*
 
Deepan Ignatius
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the solution. Moved main.jsp out of WEB-INF.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic