You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kunal H. Parikh" <ku...@carsales.com.au> on 2004/03/06 03:09:22 UTC

Accessing struts module name from jsp

Hi All!

I was wondering if a struts tag available that can retrieve the struts
module name.

TIA,

Kunal



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Accessing struts module name from jsp

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
There is a <bean:struts> tag which will expose either the FormBeanConfig,
ForwardConfig or ActionConfig as a scripting variable - however you have to
specify the name of the form bean, forward or mapping. You can get the
ModuleConfig from either the FormBeanConfig or ActionConfig and from
ModuleConfig  you can get the module prefix.

Getting the module prefix via the mapping....
<bean:struts id="actionConfig" mapping="/myMapping"/>
<bean:write name="actionConfig" property="moduleConfig.prefix"/>


Getting the module prefix via the form bean....
<bean:struts id="formBeanConfig" mapping="myForm"/>
<bean:write name="formBeanConfig" property="moduleConfig.prefix"/>

Niall

----- Original Message ----- 
From: "Kunal H. Parikh" <ku...@carsales.com.au>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Saturday, March 06, 2004 2:09 AM
Subject: Accessing struts module name from jsp


> Hi All!
>
> I was wondering if a struts tag available that can retrieve the struts
> module name.
>
> TIA,
>
> Kunal
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org