hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Using HttpClient with my JSP session
Date Thu, 09 Jul 2009 15:12:22 GMT
On Thu, Jul 09, 2009 at 02:02:02AM -0700, TomSimmons wrote:
> 
> Morning All
> 
> I'm hoping someone can help me out here.
> 
> I have a JSP running on JBoss, that all works fine.  I need from within that
> application to use HttpClient to request a JSP page within the same
> application, but so I get the resulting HTML in a string that I can then use
> as the body for an HTML Email.
> 
> My problem is that I cannot figure out, or find on Google, a clear and
> working example on how I make the HttpClient request use the same session as
> my JSP is using.
> 
> I know it isn't because the session filter checks for certain things on the
> session, and redirects to the login page if they're missing.
> 
> 
> Thanks
> 
> Tom

Hi Tom,

You need to manually add the session cookie to the cookie store bound to the
execution context and make sure it gets picked up when requests are generated
by setting appropriate domain and path attribute values

http://hc.apache.org/httpcomponents-client/tutorial/html/ch03.html#d4e672

Oleg


> -- 
> View this message in context: http://www.nabble.com/Using-HttpClient-with-my-JSP-session-tp24406615p24406615.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message