• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using double quote in passing parameter

 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I invoke a servlet from URL, should or should not I use double quote to wrap the parameter ? for example,

http://myservlet/myaction?param1="abc"¶m2="2"¶m3="7"

I notice sometimes both ways work. But what's the rule for passing parameters from URL ?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't use them. Parameters are separated by either the ampersand or the end of the string. That's enough for the container to know how to split the parameters.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No quotes unless you want them to be part of the passed value (in which case they should be URL-encoded in any case).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic