Appfuse Light Struts2 (simple?) action problem

4 messages Options
Embed this post
Permalink
VCP

Appfuse Light Struts2 (simple?) action problem

Reply Threaded More More options
Print post
Permalink
I am getting an error when browsing to a new test action(/test.html) I created in Appfuse Light.  I am more than familiar with struts1 but the simplicity of struts2 is giving me trouble.  Below is the error and app code....




An Error has occurred in this application. No result defined for action org.appfuse.web.TestAction and result success at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at
...



TestAction.java
-------------------------------------------------------------
public class TestAction extends ActionSupport {
    private final Log log = LogFactory.getLog(TestAction.class);
   
    private String helloMessage;
   
    public String execute() throws Exception {
    log.debug("entering 'execute' message");
    helloMessage = "Hello There!";
        return SUCCESS;
    }
 
    public String saySomething() {
    log.debug("entering 'saySomething' message");
    helloMessage = "Hello There!";
        return SUCCESS;
    }

        public String getHelloMessage() {
                return helloMessage;
        }

        public void setHelloMessage(String helloMessage) {
                this.helloMessage = helloMessage;
        }
}
-------------------------------------------------------------




test.jsp
-------------------------------------------------------------
<%@ include file="/taglibs.jsp"%>
<h2><s:property value="helloMessage" /></h2>
-------------------------------------------------------------



struts.xml
-------------------------------------------------------------
...
        <!-- Test -->
        <action name="test" class="testAction" method="saySomething">
            <result name="success">test.jsp</result>
            <result name="input">test.jsp</result>
        </action>
...        
-------------------------------------------------------------


action-servlet.xml
-------------------------------------------------------------
...
    <bean id="testAction" class="org.appfuse.web.TestAction" scope="prototype">
        <property name="userManager" ref="userManager"/>
    </bean>
...
-------------------------------------------------------------



mraible

Re: Appfuse Light Struts2 (simple?) action problem

Reply Threaded More More options
Print post
Permalink
What version of AppFuse Light are you using? If you have an  
"actionPackages" init-param defined in web.xml (for Struts'  
DispatcherFilter), you don't need to define "test" in struts.xml or  
action-servlet.xml.

Matt

On Nov 30, 2007, at 4:00 PM, VCP wrote:

>
> I am getting an error when browsing to a new test action(/test.html) I
> created in Appfuse Light.  I am more than familiar with struts1 but  
> the
> simplicity of struts2 is giving me trouble.  Below is the error and  
> app
> code....
>
>
>
>
> An Error has occurred in this application. No result defined for  
> action
> org.appfuse.web.TestAction and result success at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult
> (DefaultActionInvocation.java:350)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:253)
> at
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInter
> cept(DefaultWorkflowInterceptor.java:221)
> at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
> MethodFilterInterceptor.java:86)
> at
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
> (DefaultActionInvocation.java:224)
> at
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
> (DefaultActionInvocation.java:223)
> at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile
> (UtilTimerStack.java:455)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:221)
> at
> ...
>
>
>
> TestAction.java
> -------------------------------------------------------------
> public class TestAction extends ActionSupport {
>     private final Log log = LogFactory.getLog(TestAction.class);
>
>     private String helloMessage;
>
>     public String execute() throws Exception {
>     log.debug("entering 'execute' message");
>     helloMessage = "Hello There!";
>         return SUCCESS;
>     }
>
>     public String saySomething() {
>     log.debug("entering 'saySomething' message");
>     helloMessage = "Hello There!";
>         return SUCCESS;
>     }
>
> public String getHelloMessage() {
> return helloMessage;
> }
>
> public void setHelloMessage(String helloMessage) {
> this.helloMessage = helloMessage;
> }
> }
> -------------------------------------------------------------
>
>
>
>
> test.jsp
> -------------------------------------------------------------
> <%@ include file="/taglibs.jsp"%>
> <h2><s:property value="helloMessage" /></h2>
> -------------------------------------------------------------
>
>
>
> struts.xml
> -------------------------------------------------------------
> ...
>         <!-- Test -->
>         <action name="test" class="testAction" method="saySomething">
>             <result name="success">test.jsp</result>
>             <result name="input">test.jsp</result>
>         </action>
> ...
> -------------------------------------------------------------
>
>
> action-servlet.xml
> -------------------------------------------------------------
> ...
>     <bean id="testAction" class="org.appfuse.web.TestAction"
> scope="prototype">
>         <property name="userManager" ref="userManager"/>
>     </bean>
> ...
> -------------------------------------------------------------
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Appfuse-Light- 
> Struts2-%28simple-%29-action-problem-tf4924705s2369.html#a14094089
> Sent from the Equinox Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

