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.
Dear All, I have 2 tomcat engines on 2 separate computers, A, and B. A and B are on the same network. "A" is published to the Internet, it has public IP. "B" is not published,, it has a private IP 192.168.1.44. Machine "A" , getInput.jsp will get user input from the internet and then pass the parameters to machine "B", process.jsp to process the data. I would like to know how "A" can send the parameter to "B" ? Since <jsp:forward> can only be used under the same Context, I cannot use <jsp:forward page="http://192.168.1.44/process.jsp"> in getInput.jsp. Also, if I use response.sendRedirect("http://192.168.1.44/process.jsp") in getInput.jsp, since the user on the internet cannot access 192.168.1.44, this method also failed. Are there any solution to do the internal redirect ? Thanks Vince
You will need to get machine A to perform its own HTTP connection to machine B and then react depending on the response from B. the problem with sendRedirect is it asks the client to reissue a request to the specified machine. Since the client can't see machine B this won't work. Machine A is the only one that can see machine B, it will have to make the request. A Http request may not be the best option though. You could try something like running an EJB container on B and making a remote EJB call instead. It would be harder to configure, but much easier to code. Dave