aspose file tools*
The moose likes Servlets and the fly likes Trouble accessing a servlet in a jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Trouble accessing a servlet in a jar file" Watch "Trouble accessing a servlet in a jar file" New topic
Author

Trouble accessing a servlet in a jar file

Yan Lee
Ranch Hand

Joined: Sep 15, 2003
Posts: 94
Hi,
I have written utility that can be used in various applications (utility.jar). It is servlet driven(like struts).

I also wrote a web app to ensure the utility.jar can be practically used.
The utility.jar is in the WEB-INF/lib of the web-app. The web.xml has a <servlet> and <servlet-mapping> that points to the servlet in utility.jar.

However, the web app is not able to locate the servlet in utility.jar. I have checked to ensure that the servlet mapping is ok by pointing the <servlet-mapping> towards another servlet in the web-app and it seems to locate it.

For some reason, it is not able to locate the servlet in the utility.jar. Is there something specific that I need to do when packaging my utility.jar so that the servelt class inside it can be located?

Thanks for the help.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Is your servlet class packaged?
Are you listing the fully qualified (package/class) in the servlet-class node of you web.xml?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble accessing a servlet in a jar file