Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with HttpURLConnection  RSS feed

 
Annie Siddharth
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a java application that needs to post some data and recieve some back.
1. I have opened a HttpURLConnection and connect it to the server
("http://localhost:8080/someAction.do").
2. setRequestMethod("POST");
3. And then getting the outstream and writing it to that
In the struts Action classes' doPerform (on my web server side)I am trying to read the data by getting HttpServletRequest.getInputStream. And then on success forward it to my JSP.
Problem is I am not able to able to read data on either side (client nor server). Is something wrong in the way I am posting the data?
Thanks in advance,
Annie
[ November 20, 2003: Message edited by: Annie Siddharth ]
[ November 20, 2003: Message edited by: Annie Siddharth ]
 
Annie Siddharth
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok guys, I figured out on how to read the posted data on the web server side (struts Action class)


But I am still getting FileNotFoundException on the client side when I am trying to read back the response from the server.
- Annie
 
Annie Siddharth
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Phew...I figured out the second part too...I had wrong JSP file name configured in the struts-config.xml
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!