How to Modify the Header and when
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   hans_mader
Posted On:   Thursday, January 24, 2002 11:59 PM

Can anybody tell me when it's the best time to modify the response header.


I have got a controller servlet which redirects the request to certain jsp's or other servlets.


In the controller I want to modify some
response header information.
I'm using the sendRedirect and forward methods. Thanks

Re: How to Modify the Header and when

Posted By:   Anonymous  
Posted On:   Friday, January 25, 2002 03:43 AM

As the headers that will be written back to the client can be seen as a part of the response, it's better not to do this in your controller.


if you use a clean MVC approach, your controller will only do the redirects and forwards.


The servlets to which the request is directed will then write the headers and the content!





Regards,


G√ľnther.


http://www.javacoding.net

About | Sitemap | Contact