RaceBase
RaceBase

Reputation: 18868

Call a method passing a parameter inside jsp with struts 2

I have a scenario where I need to call a method of an Action class. Below is the code.

<s:if test="#session['EXECUTOR'] != null">  
<tr>
    <td width="80%">
    Test: 
    <!-- <s:property value="#moveETHAction_fetchExecutorData(#session['EXECUTOR'])" /> -->
    <s:push value="#moveETHAction_fetchExecutorData(#session['EXECUTOR'])">
         <s:property value="top">
    </s:push>
    </td>
</tr>   
</s:if>

However it's not working, throwing some Jasper Exception -" According to TLD, tag s:property must be empty, but is not"

How do i call the method and return a String data?

Upvotes: 0

Views: 2487

Answers (1)

Tom
Tom

Reputation: 4180

shouldn't it be:

<s:property value="top"/>

in stead of

<s:property value="top">

Upvotes: 2

Related Questions