You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ARvils Freipics <ar...@it.lv> on 2002/09/02 15:24:37 UTC

problems with fitlers in chain

Hi,

I try to write three filters in chain, where each filter can modify 
request and finaly
give request to jsp page, but it isn`t work so.
Each filter gets only new request, not that from previous filter :(

For example:

1auth filter (request, response){
out.println("filter1");
request.addAttribute("asd","asdfa");
chain.doFilter(request, response);
}

2control filter(request, response){
out.println("filter2");
out.println((String)request.getAttribute("asd));
request.addAtribute("ttt","ttt");
chain.doFilter(request, response);
}

3conn filter(request, response){
out.println("filter3");
out.println((String)request.getAttribute("asd));
out.println((String)request.getAttribute("ttt"));
chain.doFilter(request,response);
}

And as a result I get respnse:

filter1
filter2
null
filter3
null
null

In web.xml they are defined in order 1,2,3  and mapped to one jsp page.

What I do wrong ??? Or is it some tomcat bug ???
Maybe there is some workaraound ???


ARvils
arvils@it.lv






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>