The Http client call is a third party software, unfortunately I don't have its source code to debug it. I tried to deploy the app in Tomcat 5.0, but it couldn't run due to some methods missing in the xml parsing library. My app is just a small part of the overall app, and they are all programmed to run in 5.5.9, therefore making it to run in 5.0 won't be useful.
Is there any possible way in struts that I can make sure it assigns the right reference of the ActionForm object to the Action and JSP page? Under what circumstances, the Struts's handling of the ActionForm got messed up? I had already made sure there isn't any action-chaining used in the app. The only thing I can't make sure is, if the third party software that I used (which makes the http client call) changes RequestProcessor default behavior. It is not likely, since it is not a Struts based app. Thanks, Vince -----Original Message----- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Monday, October 03, 2005 9:14 AM To: Struts Users Mailing List Subject: Re: question regarding ActionForm From: "Vince Law" <[EMAIL PROTECTED]> Sent: Monday, October 03, 2005 9:09 AM > Niall, > > I am using Struts 1.2.7. > Tomcat 5.5.9 > OS - Window XP professional (with Service Pack 2) > > I tried what you suggested me: > ProgramGroupForm pgForm = > (ProgramGroupForm)request.getAttribute(mapping.getAttribute()); > pgForm.getType(); //same problem, returned "null" > pgForm.getDescription(); //same problem, returned "null" Did you do this after the Http client call? One thought I had was that somehow that call was messing with the request and I wondered if trying to retrieve the ActionForm from the request would return null? > If I commented out the Http client call (and hard coded the result instead), > everything worked fine again. I guess the question then is how your Http client call is working - what could it be doing thats messing up struts? > I switched on the "debug" mode for log4j. The BeanUtils seemed to work > fine, it did copy the value correctly. > > Is it possible that Struts get the wrong reference of the ActionForm object > and assigns it to both the Action's execute method and JSP page? (since the > debugging info showed the correct values). Its hard to see how this could happen - its such a core part of Struts that if it wasn't working I think we would be inundated with issues. From the bits of code you've posted, everything looks fine, although you'll forgive me from being skeptical - but people don't always post exactly the code they're running. If its a Struts issue its more likely that the ActionForm you're mapping is configured to use is different from the the action mapping used by the <html:form> element in the jsp. Other things that could cause trouble include "Action Chaining" or a custom RequestProcessor thats messing with the default behaviour. I would concentrate of what the http client call is doing though - that is where the issue seems to be caused. One last suggestion, and I'm not sure why I'm saying it, but can you deploy this on Tomcat 5.0 rather than 5.5 and see if it still occurs? > Thanks, > Vince --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]