request.getParameter() with special characters
843835Jan 3 2003 — edited Jan 4 2003Hi,
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.