I have a strange issue with dropdown boxes in jsp/servlet. Here it is...
<select name="locdropdown" onchange="javascript:change()" >
<%
for(LocationDO locationDO : locationList){%>
<option value=<%=locationDO.getLocationName().trim()%>><%=locationDO.getLocationName().trim()%></option>
<%} %>
</select>
values displayed are:
BI Sholingar
BI Mahindra City
BI Sanand
Rolltec_DTA
Aztec Auto Ltd
BI Gurgoan
and here is how I try to read it in servlet.
String locclasses = req.getParameter("locdropdown");
System.out.println(locclasses);
assume I select Aztec Auto Ltd
then expected output from servlet is same right. But output is Aztec
. similarly, if I select BI Sanand, the actual output that comes is BI
Can someone help please