This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes using double quote in passing parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "using double quote in passing parameter" Watch "using double quote in passing parameter" New topic

using double quote in passing parameter

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
When I invoke a servlet from URL, should or should not I use double quote to wrap the parameter ? for example,


I notice sometimes both ways work. But what's the rule for passing parameters from URL ?
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
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.

JDBCSupport - An easy to use, light-weight JDBC framework -
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63211

No quotes unless you want them to be part of the passed value (in which case they should be URL-encoded in any case).

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Have you checked out Aspose?
subject: using double quote in passing parameter
It's not a secret anymore!