struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Sutton">
Subject [s2] Problem with <result> in 2.0.6
Date Sun, 29 Apr 2007 07:54:28 GMT

I've got what seems to be strange behaviour which I've tried to find the
reason for, but can't seem to find an explanation. The struts.xml is at the
end of the email, I'll describe the problem first in case it rings any

In a nutshell it seems that using any result type other than redirect for
actions generates a 404 error message, whereas if I use a redirect it works.

My specific situation is that I'm running using Tomcat 5.5.23 inside of
Eclipse 3.2.2 and I have a JSP with an s:form which POSTs to the an action
located at /VerifyLogin. /VerifyLogin forwards the user an action at
/eds/Welcome, which in turn can forward the user to an action at
/eds/ForceChangeLoginPassword. If I change the result type for VerifyLogin
from a redirect to the default (i.e. remote the type attribute of the result
tag) I get a 404, if I use a type of redirect it works (correctly forwards,
no 404). The same is true for the redirect for /eds/Welcome to
/eds/ForceChangeLoginPassword, if I use <result type="redirect"> it works
and I don't I get a 404.

The two questions I have are;

1) Is the expected behaviour?

2) Is there any reason why, if this is normal, the struts.xml parser
couldn't determine which forwards go to actions and set their default to
redirect, or produce a warning that the configuration won't work?

Thanks for any help,



	"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    <constant name="struts.devMode" value="true" />

	<include file="struts-default.xml"/>

	<package name="net.enterprisedatasafe.servlets.unrestricted"
extends="struts-default" namespace="/">
		<action	name="VerifyLogin" 
class="net.enterprisedatasafe.servlets.unrestricted.VerifyLogin" >
			<result type="redirect">/eds/Welcome.action</result>
			<result name="error">/index.jsp</result>

	<package name="net.enterprisedatasafe.servlets.restricted"
extends="struts-default" namespace="/eds">
		<action	name="Welcome" 
class="net.enterprisedatasafe.servlets.restricted.Welcome" >

		<action	name="ForceChangeLoginPassword" 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message