Character set encoding in IPlanet

When I use <a href="co.com.XServlet?Parameter1==&Parameter2=455">List</a>

to call the servlet XServlet in IPlanet, the doGet method tries to get the parameter called Parameter1 using String par = request.getParameter("Parameter1"), but it does not contain the "=" symbol, but if I use <a href="co.com.XServlet?Parameter1=%3D&Parameter2=455">List</a> the String par contains the "=" symbol.

In apache with jakarta-tomcat, it doesn't matter what I use, it Always work.

What can I do for this to work in IPlanet without modifying all my code changing the "=" symbol for "%3D"?

[638 byte] By [jzulu2000] at [2007-9-26 3:23:45]
# 1

You should change your code. I believe that you're expected to escape the = character in query strings. Jakarta may have a lenient implementation for parsing query strings whereas IPlanet may not. I very much doubt that you can configure IPlanet to let it through.

If you really wanted to try to hack your way round it then you could try looking at the query string using HttpServletRequest.getQueryString() and perhaps seeing if HttpUtils.parseQueryString returns your = character correctly.

KPSeal at 2007-6-29 11:42:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You do not have to write code to put hexadecimal equivalent of URL-special characters yourself. The recommended way to do this is...

All those URLs that you wish to place in your JSP should first be run through java.net.URLEncoder.encode() and the return value of that method call is what you should place in the JSP.

In fact, that is what the method URLEncoder.encode() is for.

If you do not do this, you will most likely have problems on similar lines as yours. And not just with = but all such characters that have special meaning when treated as part of a URL string.

neville_sequeira at 2007-6-29 11:42:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...