struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: list of modules
Date Thu, 29 Apr 2004 06:39:21 GMT
Aaron Smuts wrote:

>To just get a list you could do something like this, I guess:
>In an Action class put the getServlet, else omit if in the servlet. 
>Enumeration enum =
>Then you could look for the ones that start with "config/"
A more robust mechanism would be to iterate through all of the servlet 
context attributes, and check for "instanceof ModuleConfig".  Once you 
know that the object is indeed a ModuleConfig, you can cast it to that 
API, and do things like getPrefix() to find the corresponding module prefix.

>This doesn't tell you much.
>Aaron Smuts

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message