Or, pass in what you actually need from the request instead of introducing a
dependency on the servlet spec.

What's required from the request?

Dave
 On Jun 20, 2011 7:19 AM, "Lukasz Lenart" <lukasz.len...@googlemail.com>
wrote:
> 2011/6/20 k3v1n <mitn...@email.it>:
>> <s:if test="%{@org.mydomain.MyClass@myMethod(request) != null}">
>> aaa
>> <s:if />
>
> Wrap call to myMethod inside your action that should implement
> RequestAware interface [1], like below
>
> public class MyAction implements RequestAware {
>
> private Map<String, Object> request;
>
> void setRequest(java.util.Map<java.lang.String,java.lang.Object> request)
{
> this.request = request;
> }
>
> public boolean isMyMthod() {
> return org.mydomain.MyClass.myMethod(request) != null;
> }
>
> }
> <s:if test="myMethod">
> bbbb
> </s:if>
>
> [1]
http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/interceptor/RequestAware.html
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>

Reply via email to