You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Cressatti, Dominique" <Do...@lansa.co.uk> on 2002/01/17 11:06:11 UTC

executing servlet in a jar file

Hi,
 
am trying to execute a servlet within a jar file.
I gathered so far that I had to copy the jar file in ./WEB-INF/lib
 
As an alternative I've extracted the content of that jar file an
put the classes under ./WEB-INF/classes.
The problem is that the servlet I want to execute is buried within
several subdirectories and when extracted it looked like something like:
 
MyWebapp/subdirectory1/subdirectory2/subdirectory3/servlet1.class
 
Like I said I copied all the servlets under /subdirectory3 into ./WEB-INF/classes
but when tried to run it manually ( http://localhost:8080/MyWebapp/servlet/servlet1)
it can up with a error mentioning the above directory structure so I gathered
the servlets object to move out the directory structure.
I then moved all the above directory structure back (including moving back the servlets under
/directory3) under ./WEB-INF/classes but when I tried to run again it just wouldn't find my
servlet (resource ....is not available).
 
So how do I run the servlet manually ((like http://localhost:8080/MyWebapp/servlet/servlet1)
using the jar file or how organise my directories so my servlet work when extracted under ./WEB-INF/classes ?

 
Thanks
Dom