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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How to reuse war file" Watch "How to reuse war file" New topic

How to reuse war file

gunjan deogam

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.

gunjan deogam

Joined: Aug 02, 2009
Posts: 11

thanks Rohan.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62123

This sounds like a typical source control and build issue.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: How to reuse war file