• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic