Where can I deploy my application's war file?
Meghana Shah <mdalal_78 <at> yahoo.com>
2004-02-03 08:20:21 GMT
Actually we are facing a problem in Jetty server, like when we restart our
server all jsp files recompiles into classes and we want to stop the
recompilation problem. To solve that, I am trying to use precompiled jsp
files and then use that jsp files' classes as servlet and then we have to
map that servlet in web.xml.
To do this I am doing the following steps:
I am using Jetty4.2.2 and j2sdk1.4
Now my example application is EmailFinder.It contains two directories
"jsp" and "WEB_INF".
Next jsp directory contains all .jsp
files-email.jsp,lookup.jsp,lookupresponse.jsp,delete.jsp,deleteresponse.jsp,error.jsp.
And WEB-INF dir contains "classes" directory and web.xml file. Again
classes directory contains "email" dir and all jsp's servlet classes, for
ex. email_jsp.class,lookup_jsp.class,etc; and email directory contains
Map.class bean. The classes like email_jsp.class in the WEB-INF/classes
folder are all precompiled jsp files' servlet classes.
Next I update my web.xml file to add servlet mapping for all the servlets,
for ex. for email.jsp file:
<servlet>
<servlet-name>email</servlet-name>
<servlet-class>email_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>email</servlet-name>
<url-pattern>email.jsp</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>email.jsp</welcome-file>
</welcome-file-list>
Then I am creating EmailFinder.war file. For that, I am in the directory
Jetty-4.2.2/webapps/EmailFinder. And then I give command like "jar cvf
EmailFinder.war jsp WEB-INF". I put this EmailFinder.war file in the
Jetty-4.2.2/webapps directory. And then I am changing my xml configuration
file, antispam.xml, to add context for the EmailFinder application. For
ex,
<Call name="addWebApplication">
<Arg>/EmailFinder</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/EmailFinder.war</Arg>
<Set name="extractWAR">true</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
default="."/>/webapps/EmailFinder/WEB-INF/web.xml</Set>
</Call>
Next I delete the EmailFinder folder from /webapps folder.
Then I start Jetty server using the following command:
Jetty-4.2.2/bin> jetty.sh start ../etc/antispam.xml
Now the problem is that, my EmailFinder folder doesn't expand in the
/webapps directory, but it expands in default /tmp directory as
/tmp/Jetty_8080_EmailFinder/webapp/"jsp and WEB-INF".
And I am not able to run my application.
So what to do? please reply me the solution as soon as possible.
Thanks in advance.
Meghana Shah
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Jetty-support mailing list
Jetty-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support