is it used in jsp ?
or java class ?
thanks
Main Topics
Browse All TopicsDear Expert,
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/
Also, if I use response.sendRedirect("htt
Are there any solution to do the internal redirect ?
Thanks
Vince
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Another option is to use JSTL, which makes you code looks a whole lot cleaner:
<c:import url="http://192.168.1.44/p
<c:param name="name" value="${param.name}"/>
</c:import>
Some info on JSTL:
JSTL stands for jsp standard tag library. the installation is easy and tags are very powerful, the only requirement is your servlet container complies to jsp 1.2, which most of current servers do:
home of jstl:
http://java.sun.com/produc
apache jakarta has implementation of jstl:
http://jakarta.apache.org/
download binary: http://www.apache.org/dist
here is the link into an article of jstl, look for "url action" section for your need. I would suggest you to read through the entire article from beginning.
http://www.onjava.com/pub/
Business Accounts
Answer for Membership
by: KuldeepchaturvediPosted on 2003-12-15 at 20:32:36ID: 9946975
try using this.... con = null; ); on) url.openConnection(); ntent-Type ","text/xm l"); "); e(xml.getB ytes());// in this place you can pass all your parameteres nputStream ())); ed a Protocol Exception in doRequest"+pe);
ion in PM-doRequest"+exception); ed an Exception in PM-doRequest"+ioe);
java.net.HttpURLConnection
//Open a connection to the specified url ( Communication frame work in this case.
try
{
PrintWriter out =serverresponse.getWriter(
con =(java.net.HttpURLConnecti
con.setRequestProperty("Co
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod("POST
//Post the XML transaction to the system.
con.getOutputStream().writ
in = new BufferedReader(new InputStreamReader(con.getI
}
//Catch any errors that may happen is this process.
catch(ProtocolException pe)
{
System.out.println("Receiv
printError(out, pe );
return null;
}
catch (FileNotFoundException exception)
{
System.out.println("Except
InputStream err = con.getErrorStream();
in = new BufferedReader(new InputStreamReader(err));
}
catch(IOException ioe)
{
System.out.println("Receiv
printError(out, ioe );
ioe.printStackTrace();
return null;
}
//Try reading the response from the system. catch any errors that may happen in the process.
try
{
StringBuffer response = new StringBuffer();
String line;
while ((line = in.readLine()) != null)
response.append(line);
in.close();
return response.toString();
}
catch(IOException ioex)
{
System.out.println("ioex in PM-doRequest"+ioex);
printError(out, ioex );
ioex.printStackTrace();
return null;
}
catch(Exception e1)
{
printError(out, e1 );
System.out.println("Error in PM-doRequest"+e1);
e1.printStackTrace();
return null;
}
}