How can i change the page content type (charset in my case)
dynamically in my JSP page?

1. <% response.setContentType("text/html;charset="+mybean.getCharset()); %>
does not work because of line
    JspWriter out = pageContext.getOut();
appears _before_ response.setContentType(...) in resulting servlet,
and "out" seems to has already bad charset.

2. <%@ page contentType="<%\"=text/html;charset=\"+mybean.getCharset()%>" %>
does not compile.

Both of this works on Tomcat engine.

Thanks in advice.
Oleg Orlov.



Reply via email to