File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes getting parameters from the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "getting parameters from the URL" Watch "getting parameters from the URL" New topic
Author

getting parameters from the URL

Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Hi

I found the code below using google which works fine but i don't understand it. now unfortunately i've hit a problem; one of my parameters has an & in it. this has been escaped to & but the code below just picks out the & and my program breaks down.

Could someone explain the code please.

Frank


[ March 24, 2005: Message edited by: Eric Pascarello ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
How is the code being escaped?

The & should be escape to %27 and it would make your life easier.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60998
    
  65

Eric ic correct. There is a big difference between URL encoding and HTML encoding.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
I'm not entirely sure how the & is being escaped. I use cocoon and it's serverpages technology. I query a database table and put the returned results into a list box. Viewing the source of this page I can see that any record containing an & has this escaped to &

Frank
 
Don't get me started about those stupid light bulbs.
 
subject: getting parameters from the URL