servlets - request.getParameter and request.getQueryString yield incompatible results? -


this question has answer here:

in jetty server log, observe following:

07 jan 2016 10:03:52,605 debug ws.ducchandlerproxy - n/a handle (get /ducc-servlet/file-contents?fname=/home/degenaro/ducc/logs/1/x+y+z.log&page=1)

07 jan 2016 10:03:52,605 debug ws.ducchandler - n/a handleduccservletfilecontents qs:fname=/home/degenaro/ducc/logs/1/x+y+z.log&page=1

07 jan 2016 10:03:52,605 debug ws.ducchandler - n/a handleduccservletfilecontents fn:/home/degenaro/ducc/logs/1/x y z.log

the code corresponding last 2 entries comprise results of request.getquerystring() , request.getparameter("fname") respectively.

how come latter loses '+' character?

when call request.getquerystring() query string in url bar. when call request.getparameter("fname") value of parameter encoded symbols decoded. + in url parameter represents space, decoded space.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -