dcsimg
User same HttpServletResponse object in doGet and doPost
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Matthias_Stoll
Posted On:   Thursday, December 6, 2001 05:59 AM

First i will describe our goal: We have a servlet that generates a session (incl. ID), passes this information with a redirect to another application at another provider. This Provider returns a ASCII file and the passed SessionID to the same servlet. This file is beeing processed by the doPost method. To successfully process the file, additional user information is required. Therefor the doPost should change the users display and show a form (should use HttpServletResponse object from doGet?). We try to share the HttpServletResponse/Request object via the session tracking (session.put("userResponse", res). Calling this object from doPost returns an exception. How can i share the response    More>>

First i will describe our goal:



We have a servlet that generates a session (incl. ID), passes this information with a redirect to another application at another provider. This Provider returns a ASCII file and the passed SessionID to the same servlet. This file is beeing processed by the doPost method. To successfully process the file, additional user information is required. Therefor the doPost should change the users display and show a form (should use HttpServletResponse object from doGet?).

We try to share the HttpServletResponse/Request object via the session tracking (session.put("userResponse", res).

Calling this object from doPost returns an exception.


How can i share the response object, or is there anyway to obtain the goal in another way?



Thanx

   <<Less

Re: User same HttpServletResponse object in doGet and doPost

Posted By:   Anonymous  
Posted On:   Thursday, December 6, 2001 06:53 AM

I'm not sure what you are trying to do, and I think you don't don't understand clearly the difference between doGet and doPost. There is none, except for the fact that one is called and the method used is Get and the other when Post is used. Most servlets do the same treatment for both methods, and call a common method, passing the request and the response. If your servlet can be called by your client and your provider, use a parameter to determine who is invoking your servlet, or do two different servlets.
About | Sitemap | Contact