On Tue, 15 Feb 2005 14:53:40 -0500, Matt Hughes <[EMAIL PROTECTED]> wrote:
> When I am inside a JSP page, is there any way to access the forward path
> in the action mapping:
> 
>         <action path="/COLDCache"
>                 type="com.xyz.actions.admin.COLDCacheAction"
>                 scope="request">
>             <forward name="success"
>                      path="/pages/admin/COLDCache.jsp"/>
>         </action>
> 
> In other words, does Struts, when it forwards control to the JSP page,
> put a variable in the request scope like
> request.setAttribute("path","/pages/admin/COLDCache.jsp");
> 

Struts does not do this for you, but your servlet container will set
the characteristics of the HttpServletRequest object to reflect the
paths of the JSP page.  Thus, in a JSP,

    <%= request.getServletPath() %>

should return you the name of the JSP, not the action to which the
form was submitted.

Craig

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to