How to send a request to a JSP from a stand along java program
From: Venkat (muvva_venkat_at_yahoo.com)
Date: 02/28/05
- Next message: proximuss: "Re: CeWolf and JSP"
- Previous message: Jacob: "Re: double declaration"
- Next in thread: Obuseme: "Re: How to send a request to a JSP from a stand along java program"
- Reply: Obuseme: "Re: How to send a request to a JSP from a stand along java program"
- Reply: Andrea Desole: "Re: How to send a request to a JSP from a stand along java program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Feb 2005 04:43:53 -0800
Hi All,
I have to send a request to JSP with some key value pairs which is
executing in a Web server. Please help me in solving this problem.
I tried with the following procedure but I am not successful.
{
URL url;
StringBuffer buffer;
String line;
int responseCode;
HttpURLConnection connection;
InputStream input;
BufferedReader dataInput;
try
{
url = new URL("http://202.62.87.235//kidosoftware//mpayment.jsp");
connection = (HttpURLConnection)url.openConnection();
connection.setDoOutput(true);
connection.connect();
OutputStream os = connection.getOutputStream();
PrintWriter out = new PrintWriter(os);
out.write("key1=asdf");
os.close();
responseCode = connection.getResponseCode();
System.out.println("response code is"+responseCode);
connection.disconnect();
.
.
.
.
}
Thanks in advnace
--Venkat
- Next message: proximuss: "Re: CeWolf and JSP"
- Previous message: Jacob: "Re: double declaration"
- Next in thread: Obuseme: "Re: How to send a request to a JSP from a stand along java program"
- Reply: Obuseme: "Re: How to send a request to a JSP from a stand along java program"
- Reply: Andrea Desole: "Re: How to send a request to a JSP from a stand along java program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|