If you take a look at the API docs for ServletRequest.setCharacterEncoding(), they say
"This method must be called prior to reading request parameters or reading input
using getReader()."
By the time execution gets to your JSP page, something has probably read your
request parameters - maybe
Thanks Mikolaj. That did it.
For some reason running request.setCharacterEncoding("UTF-8") in my code
does nothing, but if it gets run from a Filter it works great.
Tim Koop
Mikolaj Rydzewski wrote:
Tim Koop wrote:
I have a web page form that is expecting UTF-8 data, but when my code
g
Tim Koop wrote:
I have a web page form that is expecting UTF-8 data, but when my code
gets the data, the getParameter() methods don't return the right
thing. I have to run this code to get the right thing:
String value = new
String(request.getParameter("fieldName").getBytes("ISO-8859-1"),
Try saving the JSP-File itself as UTF-8.
Worked for me at a similar Problem.
- ms
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks Mark.
I entered "Tübingen" and I got back "Data posted to this form was:
Tübingen". localhost_log also has "Tübingen"
It does this for both port 8080 (Tomcat directly), and port 80 (through
Apache).
I checked the Tomcat 4.1.31 release notes
(http://apache.sunsite.ualberta.ca/jaka
Tim Koop wrote:
I have a web page form that is expecting UTF-8 data, but when my code
gets the data, the getParameter() methods don't return the right thing.
In server.xml, I have added these lines to each Connector:
URIEncoding="UTF-8" useBodyEncodingForURI="false"
(I have also tried use
rs List" <[EMAIL PROTECTED]>
To: 'Tomcat Users List' <[EMAIL PROTECTED]>
Subject: RE: request parameter
Date: Wed, 11 Feb 2004 11:58:54 -0500
are you using the isapi filter?
post and get parameters or just get?
-Original Message-
From: Ricardo de Souza Mour
This has appeared on the list before. Without being 100% (better search the
list) it
had to do with the fact, that the person having the issues was using a JK2
binary...
Don't take my word though, search the list.
-Original Message-
From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]
are you using the isapi filter?
post and get parameters or just get?
-Original Message-
From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 11:50 AM
To: [EMAIL PROTECTED]
Subject: request parameter
Have somebody ever had problem with request paramete
Vijay Kandy [mailto:[EMAIL PROTECTED]
>Sent: Friday, August 15, 2003 12:37 PM
>To: 'Tomcat Users List'
>Subject: RE: Request parameter value containing = is not parsed well
>
>Thank you for your testing. So did you URLEncode the param value? Is
there
>a
>trick not to URL
You are right. That's where I have an issue. Thank you.
Vijay
-Original Message-
From: Hans Wichman [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2003 11:10 AM
To: Tomcat Users List; 'Tomcat Users List'
Subject: Re: Request parameter value containing = is not
Thank you for your testing. So did you URLEncode the param value? Is there a
trick not to URLEncode and still retain the value. Because was alright on
3.2.3.
Sincerely,
vijay
Howdy,
I don't know (and don't really care much about at this point) 4.0.4, but
I can't reproduce what you claim on 4.1.27.
Hi
= encoded is %3D, so that's where you are missing something I think.
greetz
Hans
At 10:41 15/08/2003 -0500, Vijay Kandy wrote:
Hello All,
I have a servlet whose expected parameter is ZAZBZ and its value is
CZlYnXtAIBDC=D9W7V
So calling http://host/context/name?ZAZBZ=CZlYnXtAIBDC=D9W7V would cau
Howdy,
I don't know (and don't really care much about at this point) 4.0.4, but
I can't reproduce what you claim on 4.1.27. The behavior is correct
with equal signs in param value, they are retained.
Yoav Shapira
Millennium ChemInformatics
>-Original Message-
>From: Vijay Kandy [mailto
> To: Tomcat Users List
> Subject: Re: request parameter question ...
>
>
> I guess if i use setAttribute ... i have to use getAttribute
> ... thats
> the reason i get the blank string .. coz i was using getParameter
>
> my problem is that the jsp uses getParameter ... it w
Mufaddal Khumri wrote:
I guess if i use setAttribute ... i have to use getAttribute ... thats
the reason i get the blank string .. coz i was using getParameter
my problem is that the jsp uses getParameter ... it would have been good
if i could have used the same method regardless as how the pa
using a forward. Both these will set a parameter that you can read with
getParameter.
-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:02 AM
To: Tomcat Users List
Subject: Re: request parameter question ...
I guess if i use setAttribute
: Wednesday, March 26, 2003 1:02 AM
To: Tomcat Users List
Subject: Re: request parameter question ...
I guess if i use setAttribute ... i have to use getAttribute ... thats
the reason i get the blank string .. coz i was using getParameter
my problem is that the jsp uses getParameter ... it would
then I would suggest to make your servlet into a jsp page, and that way you can use
the jsp:forward to pass parameters
Filip
> -Original Message-
> From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 1:02 AM
> To: Tomcat Users List
> Subje
I guess if i use setAttribute ... i have to use getAttribute ... thats
the reason i get the blank string .. coz i was using getParameter
my problem is that the jsp uses getParameter ... it would have been
good if i could have used the same method regardless as how the
parameter was set.
On Thu
Mufaddal Khumri wrote:
Hi ,
I tried using
request.setAttribute("name", "newName");
try
{
String path = "/SomeJSP.jsp"
getServletConfig().getServletContext().getRequestDispatcher(path).forwar
d(request, response);
}
catch(Exception ex)
{
ex.printStackTrace();
}
When i do a reque
Hi ,
I tried using
request.setAttribute("name", "newName");
try
{
String path = "/SomeJSP.jsp"
getServletConfig().getServletContext().getRequestDispatcher(path).forwar
d(request, response);
}
catch(Exception ex)
{
ex.printStackTrace();
}
When i do a request.getParameter in my JSP page ..
Mufaddal Khumri wrote:
if(str.equals("xyz") == true)
{
str = "ChangedName";
request.setParameter("name", str); // <-
how do i do this ??? There is no method as request.setParameter()
}
[...]
one way to do it would be to append the parameter and its changed v
that is what request.setAttribute is there for.
you can also look at JSP forward, that allows you to set parameters, not sure how this
translates to a servlet
http://java.sun.com/products/jsp/syntax/1.1/syntaxref1110.html
filip
> -Original Message-
> From: Mufaddal Khumri [mailto:[EMA
24 matches
Mail list logo