Filter---after setting attribute--->Servlet---after getting and setting the attribute---->Jsp How do I do this?

Posted by Y.E.P on Stack Overflow See other posts from Stack Overflow or by Y.E.P
Published on 2012-09-08T06:59:54Z Indexed on 2012/09/08 9:38 UTC
Read the original article Hit count: 151

Filed under:
|
|
|

This is what I want to do :

A servlet is called.Before a servlet is called , the request is intercepted by a filter. Filter gets some details out from the request,sets them as an attribute and the forwards it to a servlet via chain.doFilter(request,response). Request finally reaches the servlet. Servlet gets the attribute set by the filter before and sets a new attribute by another name. Then it forwards it to some jsp page where the page gets the attribute and processes it.

How do I do this ? I know how to write a filter and a servlet but how do I forward it to a jsp page from the servlet or is there any other way to achieve this ?

© Stack Overflow or respective owner

Related posts about java

Related posts about java-ee