This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm trying to write a servlet (on WebLogic) which will sit between legacy web applications (OAS) and users, such that users can make a request for the original application, the proxy intercepts this call (using an iPlanet plugin) and gets passed the original URL. This servlet should then forward the request to the legacy application after some security checks and setting up some variables. Does anyone know how to forward the request on to these legacy applications which will reside on a different machine ?? Thanks in anticiaption Ian Moore
chinnermoore Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy. Thanks again and we hope to see you around the ranch!!
Ian, The forward() method on the RequestDispatcher won't work because the resource must be relative to the servlets root context. It sounds like to me you are going to need to do some work with the java.net package that will allow you to generate HTTP connections, requests, etc. Basic stuff is pretty easy, but more advanced processing can get tricky. I did a search and found the following... Jetty Note: I do not have any experience with this open source offering, but it appears to have a forwarding mechanism that does what you want to do. Even if you don't use it, it may give you a leg up in designing your solution. Regards,
Hi, I guess its just your luck that i happened to have the same kind of problem and needed to do a bulk http post to some server. I used the org.apache.commons.httpclient package for the same. For your legacy app u can use the HTTPClient, HttpPost classes under this package and post the request there(Post/Get Methods are available) The problem here is reading the response from the legacy appln and then processing that to give the desired output. Seems like a lot of work but thats what u do with legacy app integration HTH Lemme know if u need the source code or more input Sahil
Joined: Jul 12, 2002
Byron, Sandy Thanks for your replies, time to cut some code and see what happens ! cheers Ian aka chinnermoore