Your previous answer seems to point to the culprit being the call to the third party software - as you don't have the source then maybe you should contact the third party to see if they can shed some light on this issue.
I doubt the issue is Struts messing up the reference of the ActionForm passed to the Action's execute method or stored in the Request - it might be because of whats configured in your struts-config.xml or what you have in the <html:form> element of your jsp not being right. But that wouldn't add up with what you say is happening after the http client call - and theres nothing to indicate any issue in the snipets of code you've posted. Sorry, I'm out of ideas. Niall ----- Original Message ----- From: "Vince Law" <[EMAIL PROTECTED]> Sent: Monday, October 03, 2005 11:51 PM > 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 > > > 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]