Hi All!

Craig's suggestion works great!

However, it appears to me that dot delimited request variable names don't
work with the JSTL.

Eg:
<c:out value="${org.apache.struts.action.MODULE}" />
<c:out value="${requestScope.org.apache.struts.action.MODULE}" />

The above prints nothing and therefore a .prefix also fails.

Does anyone know if this is a JSTL bug, or is there something that needs to
change in struts?

Or is there something I am doing incorrectly?


TIA,

Kunal

-----Original Message-----
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Sunday, 18 April 2004 10:17
To: Struts Users Mailing List
Subject: Re: Detrmining which module from within JSP

Josh Holtzman wrote:

>Hello,
>
> 
>
>Can anyone suggest a means to determine the current struts application
>module from within a JSP?
>
As long as you have correctly gone through an action first, the 
ModuleConfig object for the selected
module has been stored as a request attribute under the key 
"org.apache.struts.action.MODULE" (from Java code, you would use 
Globals.MODULE_KEY to reference this string).  So, you could say 
something like this in a JSP page:

  The current module prefix is
  <bean:write name="org.apache.struts.action.MODULE" property="prefix"/>

The Javadocs for org.apache.struts.Globals describe many other attribute 
names that Struts uses to store interesting things while processing a 
request.

>  
>
> 
>
>Would it be possible to use a Bean or Logic tag to make this determination?
>
> 
>
>Thanks again for any suggestions.
>
> 
>
>Regards,
>
> 
>
>Josh Holtzman
>
>  
>
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