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!

request.getParameter() with special characters

843835Jan 3 2003 — edited Jan 4 2003
Hi,

There are many post regarding to this issue, and the solution is to encode/decode the value. But seems that it doesn't work on my case ...

Here is my problem:
In servlet:
getServletConfig().getServletContext().getRequestDispatcher(
res.encodeURL("/test.jsp?param1=%^^abc")).include(req, res);

While in JSP page, request.getParameter("param1") only returns "abc"!

What I don't understand is if I set the value of parameter to "%^&=abc", e.g. In servlet:
getServletConfig().getServletContext().getRequestDispatcher(
res.encodeURL("/test.jsp?param1=%^&=abc")).include(req, res);
I can get the correct value of parameter("param1") in JSP page.

Any suggestion?

Thanks a lot!

Mag.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2003
Added on Jan 3 2003
3 comments
1,103 views