struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken McWilliams <ken.mcwilli...@gmail.com>
Subject Re: struts2.5 - Action class is not called
Date Mon, 16 Nov 2015 19:51:16 GMT
Well you are using wild cards in the action name. If you don't want to
switch between methods dynamically, that is you _always_ want to call
execute then you should remove the "*" from the name, remove the method
parameter, and then struts2 will assume execute should be called by
default.

On Mon, Nov 16, 2015 at 12:33 PM, Emi <emilu@encs.concordia.ca> wrote:

>
> struts2.5:
>>
>> (2) index.jsp
>>  <%
>>       String context_path     = request.getContextPath();
>>       response.sendRedirect(context_path +
>> "/Login/ProcessLoginAction.action");
>> %>
>>
>>
>> (3) struts.xml
>>
>>       <action name="*ProcessLoginAction"  method="{1}"
>> class="project.action.ProcessLoginAction">
>>          <result name="success" type="tiles">login_main_page</result>
>>       </action>
>>
> If written executeProcessLoginAction.action in jsp, the action class will
> be called.
>
> But wouldn't jsp automatically runs
> "/Login/executeProcessLoginAction.action".
>
> How to call execute() method as default if no method name specified?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message