struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Theodoridis" <str...@tera.gr>
Subject Re: Struts-Tiles causes charset problem!!!
Date Thu, 06 Mar 2003 15:59:03 GMT
I have the same problem with Greek Characters

If i use the encoding tag at the  page encoding wich is set in our
template.jsp file then the text from tiles-def.xml diplayes correct but the
data from database and Application.resources displays like ?

If i remove encoding tag then the data and text from Application.resources
dispaed correct but text from tiles displayed as ?

I use PostgreSQL characters-set UTF-8, the files tiles-config.xml and
application resources are saved as UTF-8


----- Original Message -----
From: "Cedric Dumoulin" <cedric@apache.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Thursday, March 06, 2003 1:05 PM
Subject: Re: Struts-Tiles causes charset problem!!!


>
>   Check if the returned page (the page source in the browser) has the
> appropriate encoding tag.
> The page encoding is usually set in your template.jsp file.
>
>     Cedric
>
> Eric Chow wrote:
>
> >Hi,
> >
> >I want to display some Chinese in JSP(Customer Tag).
> >
> >If my JSP as following: (showChineseContent.jsp)
> >=======================================
> ><%@ page language="java" contentType="text/html" %>
> ><%@ taglib uri="/WEB-INF/tld/test.tld" prefix="test" %>
> ><%@ taglib uri="/WEB-INF/tld/share.tld" prefix="share" %>
> >
> ><html>
> ><head>
> > <meta http-equiv="content-type" content="text/html; charset=UTF-8">
> > <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
> > <title>Chinese Form</title>
> >
> > <link rel="stylesheet" href="css/myapp.css">
> ></head>
> ><body>
> >
> >
> ><table border=0 width=100% align=center cellspacing=2 cellpadding=2>
> > <test:chineseFormList>
> > <tr>
> >  <th>ID</th>
> >  <th>Name</th>
> > </tr>
> >
> > <share:list>
> > <tr>
> >  <td><test:chineseFormInfo property="messageID"/></td>
> >  <td><test:chineseFormInfo property="name"/></td>
> > </tr>
> > </share:list>
> >
> > </test:chineseFormList>
> ></table>
> ></body>
> ></html>
> >
> >
> >The above JSP works very well, I can retrieve those Chinese from database
and display them correctly.
> >
> >
> >After I change it to use Tiles as a template as following:
> >
> >tiles-def.xml
> >=========
> ><definition name="showChineseLayout" path="template.jsp">
> >  <put name="title"  value="Test Chinese" />
> >  <put name="content" value="showChineseContent.jsp" />
> > </definition>
> >
> >
> >in my showChinese.jsp
> >===================
> ><tiles:insert definition="showChineseLayout" flush="true" />
> >
> >
> >
> >
> >After changed to tiles, everything is wrong, all the Chinese displayed as
some QUESTION-MARKS !!!!!!!!!
> >
> >
> >Is there any problem in Tiles?  And, I tried to use <jsp:include
page="showChineseContent.jsp" flush="true"/> instead of Tiles, it also not
worked.
> >
> >Any idea on it?
> >
> >
> >
> >Best regards,
> >Eric
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message