Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » URL encoding not properly handled in RWT.getRequest.getParameter()?
URL encoding not properly handled in RWT.getRequest.getParameter()? [message #131360] Tue, 05 May 2009 08:11 Go to next message
Eclipse UserFriend
Originally posted by: admin.kabe-farben.ch

Hi

i think URL encoding is not properly handled in
RWT.getRequest.getParameter() / getParameterMap().

Example:
Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
encoding: Système de peintures de façades)
Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de peintures de
fa\ufffdades

Any suggetions for a workaround?

Thanks
Andrej
Re: URL encoding not properly handled in RWT.getRequest.getParameter()? [message #131475 is a reply to message #131360] Tue, 05 May 2009 17:37 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Andrej,

the methods you mention are defined in HttpServletRequest and thus
are part of the servlet-engine. if you suspect the error to be there
you would need to forward the problem report to the servlet-engine
implementor.

On the client-side, all request parameters that are sent by RAP
itself are encoded using the encodeURIComponent().

If this doesn't clarify things, please give an example and/or
describe more exactly what you are doing.

HTH
Rüdiger

Andrej Dimic wrote:
> Hi
>
> i think URL encoding is not properly handled in
> RWT.getRequest.getParameter() / getParameterMap().
>
> Example:
> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
> encoding: Système de peintures de façades)
> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de peintures de
> fa\ufffdades
>
> Any suggetions for a workaround?
>
> Thanks
> Andrej
>
Antw: Re: URL encoding not properly handled in RWT.getRequest.getParameter ()? [message #131594 is a reply to message #131475] Wed, 06 May 2009 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: admin.kabe-farben.ch

Hi Rüdiger

what i'am trying to say is that special characters like é, è, à and the
like that are passed as part of a URL are all returned as Unicode \ufffd
when fetched with RWT.getRequest().getParameter(). And i do not have any
clue why.
I believe that i did encode the characters correctly in the URL (i.E. è as
%E8).

we are running tomcat 6.0.18 on a Linux box. I can hardly imagine that it
has to do with the servlet-engine (tomcat).

Maybe you have a suggestion where to start looking at.

Thanks
Andrej


>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 05.05.2009 um
19:37 in Nachricht <gtptgq$jut$1@build.eclipse.org>:
> Andrej,
>
> the methods you mention are defined in HttpServletRequest and thus
> are part of the servlet-engine. if you suspect the error to be there
> you would need to forward the problem report to the servlet-engine
> implementor.
>
> On the client-side, all request parameters that are sent by RAP
> itself are encoded using the encodeURIComponent().
>
> If this doesn't clarify things, please give an example and/or
> describe more exactly what you are doing.
>
> HTH
> Rüdiger
>
> Andrej Dimic wrote:
>> Hi
>>
>> i think URL encoding is not properly handled in
>> RWT.getRequest.getParameter() / getParameterMap().
>>
>> Example:
>> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
>> encoding: SystÃ̈me de peintures de façades)
>> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de peintures

