This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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


Win a copy of Building Microservices this week in the Design forum!
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: 141
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: 15385
    
    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: 63227
    
  69

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: 141
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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: getting parameters from the URL
 
It's not a secret anymore!