This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes apache commons-httpclient Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "apache commons-httpclient" Watch "apache commons-httpclient" New topic
Author

apache commons-httpclient

kapil munjal
Ranch Hand

Joined: May 11, 2004
Posts: 298
Hi,

I have a requirement in which my java program will call a jsp page through URLConnection class of java.net package and get the response from the jsp page. The response will include some cookies which will have the session information. Please guide me how I can read the response through httpclient package of apache.

My main aim is to create the session between the simple java program and jsp page.

Regards
Kapil


Kapil Munjal
SCJP 1.4, SCWCD 1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
I don't think you can use HttpCLient to read the response if you use java.net.HttpUrlConnection for the request. Why not use HttpClient for both? In the HttpMethod interface I see methods like getResponseHeaders and getResponseBody, which would seem to do what you're trying to do.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: apache commons-httpclient
 
Similar Threads
how to find http response time
how did java.net.* package deal with session?
Netbeans Libraries Question
How to post an array list of strings to a servlet
JSP->Servlet->PHP