#1 2008-07-11 13:25:04

jayanth
Member
Registered: 2008-06-13
Posts: 11

URL encode

Tags: [encoding, url]

hi,
  i will be getting a value from database and put the value in the url of the FileFetch step and downloading the file.
will it be possible to encode url for the value fetched from the database.

please help.

thanks
jayanth

Offline

#2 2008-07-11 14:43:16

Theo
Member
Registered: 2008-03-26
Posts: 71

Re: URL encode

Don't know why you want to encode the URL for tFileFetch, but here's how it should work:

Put java.net.URLEncoder.encode(yourString, "UTF-8") around the string you want to encode. Tested inside a tMap, works fine (for example "www.test.de/index.php?t=1&m=2" becomes "www.test.de%2Findex.php%3Ft%3D1%26m%3D2").



Regards,
Theo

Last edited by Theo (2008-07-11 14:47:29)

Offline

Board footer

Powered by FluxBB