You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amit Rana <ra...@solis.jp> on 2003/08/06 06:33:40 UTC
content type header
Hi,
We display a lot of Japanese content on our pages, we have lots
of jsps etc which were initially build for English content only.
In order to append the right header I tried following two
approaches but failed
1. Passed "content" parameter to AcionServlet
<init-param>
<param-name>content</param-name>
<param-value>text/html; charset=Shift_JIS</param-value>
</init-param>
2. Above is deprecated so I also tried to add an attribute
contentType="text/html; charset=Shift_JIS" to controller tag in
struts-config
Neither of the above two approaches have any affect although including
<%@ page contentType="text/html; charset=Shift_JIS"%> in the JSPs work.
Is there something wrong in the changes I do to xml? Or there is no
alternative I will have to edit all the JSPs?
Please feel free to direct me to any documentation/link.
Regards,
Amit.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: content type header : [re-post]
Posted by Kris Schneider <kr...@dotech.com>.
Instead of adding an attribute to the <controller> tag, add a <set-property>
sub-element:
<controller ...>
<set-property property="contentType" value="text/html; charset=Shift_JIS">
</controller>
Quoting Amit Rana <ra...@solis.jp>:
> Hi,
>
> We display a lot of Japanese content on our pages, we have lots
> of jsps etc which were initially build for English content only.
>
> In order to append the right header I tried following two
> approaches but failed
> 1. Passed "content" parameter to AcionServlet
> <init-param>
> <param-name>content</param-name>
> <param-value>text/html; charset=Shift_JIS</param-value>
> </init-param>
> 2. Above is deprecated so I also tried to add an attribute
> contentType="text/html; charset=Shift_JIS" to controller tag in
> struts-config
>
> Neither of the above two approaches have any affect although including
> <%@ page contentType="text/html; charset=Shift_JIS"%> in the JSPs work.
>
> Is there something wrong in the changes I do to xml? Or there is no
> alternative I will have to edit all the JSPs?
>
> Please feel free to direct me to any documentation/link.
>
> Regards,
> Amit.
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: content type header
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Your Number 2 should definitely work in struts 1.1
Presumably you do not have any English content type defined in the JSPs.
I assume you are looking at the content type in the page properties in
the browser. It is stuck on iso-8859-1 presumably?
Are you sure it is not a cache problem?
Adam
Amit Rana wrote:
> Hi,
>
> We display a lot of Japanese content on our pages, we have lots
> of jsps etc which were initially build for English content only.
>
> In order to append the right header I tried following two
> approaches but failed
> 1. Passed "content" parameter to AcionServlet
> <init-param>
> <param-name>content</param-name>
> <param-value>text/html; charset=Shift_JIS</param-value>
> </init-param>
> 2. Above is deprecated so I also tried to add an attribute
> contentType="text/html; charset=Shift_JIS" to controller tag in
> struts-config
>
> Neither of the above two approaches have any affect although including
> <%@ page contentType="text/html; charset=Shift_JIS"%> in the JSPs work.
>
> Is there something wrong in the changes I do to xml? Or there is no
> alternative I will have to edit all the JSPs?
>
> Please feel free to direct me to any documentation/link.
>
> Regards,
> Amit.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org