I have a XPage which is passing information to another XPage in the form of a URL parameter (this is important due to SEO). I am able to use: java.net.URLEncoder.encode
to encode the URL and then I can have ampersand in my parameter value and I am able to use just param.get()
to get the values without decoding them. This works fine, but when I combine this with server side substitution it doesn't work as expected, it reverts the ampersand back to a normal ampersand rather than %26. Any ideas would be really appreciated here? Server side substitution is important due to SEO as well.
Update:
This is the URL before the submission as displayed in the address-bar (if we assume my category is Fruit & Vegetables):
/product-byCategory/Fruit+%26+Vegetables
The server side substitution rule is:
- /product-byCategory/*
- /mywebsite.nsf/xspProductByCat.xsp?cat=*
The query string value is:
cat=Fruit+&+Vegetables
What's interesting is that if I type this URL in the address-bar, I get the correct query string:
http://www.mywebsite.com/mywebsite.nsf/xspProductByCat.xsp?cat=Fruit+%26+Vegetables