Hi all, I want to set a jsp parameter to an attribute value which may contain special symbols, then use a form GET
submit to pass the parameter to a servlet controller. For example, the parameter is:
<input type="hidden" name="searchTerms" value="${sessionScope.combTerms}"></input>
I noticed if sessionScope.combTerms
contains double quotes, eg. location:"LOC1"
, the controller will only receive the value of searchTerms
to be location:
in which the LOC1"
disappeared. What should I do to make sure whatever string in sessionScope.combTerms
is passed to the controller correctly? Thanks in advance.