You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Karikalan Kumaresan <KK...@buildonline.com> on 2003/07/17 12:28:33 UTC

Custom property in action-mapping !!!

Hi,

How can I specify the custom property for the specific in the action-mapping
secion in struts-config.xml?

For example,

	<action input = "/jsp/logon.jsp" type = "com.mypackage.MyAction"
validate = "true" scope = "request" 
	path = "/logon" name = "logonForm">
		<forward path = "/jsp/welcome.jsp" name = "welcome"/>
		<forward path = "/jsp/logonerror.jsp" name =
"logonFailure"/>
		
		<!-- I want to do this -->
		<set-property name = "actionBean" value =
"com.mypackage.myBean"/>
      </action>

also, please do let me know how I can access the custom property from my
action.

Thanks in advance,
Karikalan



-----Original Message-----
From: Paananen, Tero [mailto:Tero.Paananen@GTECH.COM]
Sent: 11 July 2003 21:16
To: 'struts-dev@jakarta.apache.org'
Subject: RE: LookupDispatchAction vs. DispatchAction (bug #18002)


> I wouldn't call this a bug (a very annoying feature, at
> least for me), but from reading the javadoc for the
> DispatchAction.unspecified() method, it looks like the
> method was added in later to allow application developers
> to create their own default behavior when the dispatch
> parameter isn't specified. I think the same behavior
> should be present in LookupDispatchAction as well.

        if (name == null) {
            String message =
                messages.getMessage("dispatch.parameter", mapping.getPath(),
parameter);
            throw new ServletException(message);
        }

should be:

        if (name == null) {
		return dispatchMethod(mapping, form, request, response,
name);
        }

Also found an open bug on this at Bugzilla.

Bug #21226 is also related. You wouldn't need the
new error message defined in this bug, if bug #18002
was fixed to do what (or something similar) I propose
above.

				-TPP


				-TPP

-----------------------------------------
This email may contain confidential and privileged material for the sole use
of the intended recipient(s). Any review, use, retention, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org