cancel
Showing results for 
Search instead for 
Did you mean: 

getRequestParameter with encoded url

Former Member
0 Kudos

Hi everybody,

i'm trying to get a parameter in the url but this is a folder path so it's encoded.

The url have /EDPonto/EDPonto/1%AA%20P%E1gina/Servi%E7os but I need /EDPonto/EDPonto/1ª Página/Serviços

I'm using WDWebContextAdapter.getWebContextAdapter().getRequestParameter(...) but what I get is /EDPonto/EDPonto/1Pgina/Servios... The encoded chars disapear at all.

Anybody have an idea how to solve this?

Thanks in advance.

Best Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello, Tiago.

Could you provide more information? How do you pass this parameter to URL?

Thanks, Mikhail

Former Member
0 Kudos

Hello Mikhail,

I'm passing the param to url by pure text (for now and just for test). But this I'll be called by a javascript function so the pratical result will be the same: without getting this parameter from the URL my application will not run.

The code that I have in webdynpro is:


// TODO get folder by param
String param = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("folder");

The url is (...)/appName?folder=/EDPonto/EDPonto/1%AA%20P%E1gina/Servi%E7os

What I get in webdynpro is param = /EDPonto/EDPonto/1Pina/Servios (the codified chars disapear) and I need something like param = /EDPonto/EDPonto/1ª Página/Serviços or even /EDPonto/EDPonto/1%AA%20P%E1gina/Servi%E7os...

Thanks in advance.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello everybody,

I solved my problem. The solution is to codify the url in UTF-8 chars like:

/EDPonto/EDPonto/1%C2%AA+P%C3%A1gina/Servi%C3%A7os

When you don't know (or don't wont to search on the web) you can do:

URLEncoder.encode(string_to_codify,"UTF-8")

Thanks for make me think a little bit more. 😛