vikas m pawar wrote:
>
> I have a ResponseServlet where i verify the login name and if it is invalid it
>returns to the login page using:
>
> response.sendRedirect(response.encodeRedirectURL(str));
> where String str = "/login.html"
> i am getting the following error:
>
> C:\Tomcat\webapps\MFC\Web-inf\classes\ResponseServlet.java:45: cannot resolve symbol
> symbol : method encodeRedirectURL (java.lang.String)
> location: interface javax.servlet.http.HttpServletRequest
> response.sendRedirect(request.encodeRedirectURL(str));
> ^
> 1 error
>
> encodeRedirectURL takes a String URL and returns a String whereas sendRedirect takes
>a String...
Most likely you have an old servlets.jar or jsdk.jar file in your
JDK/jre/lib/ext directory, or in your CLASSPATH. The encodeRedirectURL()
was added in Servlet 2.2.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets