Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about JSP URLConnection  RSS feed

 
samir faruqui
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I am a peoplesoft developer and I dont understand JSP too well . I have following two questions about the code below .

1) Are we using a POST call to
https://SomeUrl/ssoreq.asp (not a GET
request) ?
2) Are we assigning the content-length and content-type header
variables prior to executing the POST call ? ...

Quick responses would be highly appreciated . Thanks

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Are we using a POST call to
https://SomeUrl/ssoreq.asp (not a GET
request) ?


You are using a GET.

2) Are we assigning the content-length and content-type header
variables prior to executing the POST call ? ...


You are not executing a call. You need to open an input stream to get a response. Are you trying to stream content to the remote resource or are you trying to obtain content from it ? Look at the java doc for URLConnection

A URL connection can be used for input and/or output. Set the DoInput flag to true if you intend to use the URL connection for input, false if not. The default is true.


Quick responses would be highly appreciated


Asking for a quick response usually puts people off. If you can elaborate on your requirement we can help you get a better solution. A JSP is not meant to contain code. It is a view, nothing more.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!