Re: URIEncoding

2011-12-19 Thread Christopher Schultz
-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 >

Re: URIEncoding

2011-12-19 Thread Christopher Schultz
-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 that were not included in the OP. > This is a "GET" request, so anything submitted would

Re: URIEncoding

2011-12-19 Thread starz10de
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 : To change a encoding of a jsp page which is diudn’t work. I simply forget that I am chanign the encoding of a jsp page and not html p

Re: URIEncoding

2011-12-18 Thread André Warnier
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 although

Re: URIEncoding

2011-12-18 Thread André Warnier
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 limite

Re: URIEncoding

2011-12-18 Thread starz10de
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 i

Re: URIEncoding

2011-12-17 Thread starz10de
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

Re: URIEncoding

2011-12-17 Thread starz10de
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

Re: URIEncoding

2011-12-17 Thread André Warnier
starz10de wrote: Thanks a lot for your answer. I already did what you suggested: 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 *exactly* what you are doing in server.xml ? (paste the relevant port

Re: URIEncoding

2011-12-17 Thread starz10de
Thanks a lot for your answer. I already did what you suggested: 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 problem in the umlaut, when I submit it to the servlet it is not rec

Re: URIEncoding

2011-12-16 Thread Christopher Schultz
-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 ha

Re: URIEncoding

2011-12-16 Thread André Warnier
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 pro

Re: URIEncoding problem ver 6.0.29 64 bit on windows

2010-12-10 Thread André Warnier
imrezol wrote: Hi! I set URIEncoding="UTF-8" at http connector in server.xml: restart tomcat service and after that type an url with special charaters like this: http://localhost:8080/mywebapp/docs/Felhasználói_kézikönyv.pdf

Re: URIEncoding problem ver 6.0.29 64 bit on windows

2010-12-10 Thread imrezol
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 wrote: > Hi! > > I set URIEncoding="UTF-8" at http connector in server.xml: > > connectionTimeout="2" >redir

Re: URIEncoding UTF-16 problem

2008-08-18 Thread Christopher Schultz
-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 stri

Re: URIEncoding UTF-16 problem

2008-08-15 Thread André Warnier
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... --

Re: URIEncoding UTF-16 problem

2008-08-15 Thread André Warnier
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 r

Re: URIEncoding UTF-16 problem

2008-08-15 Thread Christopher Schultz
-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 th

Re: URIEncoding UTF-16 problem

2008-08-15 Thread André Warnier
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 t

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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 of

RE: URIEncoding

2007-07-26 Thread Caldarale, Charles R
> 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

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
Caldarale, Charles R a écrit : Once again, it's available via the MBean that Tomcat creates for each 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. -

RE: URIEncoding

2007-07-26 Thread Caldarale, Charles R
> 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 element. - Chuck THIS COMMUNICATION MAY

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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 (in

Re: URIEncoding

2007-07-26 Thread Christopher Schultz
-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

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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 :) request.getCharacterEnc

Re: URIEncoding

2007-07-26 Thread Christopher Schultz
-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

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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 URIEncoding. The request character encoding determines in wich character encodig the parameters v

Re: URIEncoding

2007-07-26 Thread Christopher Schultz
-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 bro

Re: URIEncoding

2007-07-26 Thread Christopher Schultz
-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 cod

Re: URIEncoding

2007-07-26 Thread Christopher Schultz
-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 w

RE: URIEncoding

2007-07-26 Thread Caldarale, Charles R
> 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 i

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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 al

RE: URIEncoding

2007-07-26 Thread Caldarale, Charles R
> 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 already has

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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

Re: URIEncoding

2007-07-26 Thread Pulkit Singhal
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 String((HttpSer

Re: URIEncoding

2007-07-26 Thread Frederic Bastian
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 HttpServletRequest.g

Re: URIEncoding

2007-07-26 Thread Pulkit Singhal
Hi Frederic, I don't know about HttpSession. 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 ne

Re: URIEncoding and POSTS

2006-09-13 Thread Mark Thomas
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. > > W

RE: URIEncoding and POSTS

2006-09-12 Thread Derrick Koes
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); request.setCharacterEn