You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kalyan Inuganti <ki...@gmail.com> on 2005/02/04 00:23:07 UTC
Taglib Question - Not a Tomcat Issue
Hi,
I am creating a JSP which in turn calls my XXXTagHandler.java which
extends javax.servlet.jsp.tagext.TagSupport. I would like to access
the HttpServletRequest object that is in the JSP's scope in the
XXXTagHandler class. What is the best way of getting the
HttpServletRequest object?
Will ((HttpServletRequest)super.pageContext.getRequest()) do it?
--------------------
What I am trying to achieve:
The JSP Page passes a Role Name to the TagHandler. The TagHandler
needs to call the isUserInRole("abc"); method of HttpServletRequest
and return a true/false to the JSP.
Any help will be greatly appreciated.
Thanks,
Kalyan
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Taglib Question - Not a Tomcat Issue
Posted by Tim Funk <fu...@joedog.org>.
Yes - it is safe to assume
((HttpServletRequest)super.pageContext.getRequest()) will work fine.
-Tim
Kalyan Inuganti wrote:
> Hi,
>
> I am creating a JSP which in turn calls my XXXTagHandler.java which
> extends javax.servlet.jsp.tagext.TagSupport. I would like to access
> the HttpServletRequest object that is in the JSP's scope in the
> XXXTagHandler class. What is the best way of getting the
> HttpServletRequest object?
>
> Will ((HttpServletRequest)super.pageContext.getRequest()) do it?
>
> --------------------
> What I am trying to achieve:
>
> The JSP Page passes a Role Name to the TagHandler. The TagHandler
> needs to call the isUserInRole("abc"); method of HttpServletRequest
> and return a true/false to the JSP.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org