Java - Problem in deploying Web Application

Posted by Yatendra Goel on Stack Overflow See other posts from Stack Overflow or by Yatendra Goel
Published on 2010-03-16T06:27:16Z Indexed on 2010/03/16 6:36 UTC
Read the original article Hit count: 281

Filed under:
|

I have built a Java Web Application and packed it in a .war file and tested it on my local tomcat server and it is running fine.

But when I deployed it on my client's server, it is showing an error. According to the remote server (my client's server), it is not finding a tld file packed in a jar file which I had placed in WEB-INF/lib directory. But when I checked the WEB-INF/lib directory for the jar file, i found that it was there.

The contents of META-INF/MANIFEST.MF is as follows:

Manifest-Version: 1.0
Class-Path:

I think that there is no need to explicitly mention the classpath of WEB-INF/lib directory as it is in the classpath of any web application by default.

Then, why the server can't find the jar file in the lib directory when I deployed it on a remote server and why it is working when I deployed the same application on my local server.

I posted a question for this at http://stackoverflow.com/questions/2441254/struts-1-struts-taglib-jar-is-not-being-found-by-my-web-application but found that the problem is unusual as nobody could answer it.

So my questions are as follows:

Q1. Is WEB-INF/lib still remains on the classpath if I leave the classpath entry blank as shown above in the MANIFEST.MF file or I should delete the classpath entry completely from the file or I should explicitly enter Class-Path: /WEB-INF/lib as the classpath entry?

Q2. I have JSP pages, Servlets and some helper classes in the web application. Jsp pages are located at the root. Servlets and helper classes are located in WEB-INF/classes folder. So Is there any problem if my helper classes are located in the WEB-INF/classes folder?

Note: Please note that this question is not same as my previous question. It is a follow-up question of my previous question.

Both the servers (local and remote) are tomcat servers.

© Stack Overflow or respective owner

Related posts about java

Related posts about web-applications