Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
Joined: Jan 30, 2003
doesn't sendRedirect just make the client make a second call? Is there a way I can do this without the client even knowing?
Originally posted by John Dunn: doesn't sendRedirect just make the client make a second call? Is there a way I can do this without the client even knowing?
No. Even with sendRedirect, you could run into issues under SSL if you're using. Browsers (correctly) alert the user if a request is being made to a domain that is different from the one they originally established the secure connection with.
If you redirect to a URL on this other server, then what the person looking at the browser will see in the address bar, after that happens, is that other URL. If you don't want them to see that URL, for whatever reason, then your options are limited.
You can't forward to a URL outside your application. So if you don't want to redirect, you're limited to the setup you have now, namely to do the URLConnection yourself. Bear in mind that if what the other server returns includes links (e.g. images), those links may be relative to the other server's URL and hence wouldn't work with your server's URL. You would have to fiddle with them to make them absolute links.
Joined: Jan 30, 2003
I'm not using a browser, per se. Client app has a built in IE browser client. I basically get an xml inquiry, parse, do some lookups based on fields. If I determine the inquiry is of type "A" or "B", (instead of "C", "D", "E"), I update a few fields, add a few fields and resend the altered inquiry to another system and WAIT for a response. Response gets sent back unaltered to the client.
I'd like to get an inquiry, parse, do the lookups, and if I determine type "A" or "B", forward/redirect the altered inquiry to the other system and let that system return to the client. In my case the "other" system is on another host, behind the firewall but still another host.
Perhaps, what I need to do in this scenerio is to return the altered inquiry to the client and be done with it, letting them make the second call on their own.
Originally posted by John Dunn: I'm currently using a servlet that opens a URLConnection and does an inquiry/request to a new server. The calling servlet passes any info to the client.
What I'd rather to is have the client call servlet A, servlet A call/redirect/forward to servlet B (different server), which will process data & return results to a client.
Is this possible?
you have to activate servlet chaining.it is easy if u can use the java web server provided by java soft. in that the manage tab u are allowed to instantiate the servlet chaining. the servlets will be seperated with commas