Discussion Locked

response.encodeURL() does NOT work...

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello

Can any one tell what could be the possible solution. I am using Apache 1.3.11 and JServ 1.1.2 and GNUJSP for JSP Pages.

But when I am using response.encodeURL(test.jsp)

response.sendRedirect(response.encodeURL("search.jsp"));

I am getting the following error.
Error compiling source file:c:/program files/apache group/apache/htdocs/java/home.jsp

javac -classpath c:\Program Files\Apache JServ 1.1.2
\ApacheJServ.jar;f:\Apache\GNUJSP\servlet-2.0- plus.jar;f:\Apache\nplib.jar;f:\Apache\GNUJSP\gnujsp10.jar -d c:\Apache\jsp -deprecation
c:\Apache\jsp\jsp\_Java\_home_2ejsp.java
c:\Apache\jsp\jsp\_Java\_home_2ejsp.java:74: cannot resolve symbol
symbol : method EncodeURL (java.lang.String) location: interface javax.servlet.http.HttpServletResponse

response.sendRedirect(response.EncodeURL("search.jsp"));
^
1 error

Thank in Advance,
Ashwini

5 replies

by okujava

hi!

the matter is, that u use Servlet API up to 2.0. javax.servlet.http.HttpServletResponse.encodeURL() was implemented in Servlet API 2.1 first time. u can use javax.servlet.http.HttpServletResponse.encodeUrl() instead ('rl' not capital) or download the Servlet API 2.2 from java.sun.com

by james_randy

Since you haven't received an acceptable answer in 8 months, perhaps you can now simply upgrade to all the latest versions and updates of all hardware and software, making your original problem a moot point.

Regards,

jr

This discussion is closed to new replies.