tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casper Wandahl Schmidt <kalle.pri...@gmail.com>
Subject Re: Pass an object from one Webapp to another on two differents servers
Date Wed, 29 Aug 2012 12:06:15 GMT
Without being a Tomcat expert I don't think that is possible like that. 
On the other hand it looks just like what happens when you buy something 
online 1. You go to a webshop and put something in your cart, 2. you are 
redirected to a payment site (ie. quickpay.com), 3. after payment you 
are redirected back to the webshop and confirmation is showed.

What really happens (as far as I remember) is, that when you redirect 
from server1 you give as parameter what is called a return URL, this is 
the address of the page shown in step 3 above (confirmation). Part of 
this URL is some variable that enables you to tell who the user is (ie. 
sessionID). When server2 is finished it will send a redirect to the 
client, redirecting it to the return URL server1 gave it. Part of the 
redirect URL send by server2 is another variable (callback/status) that 
enables server1 to make a request directly to server2 to fetch whatever 
it needs (ie. xml markup or a simple string). This last step is used by 
webshops to check against the payment site that the user actually did 
put in correct creditcard details and not just cancelled, before 
returning to the confirmation page.

I think what you are looking for is exactly that. F1 submits to Server_2 
(perhaps including session ID or something else uniquely identifying the 
user). When Servlet_2 completes it redirects to JSP_1 giving some URL as 
a parameter (ie. 
redirect-url-to-Server_1.com?callback=some-url-with-unique-identifier). 
Then JSP_1 can open a connection and retrieve the user-specific 
message/object (if the object can somehow be transfered, normally this 
requires either Serializable interface, some kind of xml markup to 
recreate the object or something else like that) .

Hope it helps you out!

Med venlig hilsen/Kind regards
Casper W. Schmidt

Den 29-08-2012 13:30, Léa Massiot skrev:
> I posted mistakenly in the "Tomcat" forum instead of here "Tomcat-User" (I
> just moved my thread).
> Can you help me?
> Best regards.
>
>
>
> --
> View this message in context: http://tomcat.10.n6.nabble.com/Pass-an-object-from-one-Webapp-to-another-on-two-differents-servers-tp4985870p4985967.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message