Thanks alot for your help. Yesterday I mentioned that the problem is solved
but strange I think my messages is not got by the forum. The problem was
using the :
meta http-equiv='Content-Type' content='text/html; charset=UTF-8'
To change a encoding of a jsp page which is diudn’t work. I simply
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
On 12/17/11 9:37 AM, André Warnier wrote:
I do not see anything in the above that submits anything with an
umlaut.
The form could have additional inputs that were not included in the OP.
This is a GET request, so anything submitted would
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
German Starz,
On 12/18/11 7:26 AM, starz10de wrote:
I a login page (it has utf-8) I checked this also manually; after
login is successful a jsp page will be called to enter the query.
This jsp page use iso encoding although inside it utf-8 is
One of my try to solve the problem is to use utf-8 in my html page as well as
in my backend. It doesn’t work because the reason was that the Browser
change automatically to iso encoding. Today I checked the browser encoding
before submit the query and saw that it use iso although in my html page
starz10de wrote:
I tried your suggestion:
http://localhost:8080//search/main?query=böse (I make sure that it is
inside some documents)
but the search return null
Remember : I have no idea what your application is, and what it is supposed to
do or not.
Only you know that.
With the
starz10de wrote:
One of my try to solve the problem is to use utf-8 in my html page as well as
in my backend. It doesn’t work because the reason was that the Browser
change automatically to iso encoding. Today I checked the browser encoding
before submit the query and saw that it use iso
Thanks a lot for your answer. I already did what you suggested:
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 /
but unfortunately the same problem. As I said when the default in the
server.xml is ISO-8859-1 all are fine. I am dealing with English and
German languages. The
starz10de wrote:
Thanks a lot for your answer. I already did what you suggested:
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 /
That's good.
but unfortunately the same problem. As I said when the default in the
server.xml is ISO-8859-1 all are fine.
Can you show
awarnier wrote:
Can you show *exactly* what you are doing in server.xml ?
(paste the relevant portion here, remove comments and passwords)
For the server.xml I can't modify any thing there, as I mentioned before
there are many other instances working there. If I can modify
I tried your suggestion:
http://localhost:8080//search/main?query=böse (I make sure that it is
inside some documents)
but the search return null
here what I saw in the browser link bar after click on submit:
http://localhost:8080//search/main?query=b%F6se
I also changed the browser encode
starz10de wrote:
I have an application which is running in local machine and it work perfect.
I installed my application in the server to make it available for all. In
the server we have tomcat running and provide services for many instances.
After I played my application in the server, I had
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
On 12/16/11 3:37 PM, André Warnier wrote:
4) Thus, if your pages are UTF-8, then any link in the page which
calls the server, is going to send all values to the server in
the UTF-8 character set.
I'm not so sure about that. Firefox has a
Sorry, it was my mistake.
On 64 bit version webapp name was MyWebApp
On 32 bit version webapp name was mywebapp
On Fri, Dec 10, 2010 at 13:54, imrezol imre...@gmail.com wrote:
Hi!
I set URIEncoding=UTF-8 at http connector in server.xml:
Connector port=8080 protocol=HTTP/1.1
imrezol wrote:
Hi!
I set URIEncoding=UTF-8 at http connector in server.xml:
Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 URIEncoding=UTF-8/
restart tomcat service and after that type an url with special charaters
like this:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
André Warnier wrote:
The OP is talking about UTF-16, not UTF-8.
I understand. I was trying to contrast UTF-8 and UTF-16, apparently
unsuccessfully.
What you are saying above about ASCII/UTF-8 is true, if one restricts
oneself to
Nayyer Kamran wrote:
Hello,
I am facing problem in accessing deployed modules once I configured connector's
URIEncoding to UTF-16 in server.xml.
Hi.
Could you tell us *why* exactly you did set this attribute ?
It is rather unusual, as it supposes that you expect all clients to
encode
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
André Warnier wrote:
Could you tell us *why* exactly you [are trying to use UTF-16]?
It is rather unusual, as it supposes that you expect all clients to
encode their requested URI's in UTF-16 prior to sending the request to
Tomcat on that
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
André Warnier wrote:
Could you tell us *why* exactly you [are trying to use UTF-16]?
It is rather unusual, as it supposes that you expect all clients to
encode their requested URI's in UTF-16 prior to sending the
Replying to myself :
André Warnier wrote:
My own name, expressed in the
Unicode alphabet and encoded in UTF-8, occupies 6 bytes, not 7.
I meant 6 bytes, not 5, of course.
It rather weakens my argument when I mix-up my own byte counts...
Thx a lot Pulkit, it works just fine.
But my aim is to make portability easier ; What happens if the
URIEncoding of the Connector is not UTF-8 or ISO-8859-1, but a
different char encoding ?
Your pseudo-code won't work anymore :(
Is there a way to get the value of the param URIEncoding of the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Frederic,
Frederic Bastian wrote:
The point is that I need to use the java.net.URLEncoder.encode() method,
e.g. java.net.URLEncoder.encode(myParam, UTF-8).
You ought to be using the response's character encoding, not whatever
Tomcat (or the
Christopher Schultz a écrit :
You want to do this:
java.net.URLEncoder.encode(myParam, request.getCharacterEncoding());
This does not work :) request.getCharacterEncoding() is different from
Connector URIEncoding. The request character encoding determines in
wich character encodig the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Frederic,
Frederic Bastian wrote:
Christopher Schultz a écrit :
You want to do this:
java.net.URLEncoder.encode(myParam,
request.getCharacterEncoding());
This does not work :) request.getCharacterEncoding() is different
from Connector
Caldarale, Charles R a écrit :
Once again, it's available via the MBean that Tomcat creates for each
Connector element.
I'm sorry i should have missed your reply.
Could you tell me a bit more about how MBean can solve my problem ? I
never used it.
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
how to know the Connector URIEncoding value, inside
your application ? :)
Once again, it's available via the MBean that Tomcat creates for each
Connector element.
- Chuck
THIS COMMUNICATION MAY CONTAIN
Christopher Schultz a écrit :
I'd agree that reading a URI is different, but not writing one. Where
are you writing your URI? Into the response, I'm guessing. In fact, I'm
guessing you're writing it into the response /body/, which ought to be
encoded using the response's declared Content-Type
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Frederic,
Frederic Bastian wrote:
I'm sorry but I think you don't get it :) Reading and writing URI is
totally different from writing the response output.
I'd agree that reading a URI is different, but not writing one. Where
are you writing your
Christopher Schultz a écrit :
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Frederic,
Frederic Bastian wrote:
Christopher Schultz a écrit :
You want to do this:
java.net.URLEncoder.encode(myParam,
request.getCharacterEncoding());
This does not work :)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chuck,
Caldarale, Charles R wrote:
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
Is there a way to get the value of the param URIEncoding of the
Connector, so your code will work, whatever the char encoding
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Frederic,
Frederic Bastian wrote:
The matter is that Tomcat won't get the correct values of the parameters
in the URL. For instance :
If my URI looks like : http://host/?query=%C3%A9%C3%A8
The URI encoding is UTF-8
By default, Tomcat will
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
The point is that I need to use the
java.net.URLEncoder.encode() method,
e.g. java.net.URLEncoder.encode(myParam, UTF-8).
O.k., so now it appears you need to know the encoding in order to do it
properly
Caldarale, Charles R a écrit :
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
Is there a way to get the value of the param URIEncoding of the
Connector, so your code will work, whatever the char encoding of the
Connector is ?
I'm confused. If the Connector
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
Is there a way to get the value of the param URIEncoding of the
Connector, so your code will work, whatever the char encoding of the
Connector is ?
I'm confused. If the Connector already has the proper
How about:
String queryString = HttpServletRequest.getParameter(query);
queryString = new String(queryString.getBytes(iso-8859-1), UTF-8);
Its not very graceful so you can even make a 1-line-method for doing this
and have:
decodeURIParams(a, b, c) {
return new
Hi Pulkit, thanks for your answer.
The matter is that Tomcat won't get the correct values of the parameters
in the URL. For instance :
If my URI looks like : http://host/?query=%C3%A9%C3%A8
The URI encoding is UTF-8
By default, Tomcat will read this url in ISO-8859-1. So
Hi Frederic,
I don't know about HttpSession.method for settign the URIEncoding.
But you could always do somethign along the lines of:
String uri_utf8 = new String (uri.getBytes(iso-8859-1), UTF-8);
inside the application.
On 7/26/07, Frederic Bastian [EMAIL PROTECTED] wrote:
Hi folks :)
I
Thanks for your help, that answers my question pretty well :)
Caldarale, Charles R a écrit :
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
Could you tell me a bit more about how MBean can solve my problem ? I
never used it.
Tomcat creates MBeans for most
From: Frederic Bastian [mailto:[EMAIL PROTECTED]
Subject: Re: URIEncoding
Could you tell me a bit more about how MBean can solve my problem ? I
never used it.
Tomcat creates MBeans for most of its internal objects, including
connectors:
http://tomcat.apache.org/tomcat-6.0-doc/mbeans
Mike Wannamaker wrote:
I can specify URIEncoding=UTF-8 in Tomcat's connector settings within the
server.xml file. Now, my Tomcat server correctly reads the URL GET
parameters correctly...sending out Hello, José! or Hello, 田中! as
expected.
However, there's still a problem.
What if I want
Use a servlet filter, like:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException
{
logger.debug(set request character encoding to + encoding);
40 matches
Mail list logo