Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to reuse war file

 
gunjan deogam
Greenhorn
Posts: 11
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we have a fully loaded war file and we want to use some tag define inside that war file, then how can we reuse tld, tag, or classes define inside that war file to our new web application.
 
Rohan kanade
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for classes, you can get the context of the application in your war file and then dispatch requests or include content from the war file.

As far as tags go, you can simply take the jar files of the tag libraries and copy them in your new web applications WEB-INF/lib directory. This will allow you to use the tags again by just using the <@taglib %> directive or the using xml namespaces.
 
gunjan deogam
Greenhorn
Posts: 11
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Rohan.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65660
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds like a typical source control and build issue.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!