Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

importing a package which is in different application

 
Sisti Deb
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

Does any one have idea to solve how classes from a different application
can be used when those classes are in a war file instead of a jar file.
I want to use that class in my jsp page.
I was thinking of using c:url tag as it imports resources from other applications but now I am finding its not for importing classes but for jsp pages.
Your suggestions are welcome.

Thanks
Mitali
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any one have idea to solve how classes from a different application
can be used when those classes are in a war file instead of a jar file.

Where in a war file? Where is this war file placed?
Are you trying to say you want to access the class in WEB-INF/classes or classes in a jar in WEB-INF/lib of a different web application packaged as a war file?
 
Srikanth Nutigattu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
....classes from a different application

Seems like you heading into the danger zone of tight coupling
If you really feel that the classes are common across the two applications then package them seperately into a jar file and place it inside the lib folder of the WebServer itself.. It is like a common library and you can reuse them instead of having to import them from another web application.
 
Sisti Deb
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That class which I want to use is in WEB-INF/classes of different Application.
 
Srikanth Nutigattu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you need to move/copy them to WEB-INF of Server rather than the application.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!