Hi Jaikiran,
here's my code:
| String urlPath = "http://127.0.0.1:"
| + pageContext.getRequest().getServerPort()
| + request.getContextPath() + "/myservlet";
| URL url = new URL(urlPath);
| URLConnection connection = url.openConnection();
| String cookie = request.getHeader("Cookie");
| connection.setRequestProperty("Cookie", cookie);
| connection.setRequestProperty("charset", "ISO-8859-1");
| connection.setDoOutput(true);
| OutputStreamWriter ostream = new OutputStreamWriter(connection.getOutputStream());
| BufferedWriter out = new BufferedWriter(ostream);
| ... // write something to the servlet
| out.flush();
| out.close();
| is = connection.getInputStream();
| ... // read servlet response
|
Thanks!
Andrea
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082488#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...