my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How to reuse war file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How to reuse war file" Watch "How to reuse war file" New topic
Author

How to reuse war file

gunjan deogam
Greenhorn

Joined: Aug 02, 2009
Posts: 11

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.


Gunjan Deogam SCJP6, SCWCD5
Rohan kanade
Ranch Hand

Joined: Oct 22, 2009
Posts: 106
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.


SCJP 1.6 ,SCWCD 5
gunjan deogam
Greenhorn

Joined: Aug 02, 2009
Posts: 11

thanks Rohan.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

This sounds like a typical source control and build issue.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: How to reuse war file