This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Accessing Servlet from different war Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Accessing Servlet from different war Files" Watch "Accessing Servlet from different war Files" New topic
Author

Accessing Servlet from different war Files

Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
I have two applications called A.war and B.war.

There is a servlet available in A.war which on validating parameters dispatches the call to servlet in B.war

Please let me know if can be possible
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You want to use a request made in one application in a completely separate web application?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Major design flaw. If the code is to be re-used it should be included in both applications. This should be build-time, not run-time sharing


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rex Tan
Greenhorn

Joined: Mar 26, 2009
Posts: 8
Well if you really want it that way you can just import information using
<c:import url="...."/>

However you should really put those servlets in the same application, since you can't forward requests to the other servlet using RequestDispatcher unless they are in the same web application context


SCJP 1.6, SCWCD 1.5, MCTS, MCT
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Accessing Servlet from different war Files
 
Similar Threads
I want to share a session between two Web applications
context and action classes
Accessing a jsp from a war file
How to connect cross domain call in struts
Establishing STRUTS 1.2, Inter module Communication ??