> de
>> fa\ufffdades
>>
>> Any suggetions for a workaround?
>>
>> Thanks
>> Andrej
>>
Re: Antw: Re: URL encoding not properly handled in RWT.getRequest.getParameter ()? [message #131654 is a reply to message #131594] Wed, 06 May 2009 20:41 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Andrej Dimic wrote:
> Hi Rüdiger
>
> what i'am trying to say is that special characters like é, è, à and the
> like that are passed as part of a URL are all returned as Unicode \ufffd
> when fetched with RWT.getRequest().getParameter(). And i do not have any
> clue why.
> I believe that i did encode the characters correctly in the URL (i.E. è as
> %E8).
I still don't understand what you are actually doing. Could you post
some code?

>
> we are running tomcat 6.0.18 on a Linux box. I can hardly imagine that it
> has to do with the servlet-engine (tomcat).
Did you try a different servlet-engine or from within the IDE?

>
> Maybe you have a suggestion where to start looking at.
>
> Thanks
> Andrej
>
>
>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 05.05.2009 um
> 19:37 in Nachricht <gtptgq$jut$1@build.eclipse.org>:
>> Andrej,
>>
>> the methods you mention are defined in HttpServletRequest and thus
>> are part of the servlet-engine. if you suspect the error to be there
>> you would need to forward the problem report to the servlet-engine
>> implementor.
>>
>> On the client-side, all request parameters that are sent by RAP
>> itself are encoded using the encodeURIComponent().
>>
>> If this doesn't clarify things, please give an example and/or
>> describe more exactly what you are doing.
>>
>> HTH
>> Rüdiger
>>
>> Andrej Dimic wrote:
>>> Hi
>>>
>>> i think URL encoding is not properly handled in
>>> RWT.getRequest.getParameter() / getParameterMap().
>>>
>>> Example:
>>> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
>>> encoding: SystÃ̈me de peintures de façades)
>>> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de peintures
>
>> de
>>> fa\ufffdades
>>>
>>> Any suggetions for a workaround?
>>>
>>> Thanks
>>> Andrej
>>>
Re: Antw: Re: URL encoding not properly handled in RWT.getRequest.getParameter ()? [message #131664 is a reply to message #131654] Thu, 07 May 2009 06:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: admin.kabe-farben.ch

Hi Rüdiger

You can go on "www.kabe-farben.ch", then on "Baufarben / Putze".
In the left menu click on "Produkte".
Then Click on [FR] so the page changes to french.
All links are references to an RAP-Application. As you can see there are
special characters that must be encoded (the same as the text on the
web-page).
Such encoded characters will all be returned with unicode \ufffd by
RWT.getRequest().getParameter in the RAP-Application.

So we had to set placeholders like /e1, /e2 and the like so we are able to
translate back in the RAP-Application

Thanks
Andrej


>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 06.05.2009 um
22:41 in Nachricht <gtssl5$m81$1@build.eclipse.org>:
> Andrej Dimic wrote:
>> Hi Rüdiger
>>
>> what i'am trying to say is that special characters like é, Ã̈, Ã
and
> the
>> like that are passed as part of a URL are all returned as Unicode \ufffd
>> when fetched with RWT.getRequest().getParameter(). And i do not have any
>> clue why.
>> I believe that i did encode the characters correctly in the URL (i.E.
Ã̈
> as
>> %E8).
> I still don't understand what you are actually doing. Could you post
> some code?
>
>>
>> we are running tomcat 6.0.18 on a Linux box. I can hardly imagine that
> it
>> has to do with the servlet-engine (tomcat).
> Did you try a different servlet-engine or from within the IDE?
>
>>
>> Maybe you have a suggestion where to start looking at.
>>
>> Thanks
>> Andrej
>>
>>
>>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 05.05.2009
um
>> 19:37 in Nachricht <gtptgq$jut$1@build.eclipse.org>:
>>> Andrej,
>>>
>>> the methods you mention are defined in HttpServletRequest and thus
>>> are part of the servlet-engine. if you suspect the error to be there
>>> you would need to forward the problem report to the servlet-engine
>>> implementor.
>>>
>>> On the client-side, all request parameters that are sent by RAP
>>> itself are encoded using the encodeURIComponent().
>>>
>>> If this doesn't clarify things, please give an example and/or
>>> describe more exactly what you are doing.
>>>
>>> HTH
>>> Rüdiger
>>>
>>> Andrej Dimic wrote:
>>>> Hi
>>>>
>>>> i think URL encoding is not properly handled in
>>>> RWT.getRequest.getParameter() / getParameterMap().
>>>>
>>>> Example:
>>>> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
>>>> encoding: SystÃ̈me de peintures de façades)
>>>> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de
peintures
>>
>>> de
>>>> fa\ufffdades
>>>>
>>>> Any suggetions for a workaround?
>>>>
>>>> Thanks
>>>> Andrej
>>>>
Re: URL encoding not properly handled in RWT.getRequest.getParameter()? [message #131673 is a reply to message #131360] Thu, 07 May 2009 07:24 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi,

that looks strange. Have you checked your Tomcat encoding settings? In
the server.xml you can configure the URIEncoding for each connector.
Maybe that helps?

As Rüdiger says, it would be a good start to check if this also happens
with Jetty or another container.

Regards,
Stefan.

Andrej Dimic schrieb:
> Hi
>
> i think URL encoding is not properly handled in
> RWT.getRequest.getParameter() / getParameterMap().
>
> Example:
> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
> encoding: SystÚme de peintures de façades)
> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de peintures de
> fa\ufffdades
>
> Any suggetions for a workaround?
>
> Thanks
> Andrej
>
Re: Antw: Re: URL encoding not properly handled in RWT.getRequest.getParameter ()? [message #131683 is a reply to message #131664] Thu, 07 May 2009 07:52 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Andrej,

I still can't see any wrong encodings. All french special characters
appear as they should.
Anyway, did you make sure that encodings are handled correctly while
building? See here for example:
http://wiki.eclipse.org/RAP/FAQ#Why_are_there_encoding_issue s_after_deploying_my_RAP_application_as_a_WAR.3F

HTH
Rüdiger

Andrej Dimic wrote:
> Hi Rüdiger
>
> You can go on "www.kabe-farben.ch", then on "Baufarben / Putze".
> In the left menu click on "Produkte".
> Then Click on [FR] so the page changes to french.
> All links are references to an RAP-Application. As you can see there are
> special characters that must be encoded (the same as the text on the
> web-page).
> Such encoded characters will all be returned with unicode \ufffd by
> RWT.getRequest().getParameter in the RAP-Application.
>
> So we had to set placeholders like /e1, /e2 and the like so we are able to
> translate back in the RAP-Application
>
> Thanks
> Andrej
>
>
>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 06.05.2009 um
> 22:41 in Nachricht <gtssl5$m81$1@build.eclipse.org>:
>> Andrej Dimic wrote:
>>> Hi Rüdiger
>>>
>>> what i'am trying to say is that special characters like é, Ã̈, Ã
> and
>> the
>>> like that are passed as part of a URL are all returned as Unicode \ufffd
>>> when fetched with RWT.getRequest().getParameter(). And i do not have any
>>> clue why.
>>> I believe that i did encode the characters correctly in the URL (i.E.
> Ã̈
>> as
>>> %E8).
>> I still don't understand what you are actually doing. Could you post
>> some code?
>>
>>> we are running tomcat 6.0.18 on a Linux box. I can hardly imagine that
>> it
>>> has to do with the servlet-engine (tomcat).
>> Did you try a different servlet-engine or from within the IDE?
>>
>>> Maybe you have a suggestion where to start looking at.
>>>
>>> Thanks
>>> Andrej
>>>
>>>
>>>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 05.05.2009
> um
>>> 19:37 in Nachricht <gtptgq$jut$1@build.eclipse.org>:
>>>> Andrej,
>>>>
>>>> the methods you mention are defined in HttpServletRequest and thus
>>>> are part of the servlet-engine. if you suspect the error to be there
>>>> you would need to forward the problem report to the servlet-engine
>>>> implementor.
>>>>
>>>> On the client-side, all request parameters that are sent by RAP
>>>> itself are encoded using the encodeURIComponent().
>>>>
>>>> If this doesn't clarify things, please give an example and/or
>>>> describe more exactly what you are doing.
>>>>
>>>> HTH
>>>> Rüdiger
>>>>
>>>> Andrej Dimic wrote:
>>>>> Hi
>>>>>
>>>>> i think URL encoding is not properly handled in
>>>>> RWT.getRequest.getParameter() / getParameterMap().
>>>>>
>>>>> Example:
>>>>> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades (without
>>>>> encoding: SystÃ̈me de peintures de façades)
>>>>> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de
> peintures
>>>> de
>>>>> fa\ufffdades
>>>>>
>>>>> Any suggetions for a workaround?
>>>>>
>>>>> Thanks
>>>>> Andrej
>>>>>
Re: Antw: Re: URL encoding not properly handled in RWT.getRequest.getParameter ()? [message #131736 is a reply to message #131683] Thu, 07 May 2009 12:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: admin.kabe-farben.ch

Rüdiger

I try to explain otherwise:

Suppose you call an RAP Class named RapMain implementing IEntryPoint with
something like http://web-site.com?param1=<value> and <value> includes
correctly URI-encoded special characters.

In RapMain you code "String x=RWT.getRequest().getParameter(param1);".

In x, all special characters are represented by \ufffd.

That is the situation we are facing.

Thanks
Andrej


>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 07.05.2009 um
09:52 in Nachricht <gtu407$pqe$1@build.eclipse.org>:
> Andrej,
>
> I still can't see any wrong encodings. All french special characters
> appear as they should.
> Anyway, did you make sure that encodings are handled correctly while
> building? See here for example:
> http://wiki.eclipse.org/RAP/FAQ#Why_are_there_encoding_issue s_after_depl
> oying_my_RAP_application_as_a_WAR.3F
>
> HTH
> Rüdiger
>
> Andrej Dimic wrote:
>> Hi Rüdiger
>>
>> You can go on "www.kabe-farben.ch", then on "Baufarben / Putze".
>> In the left menu click on "Produkte".
>> Then Click on [FR] so the page changes to french.
>> All links are references to an RAP-Application. As you can see there are
>> special characters that must be encoded (the same as the text on the
>> web-page).
>> Such encoded characters will all be returned with unicode \ufffd by
>> RWT.getRequest().getParameter in the RAP-Application.
>>
>> So we had to set placeholders like /e1, /e2 and the like so we are able
> to
>> translate back in the RAP-Application
>>
>> Thanks
>> Andrej
>>
>>
>>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 06.05.2009
um
>> 22:41 in Nachricht <gtssl5$m81$1@build.eclipse.org>:
>>> Andrej Dimic wrote:
>>>> Hi Rüdiger
>>>>
>>>> what i'am trying to say is that special characters like é,
Ã̈, Ã
>> and
>>> the
>>>> like that are passed as part of a URL are all returned as Unicode
\ufffd
>>>> when fetched with RWT.getRequest().getParameter(). And i do not have
any
>>>> clue why.
>>>> I believe that i did encode the characters correctly in the URL (i.E.
>> Ã̈
>>> as
>>>> %E8).
>>> I still don't understand what you are actually doing. Could you post
>>> some code?
>>>
>>>> we are running tomcat 6.0.18 on a Linux box. I can hardly imagine that

>>> it
>>>> has to do with the servlet-engine (tomcat).
>>> Did you try a different servlet-engine or from within the IDE?
>>>
>>>> Maybe you have a suggestion where to start looking at.
>>>>
>>>> Thanks
>>>> Andrej
>>>>
>>>>
>>>>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am
05.05.2009
>> um
>>>> 19:37 in Nachricht <gtptgq$jut$1@build.eclipse.org>:
>>>>> Andrej,
>>>>>
>>>>> the methods you mention are defined in HttpServletRequest and thus
>>>>> are part of the servlet-engine. if you suspect the error to be there
>>>>> you would need to forward the problem report to the servlet-engine
>>>>> implementor.
>>>>>
>>>>> On the client-side, all request parameters that are sent by RAP
>>>>> itself are encoded using the encodeURIComponent().
>>>>>
>>>>> If this doesn't clarify things, please give an example and/or
>>>>> describe more exactly what you are doing.
>>>>>
>>>>> HTH
>>>>> Rüdiger
>>>>>
>>>>> Andrej Dimic wrote:
>>>>>> Hi
>>>>>>
>>>>>> i think URL encoding is not properly handled in
>>>>>> RWT.getRequest.getParameter() / getParameterMap().
>>>>>>
>>>>>> Example:
>>>>>> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades
(without
>>>>>> encoding: SystÃ̈me de peintures de
façades)
>>>>>> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de
>> peintures
>>>>> de
>>>>>> fa\ufffdades
>>>>>>
>>>>>> Any suggetions for a workaround?
>>>>>>
>>>>>> Thanks
>>>>>> Andrej
>>>>>>
Re: Antw: Re: URL encoding not properly handled in RWT.getRequest.getParameter ()? [message #132005 is a reply to message #131736] Fri, 08 May 2009 15:31 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Andrej,

this took quite a while, but now I understand you. But unfortunately
I don't know much about this topic.
The HttpServletRequest is implemented by the servlet container. I
would suggest to post this question on the Tomcat or Jetty
newsgroup: Maybe there is someone that can help.
In case there is a solution to this, please share it here.

Thanks
Rüdiger

Andrej Dimic wrote:
> Rüdiger
>
> I try to explain otherwise:
>
> Suppose you call an RAP Class named RapMain implementing IEntryPoint with
> something like http://web-site.com?param1=<value> and <value> includes
> correctly URI-encoded special characters.
>
> In RapMain you code "String x=RWT.getRequest().getParameter(param1);".
>
> In x, all special characters are represented by \ufffd.
>
> That is the situation we are facing.
>
> Thanks
> Andrej
>
>
>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 07.05.2009 um
> 09:52 in Nachricht <gtu407$pqe$1@build.eclipse.org>:
>> Andrej,
>>
>> I still can't see any wrong encodings. All french special characters
>> appear as they should.
>> Anyway, did you make sure that encodings are handled correctly while
>> building? See here for example:
>> http://wiki.eclipse.org/RAP/FAQ#Why_are_there_encoding_issue s_after_depl
>> oying_my_RAP_application_as_a_WAR.3F
>>
>> HTH
>> Rüdiger
>>
>> Andrej Dimic wrote:
>>> Hi Rüdiger
>>>
>>> You can go on "www.kabe-farben.ch", then on "Baufarben / Putze".
>>> In the left menu click on "Produkte".
>>> Then Click on [FR] so the page changes to french.
>>> All links are references to an RAP-Application. As you can see there are
>>> special characters that must be encoded (the same as the text on the
>>> web-page).
>>> Such encoded characters will all be returned with unicode \ufffd by
>>> RWT.getRequest().getParameter in the RAP-Application.
>>>
>>> So we had to set placeholders like /e1, /e2 and the like so we are able
>> to
>>> translate back in the RAP-Application
>>>
>>> Thanks
>>> Andrej
>>>
>>>
>>>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am 06.05.2009
> um
>>> 22:41 in Nachricht <gtssl5$m81$1@build.eclipse.org>:
>>>> Andrej Dimic wrote:
>>>>> Hi Rüdiger
>>>>>
>>>>> what i'am trying to say is that special characters like é,
> Ã̈, Ã
>>> and
>>>> the
>>>>> like that are passed as part of a URL are all returned as Unicode
> \ufffd
>>>>> when fetched with RWT.getRequest().getParameter(). And i do not have
> any
>>>>> clue why.
>>>>> I believe that i did encode the characters correctly in the URL (i.E.
>>> Ã̈
>>>> as
>>>>> %E8).
>>>> I still don't understand what you are actually doing. Could you post
>>>> some code?
>>>>
>>>>> we are running tomcat 6.0.18 on a Linux box. I can hardly imagine that
>
>>>> it
>>>>> has to do with the servlet-engine (tomcat).
>>>> Did you try a different servlet-engine or from within the IDE?
>>>>
>>>>> Maybe you have a suggestion where to start looking at.
>>>>>
>>>>> Thanks
>>>>> Andrej
>>>>>
>>>>>
>>>>>>>> Rüdiger Herrmann<rherrmann@eclipsesource.com> schrieb am
> 05.05.2009
>>> um
>>>>> 19:37 in Nachricht <gtptgq$jut$1@build.eclipse.org>:
>>>>>> Andrej,
>>>>>>
>>>>>> the methods you mention are defined in HttpServletRequest and thus
>>>>>> are part of the servlet-engine. if you suspect the error to be there
>>>>>> you would need to forward the problem report to the servlet-engine
>>>>>> implementor.
>>>>>>
>>>>>> On the client-side, all request parameters that are sent by RAP
>>>>>> itself are encoded using the encodeURIComponent().
>>>>>>
>>>>>> If this doesn't clarify things, please give an example and/or
>>>>>> describe more exactly what you are doing.
>>>>>>
>>>>>> HTH
>>>>>> Rüdiger
>>>>>>
>>>>>> Andrej Dimic wrote:
>>>>>>> Hi
>>>>>>>
>>>>>>> i think URL encoding is not properly handled in
>>>>>>> RWT.getRequest.getParameter() / getParameterMap().
>>>>>>>
>>>>>>> Example:
>>>>>>> Parameter-Value: Syst%E8me%20de%20peintures%20de%20fa%E7ades
> (without
>>>>>>> encoding: SystÃ̈me de peintures de
> façades)
>>>>>>> Return-Value of RWT.getRequest.getParaemter(): Syst\ufffdme de
>>> peintures
>>>>>> de
>>>>>>> fa\ufffdades
>>>>>>>
>>>>>>> Any suggetions for a workaround?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Andrej
>>>>>>>
Previous Topic:Undeploying RAP Application on Tomcat
Next Topic:Minor renamings in theming
Goto Forum:
  


Current Time: Fri Apr 19 09:02:13 GMT 2024

Powered by FUDForum. Page generated in 0.01852 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top