On 2016-10-30 18:53 (-0400), Martin Gainty <mgai...@hotmail.com> wrote: 
> 
> 
> 
> ________________________________
> From: ronald.a.ander...@gmail.com <ronald.a.ander...@gmail.com>
> Sent: Sunday, October 30, 2016 1:59 PM
> To: user@struts.apache.org
> Subject: convention plugin struts.xml interceptors
> 
> My actions are working fine by following the convention rules - no struts.xml 
> required; I need to configure a custom interceptor, so struts.xml is 
> required. As soon as I add the struts.xml, the following exception is 
> returned:
> 
> Oct 30, 2016 1:54:22 PM org.apache.struts2.dispatcher.Dispatcher error
> SEVERE: Exception occurred during processing request: No result defined for 
> action net.codejava.struts.LoginAction and result success
> No result defined for action net.codejava.struts.LoginAction and result 
> success
> 
> How can the struts.xml be configured to ignore the action or how can the 
> convention plugin override the struts.xml? Do not want to add the LoginAction 
> to the struts.xml
> 
> MG>use annotations
> 
> @Action("LoginAction") // actually that is not necessary as it is added by 
> convention
> @Results(
>     @Result(name="success", location="/Success.jsp")
> )
> public class LogoninAction {
> MG>
> 
> 
> Struts2 version->struts2-core-2.3.15.1
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> Hi Martin,

It threw the same exception after adding the annotations; including my 
struts.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
        "http://struts.apache.org/dtds/struts-2.3.dtd";>
<struts>
        <!-- constant to define result path locations to project root directory 
-->
        <constant name="struts.convention.result.path" value="/"></constant>
        
        <package name="default" namespace="/" extends="struts-default">
        <interceptors>   
            <interceptor name="myCustomInterceptor" 
class="net.codejava.struts.MyCustomInterceptor" />
            <interceptor-stack name="customStack">
                <interceptor-ref name="myCustomInterceptor"/>
            </interceptor-stack>
        </interceptors>      
    </package>

</struts>

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

Reply via email to