tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casper Wandahl Schmidt <>
Subject Re: Pass an object from one Webapp to another on two differents servers
Date Fri, 31 Aug 2012 10:08:02 GMT

Med venlig hilsen/Kind regards
Casper W. Schmidt

Den 31-08-2012 11:42, Léa Massiot skrev:
> (Warning: there is some "raw text" in this post.)
> Hello Casper. Hello list.
> Thank you for your answer and your advices.
> Here is some interesting litterature related to my problem:
>        "Redirecting from a servlet to an exterior URL using a POST"
Well as they say in that thread POST is not any more secure than showing 
the parameters in the querystring (using GET) so no real reason for 
using POST for that :)
> Which led me to write a programmatic POST using this code:
>        "How to use HttpURLConnection POST data to web server?"
> And, in "SERVLET_2", I replaced the code (see my first post in this thread)
> with this one:
You could also do it the other way around. Make F1 from Server1 POST to 
J1.jsp (still on Server1), which then makes a similar POST request (with 
the parameters necessary from F1) to Servlet_2, reads the result ("ok") 
from the response coming from Servlet_2 and then display the right thing 
in J1.jsp. That would be cleaner than letting the user shift from 
Server1/app1 to Server2/app2 for good (where is the user supposed to 
continue the browsing/work App1 (Server1) or App2(Server2)?)
> I guess my thread's title is not really relevant anymore because this code
> doesn't literally "pass" an object from one webapp to another running on two
> different servers...
> What I'm doing here is "redirecting from a servlet to an exterior URL using
> a POST".
> I'm not really displaying "something user specific / session specific" but
> Casper's comments are very interesting and may prove useful in the future
> for me.
My comments and suggestions are certainly relevant if one is trying to 
accomplish something that needs to be secure (the user can't manipulate 
the parameters/results to gain unauthorized access or escape payment but 
still receive an item).
> Thanks again :)
> Best regards.
> --
> View this message in context:
> Sent from the Tomcat - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message