cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet not getting loaded when put in a jar file

Former Member
0 Kudos

Hi,

I have a servlet which i put in a jar file and placed in WEB-INF/lib directory of my war. After deploying the ear file when i call the servlet, it says class not found. The same servlet is working fine when i keep the class file in web-inf/classes or web-inf/bin directory. Do WAS not support servlet loading from jar file in lib directory? is it mandatory that the class file needs be placed??

regards,

Sujesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Sujesh,

Your deployment descriptor i.e. web.xml has a tag <servlet-class> which contains the fully qualified class name of your servlet.

This class needs to be located in the WEB-INF/classes directory.

Any auxiliary library JAR files must be stored in the WEB-INF/lib directory.

Regards,

Amol

Former Member
0 Kudos

Yes. All those configurations are correct, except that i want to put the servlet class in a jar file and to be placed in WEB-INF/lib directory. in this case it doesn't load the servlet

Former Member
0 Kudos

Are you using NWDS for deployment ?

regards

rajesh