| 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
|
|
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
|
|
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
|
|
|
Use the Javascript encodeURI() method to easily encode a URL.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: '%' Character on the URL
|
|
|