Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ramesh Krishna
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ramesh Krishna
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ramesh Krishna
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic