aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How to call external  WAR file in J2EE Project using WSAD 5.1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to call external  WAR file in J2EE Project using WSAD 5.1.1" Watch "How to call external  WAR file in J2EE Project using WSAD 5.1.1" New topic
Author

How to call external WAR file in J2EE Project using WSAD 5.1.1

Ramesh Krishna
Greenhorn

Joined: May 17, 2004
Posts: 25
Hi Guys,

I am Using WSAD 5.1.1 ,J2EE Project(Struts based application). I am developing J2EE Appication. In This application i want to reuse some other application war file(external war file).

*)what are the ways to use that war file in my present application.

*)Import the war file into present webmodule. Its working fine .But I want different way like it should not mix with this web module files

Is there any way plz suggest me
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Ramesh,
A J2EE app can have mutliple web modules. So you can use the existing web project and include it in your enterprise application project.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ramesh Krishna
Greenhorn

Joined: May 17, 2004
Posts: 25
Hi Boyarsky,
Thanks for ur reply.
The thing is ...how to call this war file in that project ...Can I put that in /WEB-INF/lib? Tell me what r the ways to run the war file like import is the war file is one way like that.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

What exactly do you mean by reusing the war file. Are you trying to use some classes int it. You cannot put the war in some lib directory, it wont work.


Groovy
Ramesh Krishna
Greenhorn

Joined: May 17, 2004
Posts: 25
I mean ... the war file is external file which is exported from diff ear file(diff application).I want to use this war file in new application . so in this application already webcontent is there(web.xml& struts-config.xml). so with out disturbing present application how can i use this war file
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Ramesh,
That's what I was trying to explain. A WAR can be associated with different EARs without changing anythings. Steps in WSAD:
1) Go to J2EE perspective
2) Expand Enterprise application branch
3) Double click on EAR you want to add the WAR too
4) Click modules tab
5) Add WAR
 
jQuery in Action, 2nd edition
 
subject: How to call external WAR file in J2EE Project using WSAD 5.1.1