Re: Java Code Inside Page Directive



vunet.us@xxxxxxxxx wrote :

You can however use response.setCharacterEncoding("UTF-8")

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletResponse.h...)


Can I use response.setCharacterEncoding("utf-8"); on a JSP page?

Did you read the JavaDoc? It is all explained in there:

"This method can be called repeatedly to change the character encoding. This method has no effect if it is called after getWriter has been called or after the response has been committed."

--
Wojtek :-)


.



Relevant Pages

  • Content type problem with struts bean:include
    ... I am having a problem with GBP currency pound signs when using ... to insert the output of an action into a jsp page. ... character encoding of iso-8859-1, and I am also explicitly setting the ... server on Fedora Linux). ...
    (comp.lang.java.programmer)
  • Re: getOutputStream() has already been called???
    ... this code doesn't really belong in a JSP. ... > I understand that it would be better suited for a servlet... ... > Thanks for the response. ... As for closing out: out.close ...
    (comp.lang.java.programmer)
  • RE: Unable to post a gzip compressed data and get the response
    ... > The jsp page supports gzip format and it is deployed in Tomcat server. ... > I tried to post a compressed data in gzip format and when i decompress the ... > But,I am able to post data using webrequest and am able to get the response ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: How Do I Turn A JSP Screen Into A File?
    ... That will work but certainly doesn't seem to be an easy way and in addition I will have to keep the data file in sync with any changes made to the jsp. ... response with your own response wrapper. ... the PrintWriter of the original reponse and to ...
    (comp.lang.java.programmer)
  • Re: return a dynamically created file with Tomcat5
    ... > I am trying to return a file to the user when a certain .jsp or ... For example if the user requests ... > return a response that sets the default file name to what I specify ...
    (comp.lang.java.programmer)