• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classpath issue for JSP

 
tarun mall
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

Our application structure is like, we have 5 web projects and a project for Jars. All the jars which are required to any project, we keep those jars in Jars-Project and then add them in classpath.
Now the problem is I have to integrate a third party utility in my application. They provided few jars required by there project and a folder containing files, css, scripts and images for JSP. When I put all the jars in WEB-INF/lib and call the JSP it is working fine. But when I put all the jars in Jars-Project and include them in class path, its finding none of them. The problem with putting in lib is, there are many jars which are already in our Jar-Project. I dont want to keep them at two places and cause redundancy.

I think I didn't understand the concept of WEB-INF/lib completely. What I think is whenever we put all jars in WEB-INF/lib eclipse adds them to the buildpath of the project. So in case if we add them directly to build-path it should work.
 
tarun mall
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are my findings by googling.

Whenever we create WAR it includes all the classes in the project in WEB-INF/classes and hence JSP is able to find it. But it doesn't copy the classes in jars to WEB-INF/classes and hence my JSP is not able to find the classes inside JAR. So somehow I need to add somewhere a configuration that copies classes in JAR(from classpath) to WEB-INF/classes or includes JAR directly to WEB-INF/lib.
 
tarun mall
Greenhorn
Posts: 13
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic