What's in your struts-config action mapping? If you have redirect=true this is expected.
--- Alex Shneyderman <[EMAIL PROTECTED]> wrote: > I have a need to chain actions and my code looks > like: > > OperationConfig oc = new OperationConfig (); > > if ((oc.getStep () == null) || "".equals (oc.getStep > ().trim ())) { > oc.setStep (DEFAULT_STEP); > } > > if ((oc.getOperation () == null) || "".equals > (oc.getOperation ().trim > ())) { > oc.setOperation (DEFAULT_OP); > } > > ActionForward af = mapping.findForward > ("navigate.step" + oc.getStep > ()); > > //System.out.println ("Hash code: " + ((Object) > request).hashCode ()); > //System.out.println ("To string: " + ((Object) > request).toString ()); > > if (af != null) { > request.setAttribute > (Constants.REQATTRIBUTE_OPCFG, oc); > > //for (Enumeration enum = > request.getAttributeNames(); > enum.hasMoreElements // (); ) { > // String key = (String) enum.nextElement (); > // System.out.println ("Key: " + key + "; Class: > " + > //request.getAttribute (key).getClass().getName ()); > // } > > return af; > } else { // TODO: this is an error. > return null; > } > > Now when my action that I chain to gets the request > it actualy does not > get the attribute that I set. As the matter of fact > my request object is > completely different instance (which I really could > care less about, as > long the content stays there). > > Can someone shed some light on this? > My redirect is false. > > Thanks, > Alex. > > PS here is the output of the commented code: > > Hash code: 5738457 > To string: > [EMAIL PROTECTED] > Key: javax.servlet.request.cipher_suite; Class: > java.lang.String > Key: org.apache.struts.action.MESSAGE; Class: > org.apache.struts.util.PropertyMessageResources > Key: javax.servlet.request.key_size; Class: > java.lang.Integer > Key: org.apache.struts.action.mapping.instance; > Class: > org.apache.struts.action.ActionMapping > Key: Logon; Class: > org.apache.struts.validator.DynaValidatorForm > Key: edu.columbia.law.gls.opcfg; Class: > edu.columbia.law.gls.OperationConfig > Key: NavigatorForm; Class: > org.apache.struts.action.DynaActionForm > Key: org.apache.struts.action.MODULE; Class: > org.apache.struts.config.impl.ModuleConfigImpl > > Similar output of the action chained to: > > > Hash code: 4727831 > To string: > [EMAIL PROTECTED] > -- it is null > Key: javax.servlet.request.cipher_suite; Class: > java.lang.String > Key: org.apache.struts.action.MESSAGE; Class: > org.apache.struts.util.PropertyMessageResources > Key: javax.servlet.request.key_size; Class: > java.lang.Integer > Key: org.apache.struts.action.mapping.instance; > Class: > org.apache.struts.action.ActionMapping > Key: org.apache.struts.action.MODULE; Class: > org.apache.struts.config.impl.ModuleConfigImpl > > As you can see the request and its content is > changed. Why is that? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]