Hi Team,

Iam new to using Struts2 unit testing. Iam using the Struts 2 JUnit plugin
<http://struts.apache.org/2.3.1.2/docs/junit-plugin.html>. The normal
actions which is working fine. But I have issue when I am testing the
action which has interceptor.

<action name="MainAdminPage" class="com.action.MainAdminAction">
            <interceptor-ref name="newStack" />
            <result>/MainAdmin.jsp</result>
            <result name="Login_page">/Login.jsp</result>
</action>

When I start testing the control goes to interceptor and check all the
validation.
when it invoke "return invocation.invoke();". it throws error.
 java.lang.IllegalStateException: Action has already executed

I am not able to get the solution for the above problem. Can any one help
me in this problem to find the solution. Thanks in advance.

Thanks,
Krishna raj

Reply via email to