*
The moose likes IDEs, Version Control and other tools and the fly likes Unable to run dynamic project - File(JAP) not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to run dynamic project - File(JAP) not found" Watch "Unable to run dynamic project - File(JAP) not found" New topic
Author

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

Deepan Ignatius
Ranch Hand

Joined: Mar 29, 2010
Posts: 41
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

Joined: Mar 29, 2010
Posts: 41
sorry and thanks.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

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.


JBoss In Action
Deepan Ignatius
Ranch Hand

Joined: Mar 29, 2010
Posts: 41
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

Joined: May 14, 2008
Posts: 5779
    
    7

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

Joined: Mar 29, 2010
Posts: 41
Thanks for the solution. Moved main.jsp out of WEB-INF.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to run dynamic project - File(JAP) not found
 
Similar Threads
Query on Custom Tags
Form Being Rendered Outside of the Page
File is Not Displaying
[struts2] [sitemesh] [i8N] its not decorate anymore
How to pass attribute to a custom tag only if it evaluates to a non null value