Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Precompiled JSP - how to feed Tomcat?

843840Jun 9 2008 — edited Jun 9 2008
I know there are many threads about JSP compilation but all of them are about how you can compile them -
making .java and afterwards .class files out of them works perfectly for me.

But now that I've removed the .jsp files from the deployed project (leaving them there is not an option because our enterprise has too guarantee the integrity of the file), and placed the .class files there it does not work anymore.

Where im stuck at is where do I put these files now?

Normally my application is like this
sample.war
- WEB-INF
 - index.jsp
 - web.xml
 - CLASSES
 - com
  - sample
   xyz.class
  ....
...

- META-INF
Now I just place the .war file into the webapps folder of tomcat and it works. I can now just type "http://localhost:8080/sample/" into my browser
and everything runs fine.

But now that I've compiled the file index.jsp into index.class and removed the index.jsp from the application, it gives me the error +"The requested resource (/sample/) is not available."+.

By default, the index.class files was put into org\apache\jsp so:

I moved it into WEB-INF/classes/org/apache/jsp/index.class - this didnt work.

I moved it into WEB-INF/classes/index.class - this didnt work.

I moved it into WEB-INF/index.class - this didnt work.

So if all those locations are not right, where do I have to put the files then? confused
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2008
Added on Jun 9 2008
6 comments
441 views