You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Pedro-1 <pi...@hotmail.fr> on 2008/02/14 10:12:40 UTC

Struts2 Tiles and UTF-8

Dear Tiles specialists,
I have a JSP file with the following content:
====== sameFile.jsp ===
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
language="java" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    	<meta http-equiv="Content-Language" content="fr,en" /> 
  	 	<meta content="text/html; charset=UTF-8" http-equiv="content-type">
</head>
<body>
Déconnexion, à é 
....
======
If it is used directly as a struts result, the browser display correctly the
accentuated characters, but If It used as tiles type through a tiles page,
the accentuated chars are converted to ISO-8859. and wrongly displayed by
the browser that expect UTF-8.
Any idea of what is wrong here?
====== tiles.xml ===
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
        "http://struts.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
    <definition name="sameFile.page" template="sameFile.jsp">
   </definition>    
</tiles-definitions>
==========
I use tiles-api-2.0 and tiles-core-2.0
Thanks in advance for your help

-- 
View this message in context: http://www.nabble.com/Struts2-Tiles-and-UTF-8-tp15476505p15476505.html
Sent from the tiles users mailing list archive at Nabble.com.


Re: Struts2 Tiles and UTF-8

Posted by Antonio Petrelli <an...@gmail.com>.
2008/2/14, Pedro-1 <pi...@hotmail.fr>:
>
> The first try provide an error parsing tiles.xml:
> org.xml.sax.SAXParseException: Element type "put" must be declared.



You have to check against the new DTD:
http://tiles.apache.org/2.0/framework/tiles-core/dtddoc/index.html

Ciao
Antonio

Re: Struts2 Tiles and UTF-8

Posted by Pedro-1 <pi...@hotmail.fr>.

Antonio Petrelli-3 wrote:
> 
> Please upgrade to Tiles 2.0.5 and let us know:
> http://tiles.apache.org/download.html
> 
Thanks Antonio,
It seems that there are some important changes between 
 tiles-api-2.0-20070207.130156-4.jar and tiles-api-2.0.5.jar.
I am also obliged to upgrade struts2 and the latest version seems to expect
tiles version 2.0.4, but I switched to the 2.0.5 as you suggest.
The first try provide an error parsing tiles.xml: 
org.xml.sax.SAXParseException: Element type "put" must be declared.
I have to investigate more before coming back.
Regards
Pedro
-- 
View this message in context: http://www.nabble.com/Struts2-Tiles-and-UTF-8-tp15476505p15478456.html
Sent from the tiles users mailing list archive at Nabble.com.


Re: Struts2 Tiles and UTF-8

Posted by Antonio Petrelli <an...@gmail.com>.
Please upgrade to Tiles 2.0.5 and let us know:
http://tiles.apache.org/download.html

Antonio

2008/2/14, Pedro-1 <pi...@hotmail.fr>:
>
>
> Dear Tiles specialists,
> I have a JSP file with the following content:
> ====== sameFile.jsp ===
> <%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
> language="java" %>
> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <html>
> <head>
>         <meta http-equiv="Content-Language" content="fr,en" />
>                 <meta content="text/html; charset=UTF-8"
> http-equiv="content-type">
> </head>
> <body>
> Déconnexion, à é
> ....
> ======
> If it is used directly as a struts result, the browser display correctly
> the
> accentuated characters, but If It used as tiles type through a tiles page,
> the accentuated chars are converted to ISO-8859. and wrongly displayed by
> the browser that expect UTF-8.
> Any idea of what is wrong here?
> ====== tiles.xml ===
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE tiles-definitions PUBLIC
>         "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
>         "http://struts.apache.org/dtds/tiles-config_2_0.dtd">
> <tiles-definitions>
>     <definition name="sameFile.page" template="sameFile.jsp">
>    </definition>
> </tiles-definitions>
> ==========
> I use tiles-api-2.0 and tiles-core-2.0
> Thanks in advance for your help
>
>
> --
> View this message in context:
> http://www.nabble.com/Struts2-Tiles-and-UTF-8-tp15476505p15476505.html
> Sent from the tiles users mailing list archive at Nabble.com.
>
>