struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <>
Subject Re: question regarding ActionForm
Date Mon, 03 Oct 2005 16:13:55 GMT
From: "Vince Law" <>
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
> 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
> and assigns it to both the Action's execute method and JSP page?  (since
> 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:
For additional commands, e-mail:

View raw message