• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat 6 no parsing request parameters with &

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, this must be simple but it is killing me....
i need to make tomcat parse the following url
http://ctkdevas1.explab.mobi:8080/ctk/test.jsp?q=hello&r=goodbye
try the link - it returns "r=null"
when i send in the following link -
http://ctkdevas1.explab.mobi:8080/ctk/test.jsp?q=hello&r=goodbye
it returns "r=goodbye"
i need to use UrlEncoding Why is this not working
The test.jsp is as below
 
Harry Brearley
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please note - the URL's look the same but the one that does not work uses the urlEncoding for & e.g.

please try for yourselves
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you click on them in here, they don't just look the same.
They are the same.

UBB actually creates a link with the parsed version.


You shouldn't URL encode the whole querystring.
You should URL encode the parts of the querystring and then paste them together with the control characters (& and ?) as your separators.

If you url encode the whole string, the encoder will escape the control character which stops them from being control characters.
 
What's that smell? Hey, sniff this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic