struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemrajsinh (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-3371) Problem in redirecting action in struts.xml
Date Mon, 11 Jan 2010 07:33:44 GMT
Problem in redirecting action in struts.xml
-------------------------------------------

                 Key: WW-3371
                 URL: https://issues.apache.org/struts/browse/WW-3371
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.1.6
         Environment: OS :: Windows XP SP2
IDE:: MyEclipse 5.1
J2EE 1.4
jdk 1.6
tomcat 6.0
            Reporter: Hemrajsinh
            Priority: Blocker


I found one problem when i was using "redirect" action in Struts2.
My Struts.xml file is as follow>>>>

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
	"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
	<package name="default" extends="struts-default">
		<action name="logIn">
			<result>userLogin.jsp</result>
		</action>
		<action name="addUser">
			<result>addUser.jsp</result>
		</action>
		<action name="manageUser" method="display"
			class="pck.ManageUser">
			<result name="success">manageUser.jsp</result>
		</action>
		<action name="deleteUser" class="pck.ManageUser"
			method="deleteUser">
			<result name="success" type="redirect">manageUser</result>
		</action>
		<action name="userVerify" class="pck.UserLoginAction"
			method="execute">
			<result name="success">WelcomeUser.jsp</result>
		</action>
		<action name="AddUserAction" class="pck.AddUserAction">
			<result name="success">firstPg.jsp</result>

		</action>
		<action name="UpdateUser" class="pck.ManageUser"
			method="updateOrSave">
			<result name="updated" type="redirect">manageUser</result>
		</action>
		<action name="editUser" method="displayForUpdate"
			class="pck.ManageUser">
			<result>updateUser.jsp</result>
		</action>
		<action name="deleteUser" method="deleteUser"
			class="pck.ManageUser">
			<result name="deleteSuccess" type="redirect">
				ManageUser.jsp
			</result>
		</action>
	</package>
</struts>


when i am using this file in my application tomcat gives following error>>>

type Status report

message No result defined for action pck.ManageUser and result success

description The requested resource (No result defined for action pck.ManageUser and result
success) is not available.

And after many trials i found one solution for this problem.
I just made one minor change in struts.xml file.
I cut the action
<action name="deleteUser" class="pck.ManageUser"
			method="deleteUser">
			<result name="success" type="redirect">manageUser</result>
		</action>
and paste it at the end, which is as follow::
Mdified struts.xml is>>>>>

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
	"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
	<package name="default" extends="struts-default">
		<action name="logIn">
			<result>userLogin.jsp</result>
		</action>
		<action name="addUser">
			<result>addUser.jsp</result>
		</action>
		<action name="manageUser" method="display"
			class="pck.ManageUser">
			<result name="success">manageUser.jsp</result>
		</action>
		
		<action name="userVerify" class="pck.UserLoginAction"
			method="execute">
			<result name="success">WelcomeUser.jsp</result>
		</action>
		<action name="AddUserAction" class="pck.AddUserAction">
			<result name="success">firstPg.jsp</result>

		</action>
		<action name="UpdateUser" class="pck.ManageUser"
			method="updateOrSave">
			<result name="updated" type="redirect">manageUser</result>
		</action>
		<action name="editUser" method="displayForUpdate"
			class="pck.ManageUser">
			<result>updateUser.jsp</result>
		</action>
		<action name="deleteUser" method="deleteUser"
			class="pck.ManageUser">
			<result name="deleteSuccess" type="redirect">
				ManageUser.jsp
			</result>
		</action>
		
		<action name="deleteUser" class="pck.ManageUser"
			method="deleteUser">
			<result name="success" type="redirect">manageUser</result>
		</action>
	</package>
</struts>

Is this a problem of struts2?
I don't know about this. I am just a beginner in Struts.
If You find any solution please let me know.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message