I have a jsp page which has drop down list, so that user can select one of the value from the drop down list.
I am using DynaValidatorActionForm
.
Some values contain single quote like (Java's). when i receive the value from server side the single quote is not populated in the form, instead it returning (Javas). Can some one help me in identifying the issue with this? What all things i have to handle for this scenario?
<form-bean name="studentForm" type="org.apache.struts.validator.DynaValidatorActionForm">
<form-property name="name" type="java.lang.String" />
<form-property name="language" type="java.lang.String" />
</form-bean>
<action path="/hello" name="studentForm" type="com.msn.java.StudentAction" scope="session" validate="false"
parameter="_" >
<forward name="success" path="/jsps/hello.jsp" />
<forward name="failure" path="/jsps/failure.jsp" />
</action>
Java class
public ActionForward hello(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
{
String language=(String)((DynaActionForm) form).get("language");
}