More information -

Here is my test for that's exhibiting the behaviour:

<%@ taglib uri="/web/tld/struts-html-el.tld" prefix="html" %>

<html>
<head>
</head>
<body>
<html:form action="/Test">
        <table>
        <tr>
                <td>Input 1:</td>
                <td>
                        <html:text property="input1" size="10"/>
                </td>
        </tr>
        <tr>
                <td>Input 2:</td>
                <td>
                        <html:text property="input2" size="10"/>
                </td>
        </tr>
        <tr>
                <td>
                        <html:submit/>
                </td>
        </tr>
        </table>
</html:form>
</body>
</html>

And the definitions from my struts-config.xml file:

                <form-bean name="TestForm" 
                        type="com.barcap.topl.requestHandler.vo.TestForm"/>
..............
                <action path="/Test" 
        
type="com.barcap.topl.requestHandler.action.TestAction"
                                name="TestForm"
                                scope="request"
                                input="/web/jsp/test.jsp">
                        <forward name="success" path="/web/jsp/test.jsp"/>
                </action>

The TestForm.java:

package com.barcap.topl.requestHandler.vo;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class TestForm extends ActionForm {

        protected String input1;
        protected String input2;

        public TestForm() {
                this.input1 = "one";
                this.input2 = "two";
        }

        /**
         * @return
         */
        public String getInput1() {
                return input1;
        }

        /**
         * @return
         */
        public String getInput2() {
                return input2;
        }

        /**
         * @param string
         */
        public void setInput1(String string) {
                input1 = string;
        }

        /**
         * @param string
         */
        public void setInput2(String string) {
                input2 = string;
        }

        public void reset(ActionMapping mapping, HttpServletRequest request)
{
                super.reset(mapping, request);
        }

}

Any ideas?



-----Original Message-----
From: Wall, Scott: IT (LDN) 
Sent: 17 February 2004 17:41
To: [EMAIL PROTECTED]
Subject: Html:Form input not being returned


Hi,

I'm having a problem with html:form input values not populating my
ActionForm. I can get it to work if I invalidate() the session immediately
prior to populating the form and submitting, or consistantly by using get
rather than post.

It appears that the form values when posted are not added as parameters to
the request, or at least I cant see them.

I greatly appreciate any help with this.

Thanks Scott


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


---------------------------------------------------------------------
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]

Reply via email to