I am trying to get the request parameter which has ‘&’ sybol in starting like:-
http://localhost:8080/simple.jsp?my=&234587
On other page I’m getting it like String value=request.getParameter("my");
value.substring(0,4);
I want to get &234, please suggest i am not getting any value.
Thanks,
Ars
In this example you have not one, but two parameters:
234is not a value here. The&separates query parameters. If you need that ampersand to be part of the value ofmy, it needs to be escaped in the URL as%26.