shragi
asked on
hidden fields in jsp
<form method="post">
<select name ="getselected" id="getselected">
<option>fox</option>
<option>fox2</option>
<option>fox3</option>
</selected>
<input type="hidden" name="hidden" value="<%=getselected%>">
</form>
on server side
String selectedvalue = (String)request.getParamet er("hidden ");
when i use hidden field in jsp it showed me an error
Multiple annotations found at this line:
- Tag (input) should be an empty-
element tag.
- getselected cannot be resolved to a
variable
<select name ="getselected" id="getselected">
<option>fox</option>
<option>fox2</option>
<option>fox3</option>
</selected>
<input type="hidden" name="hidden" value="<%=getselected%>">
</form>
on server side
String selectedvalue = (String)request.getParamet
when i use hidden field in jsp it showed me an error
Multiple annotations found at this line:
- Tag (input) should be an empty-
element tag.
- getselected cannot be resolved to a
variable
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this
String selectedvalue = (String)request.getParamet