Hi

I have a Struts action defined:

    <action    path="/getHotels"
               type="com.rubus.geo.xxxxxxx.view.SearchHotelAction"
               name="hotelSearchForm"
               scope="request"
               input="/searchHotels.jsp">
            <forward   name="showResults"       path="/searchHotels.jsp" />
            <forward   name="pickTown"  path="/pickTown.jsp" />
    </action>

and can successfully use this when POSTing with a form. I'm trying to also
use the Action with via a URL, passing parameters along.

The problem that I am having is that the properties of my Form (which is a
subclass of ActionForm not DynaActionForm) do not get auto populated with
the values in the Request - but I know they're there. To get round this I
have had to add some code to my validate method - like so:

      String x = request.getParameter("xCoord");
      String y = request.getParameter("yCoord");
        //Both must be present.
        if (x != null && x.length() > 0 && y != null && y.length() > 0) {
                setXCoord(Integer.parseInt(x));
                setYCoord(Integer.parseInt(y));
        }

which works.

Is this a bug in Struts? (I'm using v1.1b3). Any help appreciated.

Thanks
Lee




______________________________________________

Lee Ball
Consultant

t +44 (0) 1344 648019  |  m +44 (0) 7970 243429  |  f +44 (0) 1344 648019
a  Rubus Court  |  Eastern Road  |  Bracknell  |  Berkshire  |  RG12  2UP  |
UK

�  open architecture development  � content & digital asset management 
�  business interaction design �  operational services
______________________________________________
rubus   www.rubus.com

This e-mail may contain confidential and/or privileged material, and is
intended
only for the stated addressee(s). If you receive this in error, please
notify
the author by replying to this email and delete it and all copies from your
system. If you are not the intended recipient you must not use, disclose,
copy,
print, distribute, or rely on this e-mail.

We have taken precautions to minimise the risk of transmitting software
viruses,
but we advise that you carry out your own virus checks on any attachments to
this email.

Any views or opinions presented are solely those of the author and do not
necessarily
represent those of Rubus.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to