• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about JSP URLConnection

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic