This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes '%' Character on the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark " Watch " New topic
Author

'%' Character on the URL

Mohammad Jaber
Ranch Hand

Joined: Apr 10, 2006
Posts: 46
hi ,
how can i send a parameter equals to '%' through the URL , '%' considered as a white space on the browser , is there a way to escape it or to change the browsers behavior .. thanks in advance


OCP , SCJP 5.0
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
use %25 inplace of just %

Eric
Mohammad Jaber
Ranch Hand

Joined: Apr 10, 2006
Posts: 46
Thanks it works fine ...
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

This may be out of subject considering we're in a Javascript forum, but you can encode the url's parameters using JSTL's <c aram> tag. This will ensure that all special characters will be encoded properly.


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56201
    
  13

Use the Javascript encodeURI() method to easily encode a URL.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: '%' Character on the URL
 
Similar Threads
freelance site
career focus!
Is anyone here 1337?
utilize my skills, scjp,scwcd i can work for you online.
Send sms from java application