Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to get "/r/n" in servlet after decoding a escaped URL

843841Oct 13 2006 — edited Oct 13 2006
I am creating a servlet request in Javascript and need to send "/r/n" as value for one request parameter.

So I am doing escape(myURL) in Javascript and sending it to servlet.
escape converts "/r/n" to "%0D%0A".
Now in servlet I am using URLDecoder.decode() with UTF-8 but this translates these chars to "ctrl M".
I am not sure which char encoding type I should use to get "/r/n" chars back in servlets or any other way to do this job.

Any pointers highly appericated.
TIA,Sachin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2006
Added on Oct 13 2006
2 comments
198 views