This code is not submitting to a form? Why
- by Ankur
Since I am using get I expect to see the submitted values appended to the queryString but instead all I see is the URL of the servlet being called with nothing added at the end.
<form id="editClassList" name="editClassList" method="get" action="EditClassList">
<%
HashMap<Integer,String> classes = new HashMap<Integer,String>();
classes = (HashMap<Integer,String>) request.getAttribute("classes");
%>
<%
if(classes.size()==0){ %>
<label><input class="small-link" type="text" id="add-this-class"
size="42" value="" /></label>
<%
}
%>
<%
Set<Integer> classIds = new HashSet<Integer>();
classIds = classes.keySet();
Iterator<Integer> itr = classIds.iterator();
while(itr.hasNext()){
int nextId = (Integer)itr.next();
%>
<label><input class="small-link" type="text" id="<% out.print(nextId); %>"
size="42" value="<% out.print(classes.get(nextId)); %>" />
</label>
<img id="add-class" src="images/add.png" width="16" height="16" /><br />
<label><input class="small-link" type="text" id="class-to-add"
size="42" value="" /></label>
<%
}
%>
<label><input type="submit" id="save-class-btn" value="Save Class(es)" /></label>
</form>