permaculture playing cards*
The moose likes Servlets and the fly likes Need to intercept requests meant for webapp1 and filter them through webapp2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need to intercept requests meant for webapp1 and filter them through webapp2" Watch "Need to intercept requests meant for webapp1 and filter them through webapp2" New topic
Author

Need to intercept requests meant for webapp1 and filter them through webapp2

Abhineet Kapil
Ranch Hand

Joined: Feb 08, 2010
Posts: 52

Hi,

I have a webapp1 deployed in an application server with context say /WebApp1 .

Now I want to write another webapp2 and deploy in the same server.

And I want to intercept the requests meant for webapp1 ( /WebApp1) and filter them through webapp2 servlet.

Is there any remote possibility of such kind of interception ?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30123
    
150

No. You can forward the requests from web app 1 to web app 2. But the apps have different context roots so one app can't handle requests under the other context root.


[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
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

The best you can do is a redirect.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi ,


you can use the crosscontext to pass the values between two web applications.

Regards
Jatan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need to intercept requests meant for webapp1 and filter them through webapp2
 
Similar Threads
Deploy web apps on different ports
How to pass Session object between two web apps
Tomcat Compiled Java Beans Clashing
How to share value between mutiple war files?
How to get another webapp's jndi object from local?