Q1) i m using spring MVC and using mozilla 3.5 to access my page .
i m having a problem that it is returning me null values when filling my
jsp page .
my code is.........
my command class is TravelReview.java
code-> public class travelReview{
public
String getClientName() {
return clientName;
}
public void setClientName(String clientName) {
this.clientName = clientName;
}
}
name of my command class in controller is
public LiftServiceTravelReviewFormController()
{
setCommandClass(TravelReview.class);
setCommandName("TRAVELFORM");
}
my jsp page is ->
<form method="post" commandName="TRAVELFORM">
<table>
<spring:hasBindErrors name="TRAVELFORM">
<tr>
<td><b>There were following number of errors
${errors.errorCount} </b>
</td>
</tr>
<tr>
<td>
<ul>
<c:forEach var="errorobj" items="${errorlist.allErrors}">
<li><font color="red"><spring:message
code="${errorobj.code}" text="${errorobj}" /></font>
</li>
</c:forEach>
</ul>
</td>
</tr>
</spring:hasBindErrors>
</table>
<table border="0" width="100%" cellpadding="0" cellspacing="0"
bgcolor="A0A0A0">
<tr>
<td></td>
</tr>
<tr>
<td width="100%" align="center"><font face="bold" size="4"
color="#000000"><b>This feedback is for the agent giving description about the client!!</b></font>
</td>
</tr>
</table>
<table>
<tr>
<td></td>
</tr>
</table>
<table width="50%" border="1" bgcolor="A0A0A0">
<tr>
<td height="70%" align="left"></td>
</tr>
<tr>
<spring:bind path="TRAVELFORM.clientName">
<td align="center"><%=TravelReviewProviderConstant.CLIENT_NAME%></td>
<td align="left">
<input type="text" name="clientName" size="15"
value="${status.value }" width="10"></input>
</td>
<c:if test="${status.error}">
<p>There was an error while entering ClientName</p>
</c:if>
</spring:bind>
</tr>
--------------------------------------------------------------------------------------------------------------
Q2) also im using checkbox in my JSP page and want to return boolean value while submitting form in database but due to mozilla 3.5 it is returning null value so give me some idea to validate checkbox and it is not mandatory that client should click the checkbox while validating .
note that it does not return a null pointer exception in both the cases....
please do reply as soon as possible........