GeeCON Prague 2014*
The moose likes Distributed Java and the fly likes redirecting user in distributed environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Bookmark "redirecting user in distributed environment" Watch "redirecting user in distributed environment" New topic
Author

redirecting user in distributed environment

Shams Haque
Greenhorn

Joined: Jul 15, 2010
Posts: 5
Hi,

I have to redirect user from one web application to another with some data and i dont want to use Query String. These two web application are deployed on same server.

I tried it with crossContext option but there are more than two web application on same server and i dont want to share session in all application.

Please tell me which technology i can use??

Thanks
Shams
Shams Haque
Greenhorn

Joined: Jul 15, 2010
Posts: 5
No one have any idea??
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12791
    
    5
1. Don't be so impatient
2. As you have observed, a simple redirect has to be a GET - if you dont want to use the URL string, you will need something else.
3. How about responding with a simple HTML page that says "redirecting" and use a form with hidden variables plus JavaScript to POST that form to the other application.

Bill
Shams Haque
Greenhorn

Joined: Jul 15, 2010
Posts: 5
Thanks Brogden for reply....

I suggested same(by using hidden fields and jQuery submit) to my boss. But he said " Something Else ".

If you get something else please tell me.

Thanks
Shams
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12791
    
    5
OK, how about this - use a shared database to store the information you need to transfer, stored under random unique key. Use only this key in the URL string. Of course the other web app will have to be modified to recognize the GET with the key and use it to recover the data.

That way the URL reveals nothing of the internals.

An alternate to a database for sharing the information would be a serialized Java object written to a common file space. A serialized object works just fine as a substitute for a session as long as you can preserve the unique identifier.

Bill
 
GeeCON Prague 2014
 
subject: redirecting user in distributed environment