• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Classpath issue for JSP

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This link helped: http://stackoverflow.com/questions/5467038/adding-3rd-party-jars-to-web-inf-lib-automatically-using-eclipse-tomcat

Problem solved. Thanks
 
My cellmate was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic