Subject: Problem with Filters - Tomcat 4.0.1
From: "Shaun Thompson" <[EMAIL PROTECTED]>
 ===
Hello,

I'm trying to run a filter for my jsp's formatting the output I get back for
a wap enabled browser.  The problem that I run into is when I stuff the
response in a wrapper and send it down the filter chain I can no longer set
the content type when I want to write the output to the printwriter.

It looks like the response has already been committed somewhere down the
chain.  I want to set the content type to "text/vnd.wap.wml" but all I get
back in the http header is "Content-Type: text/html;charset=ISO-8859-1"

Here is a sample of what I'm trying to do.
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) {

H2WResponseWrapper h2wResponseWrapper = new
H2WResponseWrapper((HttpServletResponse) response);

chain.doFilter(request, h2wResponseWrapper);

 response.setContentType("text/vnd.wap.wml");
 PrintWriter printwriter = response.getWriter();
......



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to