VCP

Re: Appfuse Light Struts2 (simple?) action problem

Reply Threaded More More options
Print post
Permalink
I have the latest version 1.8.   It does have the actionPackages in web.xml so i commented out "test" in struts.xml and action-servlet.xml.  i have the same error.




mraible wrote:
What version of AppFuse Light are you using? If you have an  
"actionPackages" init-param defined in web.xml (for Struts'  
DispatcherFilter), you don't need to define "test" in struts.xml or  
action-servlet.xml.

Matt

On Nov 30, 2007, at 4:00 PM, VCP wrote:

>
> I am getting an error when browsing to a new test action(/test.html) I
> created in Appfuse Light.  I am more than familiar with struts1 but  
> the
> simplicity of struts2 is giving me trouble.  Below is the error and  
> app
> code....
>
>
>
>
> An Error has occurred in this application. No result defined for  
> action
> org.appfuse.web.TestAction and result success at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult
> (DefaultActionInvocation.java:350)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:253)
> at
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInter
> cept(DefaultWorkflowInterceptor.java:221)
> at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
> MethodFilterInterceptor.java:86)
> at
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
> (DefaultActionInvocation.java:224)
> at
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
> (DefaultActionInvocation.java:223)
> at
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile
> (UtilTimerStack.java:455)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:221)
> at
> ...
>
>
>
> TestAction.java
> -------------------------------------------------------------
> public class TestAction extends ActionSupport {
>     private final Log log = LogFactory.getLog(TestAction.class);
>
>     private String helloMessage;
>
>     public String execute() throws Exception {
>     log.debug("entering 'execute' message");
>     helloMessage = "Hello There!";
>         return SUCCESS;
>     }
>
>     public String saySomething() {
>     log.debug("entering 'saySomething' message");
>     helloMessage = "Hello There!";
>         return SUCCESS;
>     }
>
> public String getHelloMessage() {
> return helloMessage;
> }
>
> public void setHelloMessage(String helloMessage) {
> this.helloMessage = helloMessage;
> }
> }
> -------------------------------------------------------------
>
>
>
>
> test.jsp
> -------------------------------------------------------------
> <%@ include file="/taglibs.jsp"%>
> <h2><s:property value="helloMessage" /></h2>
> -------------------------------------------------------------
>
>
>
> struts.xml
> -------------------------------------------------------------
> ...
>         <!-- Test -->
>         <action name="test" class="testAction" method="saySomething">
>             <result name="success">test.jsp</result>
>             <result name="input">test.jsp</result>
>         </action>
> ...
> -------------------------------------------------------------
>
>
> action-servlet.xml
> -------------------------------------------------------------
> ...
>     <bean id="testAction" class="org.appfuse.web.TestAction"
> scope="prototype">
>         <property name="userManager" ref="userManager"/>
>     </bean>
> ...
> -------------------------------------------------------------
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Appfuse-Light- 
> Struts2-%28simple-%29-action-problem-tf4924705s2369.html#a14094089
> Sent from the Equinox Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@equinox.dev.java.net
> For additional commands, e-mail: users-help@equinox.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@equinox.dev.java.net
For additional commands, e-mail: users-help@equinox.dev.java.net
mraible

Re: Appfuse Light Struts2 (simple?) action problem

