Values from a jsp page are null in an Action class
hi, i am working on an application...i have a jsp page with several inputs (type=text) and when a submit the form to to my action class all values received are null.
Here is a part of code:
the jsp file: letter.jsp
<form target="_self" action="/Test/editLetter.do" name="letterTF">
<table>
<tbody>
<tr>
<th>
No of objects
</th>
<th>
Weight
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
Package
<input name="package" id="package" type="checkbox">
</td>
<td>
<input name="package_No" type="text" value="<%=currentBean.getPackageNo() %>"> <%-- from session...have to edit some date from a data base--%>
</td>
<td>
<input name="package_weight" type="text" value="<%=currentBean.geWeight()%>">
</td>
<td>
<input name="description" type="text" value="<%=currentBean.Description()%>"
></td>
</tr>
<tr>
..................................................... <%-- It's a big form --%>
</tr>
<tr>
<input type="submit" name="send" value="Send">
</tr>
</tbody>
</table>
</form>
struts-config.xml:
<form-bean
name="letterTF"
type="Test.LetterForm">
</form-bean>
<action path="/editLetter"
type="Test.LetterAction"
name="scrisoareTF"
input="/letter.jsp"
scope="request"
validate="false">
<forward name="success" path="/index_orders.jsp"/>
</action>
The ActionForm class:
public class LetterForm extends ActionForm{
private String package;
private String package_No;
private String package_weight;
public void setPackage(String package){
this.package = package
}
public String getPackage(){
return package;
}
.......................................
}
The action class:
public class LetterAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception{
String package;
String package_No;
String package_weight;
LetterForm letterTF = (LetterForm) form;
package = letterTF.getPackage();
package_No = letterTF.getPackageNo()
package_weight = letterTF.getPackageWeight();
System.out.println("Package: "+package);//it will print Package: null
System.out.println("Weight: "+weight);//it will print Weight: null
System.out.println("Description "+description) //it will print Description: null
}
}
As I observed its not making the set methods from LetterForm.java
I am dealing with this bug for a couple of days an i didn't managed to break it. If anyone has an idea or a solution would he be so kind to share it with me
Thanks in advance,
David

