Thank you. You're right. So I gives it up as I think it's not general 
enough to being imported into Strut's core.

But about the idea ... could you please follow up this thread at 
secur...@struts.apache.org. I'll post about the idea and some current 
security issues soon.

Thanks in advance!

On 9/15/2017 10:34 AM, Lukasz Lenart wrote:
> As I'm not fully grasp the idea behind, you can always use
> #application scope (which is basically a ServletContext wrapper).
> There is also ApplicationAware interface to allow actions deal with
> it.
> 
> Another thing would be implementation of ConfigurationProvider which
> can deal with the ServletContext and you can use
> ServletContextAwareConfigurationProvider in this case.
> 
> You can register your custom ConfigurationProvider as below:
> 
>    <filter>
>      <filter-name>struts2</filter-name>
>      
> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
>      <init-param>
>        <param-name>configProviders</param-name>
>        <param-value>com.company.MyConfigurationProvider</param-value>
>      </init-param>
>    </filter>
> 
> The flow is as follow:
> - in your ServletContextAwareConfigurationProvider you use
> ServletContext#setAttribute to inject whatever tool you need
> - in actions implementing ApplicationAware you can inject an action
> specific tools/values into #application scope
> - in JSPs you can call #application['myTool'].doStuff
> 
> 
> Regards
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to