jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes getting exact url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting exact url" Watch "getting exact url" New topic

getting exact url

sandhya sri

Joined: Feb 11, 2009
Posts: 16
I have an url like


and what I need to do is ,I have to append a string to that url like


for this I wrote a outbound-rule and rule in urlrewrite.xml



but when I click on specified link in my application which go for this url,

http:///details/12345%2Bexample_string("+" is replaced by %2B)

but I need url exactly like


because I need to seperate 12345 and "example_string" again in my action class with seperator "+"

but Im not able to do this.

can anyone help me in resolving this issue!!!
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

Your URL is being encoded

URL Encoding

I am not sure what an outbound rule is. But If you want to pass the data why not just use 2 parameters ?

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
sandhya sri

Joined: Feb 11, 2009
Posts: 16
If I use two parameters,I need to give '/' as seperator between thoes two parametaers ,but my requirement is I have to append a string after the Id with "+",that's why I hd taken it as single parameter.

Nandhakumar Soundarrajan

Joined: Apr 24, 2009
Posts: 23
You can use "~" as separator instead.

Thanking the green horns sincerely,
sandhya sri

Joined: Feb 11, 2009
Posts: 16
but '~' is also unsafe character for url as per

I agree. Here's the link: http://aspose.com/file-tools
subject: getting exact url
It's not a secret anymore!