Reply Threaded More More options
Print post
Permalink
Can you try renaming your action to something else and see if that  
helps. For all I know "test" is a keyword for some reason.

Matt

On Nov 30, 2007, at 5:48 PM, VCP wrote:

>
> I have the latest version 1.8.   It does have the actionPackages in  
> web.xml
> so i commented out "test" in struts.xml and action-servlet.xml.  i  
> have the
> same error.
>
>
>
>
>
> mraible wrote:
>>
>> What version of AppFuse Light are you using? If you have an
>> "actionPackages" init-param defined in web.xml (for Struts'
>> DispatcherFilter), you don't need to define "test" in struts.xml or
>> action-servlet.xml.
>>
>> Matt
>>
>> On Nov 30, 2007, at 4:00 PM, VCP wrote:
>>
>>>
>>> I am getting an error when browsing to a new test action(/
>>> test.html) I
>>> created in Appfuse Light.  I am more than familiar with struts1 but
>>> the
>>> simplicity of struts2 is giving me trouble.  Below is the error and
>>> app
>>> code....
>>>
>>>
>>>
>>>
>>> An Error has occurred in this application. No result defined for
>>> action
>>> org.appfuse.web.TestAction and result success at
>>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult
>>> (DefaultActionInvocation.java:350)
>>> at
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke
>>> (DefaultActionInvocation.java:253)
>>> at
>>> com
>>> .opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInter
>>> cept(DefaultWorkflowInterceptor.java:221)
>>> at
>>> com
>>> .opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
>>> MethodFilterInterceptor.java:86)
>>> at
>>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
>>> (DefaultActionInvocation.java:224)
>>> at
>>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling
>>> (DefaultActionInvocation.java:223)
>>> at
>>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile
>>> (UtilTimerStack.java:455)
>>> at
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke
>>> (DefaultActionInvocation.java:221)
>>> at
>>> ...
>>>
>>>
>>>
>>> TestAction.java
>>> -------------------------------------------------------------
>>> public class TestAction extends ActionSupport {
>>>    private final Log log = LogFactory.getLog(TestAction.class);
>>>
>>>    private String helloMessage;
>>>
>>>    public String execute() throws Exception {
>>>     log.debug("entering 'execute' message");
>>>     helloMessage = "Hello There!";
>>>        return SUCCESS;
>>>    }
>>>
>>>    public String saySomething() {
>>>     log.debug("entering 'saySomething' message");
>>>     helloMessage = "Hello There!";
>>>        return SUCCESS;
>>>    }
>>>
>>> public String getHelloMessage() {
>>> return helloMessage;
>>> }
>>>
>>> public void setHelloMessage(String helloMessage) {
>>> this.helloMessage = helloMessage;
>>> }
>>> }
>>> -------------------------------------------------------------
>>>
>>>
>>>
>>>
>>> test.jsp
>>> -------------------------------------------------------------
>>> <%@ include file="/taglibs.jsp"%>
>>> <h2><s:property value="helloMessage" /></h2>
>>> -------------------------------------------------------------
>>>
>>>
>>>
>>> struts.xml
>>> -------------------------------------------------------------
>>> ...
>>>        <!-- Test -->
>>>        <action name="test" class="testAction" method="saySomething">
>>>            <result name="success">test.jsp</result>
>>>            <result name="input">test.jsp</result>
>>>        </action>
>>> ...
>>> -------------------------------------------------------------
>>>
>>>
>>> action-servlet.xml
>>> -------------------------------------------------------------
>>> ...
>>>    <bean id="testAction" class="org.appfuse.web.TestAction"
>>> scope="prototype">
>>>        <property name="userManager" ref="userManager"/>
>>>    </bean>
>>> ...
>>> -------------------------------------------------------------
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://www.nabble.com/Appfuse-Light-
>>> Struts2-%28simple-%29-action-problem-tf4924705s2369.html#a14094089
>>> Sent from the Equinox Users mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Appfuse-Light-Struts2-%28simple-%29-action-problem-tf4924705s2369.html#a14100788
> Sent from the Equinox Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]