• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Classpath issue for JSP

 
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
Boost this thread!