• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing Servlet from different war Files

 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to use a request made in one application in a completely separate web application?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rex Tan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic