Re: Problems with request encodings

2007-03-20 Thread Rashmi Rubdi
Please read this: 
http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/index.html

Ensure that you are using an uniform encoding accross all layers (front-end, 
middle, database, JSP pages, include pages etc) of your app.

-Rashmi

- Original Message 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tuesday, March 20, 2007 12:06:09 PM
Subject: Problems with request encodings

When submitting this form to page2.jsp (page2.jsp using UTF-8 all
over), the swedish letters å, ä and ö (å, ä and ö) is
printed as '?', when, lets say, I use <%=request.getParameter
("companyName")%>


 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems with request encodings

2007-03-20 Thread [EMAIL PROTECTED]
Hi

I'm using Tomcat 5.5, Struts and Tiles, now working on a smaller web
application that deals with forms and validation. To describe the
problem I'll give a short scenario:

FormPage1.jsp (having pageEncoding = ISO-8859-1 and charSet=ISO-8859-
1)
contains a form using the POST method.

When submitting this form to page2.jsp (page2.jsp using UTF-8 all
over), the swedish letters å, ä and ö (å, ä and ö) is
printed as '?', when, lets say, I use <%=request.getParameter
("companyName")%>

Tried to set request encoding (in page2.jsp) just below page directive
(request.setCharacterEncoding("UTF-8")) but it didn't help at all.


When I posted the same form to another jsp page (UTF-8 all over,
running under the same Tomcat instance, but in different application)
with no Struts at all, and no other java code than <%=request.
getParameter("companyName")%>, the swedish letters displayed just fine

Funny thing is, setting method=GET in form on FormPage1.jsp, makes
things work, and also if I set UTF-8 all over. But this is not an
option, due to external customers using their rip-offs forms sending 
in
request (Yes, I know it's not good custom, but my client decided that
should be allowed)

Now I wonder if there could be some problem with Tomcat encoding
settings or application settings (web.xml or such)???

By the way, using Eclipse as IDE on XP pro, but that shouldn't matter
in this case


Any suggestions???

/Rickard

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]