aspose file tools*
The moose likes Tomcat and the fly likes Deploying precompiled JSPs... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deploying precompiled JSPs..." Watch "Deploying precompiled JSPs..." New topic
Author

Deploying precompiled JSPs...

Enid JP
Greenhorn

Joined: Dec 30, 2003
Posts: 1
Hi,
I have precompiled my JSPs using the pre-compile option in the browser.(For
eg http://localhost:8080/Myapp/addCustomer.jsp?pre-compile)
I get the java and class files for each of the JSPs. These files are placed
in the work folder of Tomcat(ie
\jakarta-tomcat-5.0.16\work\Catalina\localhost\Myapp\org\apache\jsp).
If I want to deploy the web application as a WAR file (without the JSPs),
where should I place the .class files of the JSPs?
I have made entries in web.xml as shown below for each of the JSP files .
But , I get a 404 error when I try to access the
JSP(http://localhost:8080/Myapp/addCustomer.jsp).
<servlet>
<servlet-name>addCustomer_jsp</servlet-name>
<servlet-class>/Myapp/addCustomer_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addCustomer_jsp</servlet-name>
<url-pattern>/Myapp/addCustomer.jsp</url-pattern>
</servlet-mapping>

It is not a must that I deploy it as a WAR file. But, where should I place
the precompiled JSPs so that I can access them from a browser? I am working
on Tomcat 5.
Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Welcome to the Ranch, ink!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks!
bear
JSP Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

And since this is Tomcat-specific, I'm going to move this along to the Tomcat forum for you.
bear
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Deploying precompiled JSPs...
 
Similar Threads
Redirection not working in QA
Tomcat on Linux tutorial
trouble loading servlet class on Tomcat4.1.24
Servlet Mapping doesn't work in Tomcat 5.5
Servlet Not working