You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric LOEW <e....@egencia.com> on 2002/01/07 16:41:38 UTC
Accent and cookie problem
Hi,
I'm a system administrator for my company. I have install and configure
a tomcat 3.3-2 on a debian linux box (Woody 3.0), and have a problem
with European special characters (é, è, ê, ...) and the cookie library.
Extract code :
In a servlet, we do :
cookie = new Cookie("FirstName", p.getGivenName()); //
p.getGivenName() returns an accented string
cookie.setPath("/");
cookie.setComment("In order to recognise user on login");
cookie.setMaxAge(60*60*24*365);
response.addCookie(cookie);
And the log file say (with first_name = 'Sébastien'):
2002-01-07 15:43:17,143 - SigninHandler.java(161): adding cookie:
javax.servlet.ht
tp.Cookie@248f2b
2002-01-07 15:43:17,144 - SigninHandler.java(169): adding cookie:
javax.servlet.ht
tp.Cookie@336006
2002-01-07 15:43:17,145 - RequestProcessor.java(114):
java.lang.IllegalArgumentExc
eption: s\xe9bastien
java.lang.IllegalArgumentException: s\xe9bastien
at org.apache.tomcat.util.http.ServerCookie.maybeQuote(Unknown
Source)
at
org.apache.tomcat.util.http.ServerCookie.appendCookieValue(Unknown Sour
ce)
at
org.apache.tomcat.facade.HttpServletResponseFacade.addCookie(Unknown So
urce)
at
egencia.handlers.SigninHandler.handleRequest(SigninHandler.java:170)
at
fakefish.servlets.Dispatcher.dispatchRequest(Dispatcher.java:116)
at
fakefish.servlets.RequestProcessor.doGet(RequestProcessor.java:75)
at
fakefish.servlets.RequestProcessor.doPost(RequestProcessor.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown
Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown
Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown
Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unk
nown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown
Source)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown S
ource)
at java.lang.Thread.run(Thread.java:484)
I first do the test (with the same code) on a RedHat Box 6.2 and Tomcat
3.2.3 and that work.
My question :
Is there a special configuration in Tomcat or apache or in the system ?
I don't really know where to search ? Can someone help me ?
Eric.
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>