Pratik wrote:

> Hi all
> pageContext.getRequest() returns ServletRequest
> I want to get the requested url in my own tag.
> How can i convert ServletRequest to HttpServletRequest.
> Explisit casting (HttpServletRequest) pageContext.getRequest() gives me an
> error.
>

If the following statement gives you a ClassCastException:

    HttpServletRequest request =
      (HttpServletRequest) pageContext.getRequest();

then either your servlet container is broken or for some reason it
thinks you are
not executing an HTTP based request.  What container are you trying to
run your JSP
pages in?

>
> Thanks
>
> Pratik
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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

Reply via email to