I am using jsps and in my url I have a value for a variable like say "L & T". Now when I try to retrieve the value for it by using request.getParameter
I get only "L". It recognizes "&" as a separator and thus it is not getting considered as a whole string.
How do I solve this problem?
Some common synonyms of escape are avoid, elude, eschew, evade, and shun. While all these words mean "to get away or keep away from something," escape stresses the fact of getting away or being passed by not necessarily through effort or by conscious intent.
a defensive reaction involving the use of fantasy as a means of avoiding conflicts and problems of daily living. See also flight from reality.
If certain animals are unable to migrate, they respond to unfavourable abiotic stress by "escaping in time". This means that instead of migrating to some other place , they avoid unfavourable conditions by staying in the same place but by hiding or sleeping .
Definition of escapee : one that has escaped especially : an escaped prisoner.
java.net.URLEncoder.encode("L & T", "utf8")
this outputs the URL-encoded, which is fine as a GET parameter:
L+%26+T
A literal ampersand in a URL should be encoded as: %26
// Your URL
http://www.example.com?a=l&t
// Encoded
http://www.example.com?a=l%26t
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With