Reputation: 1492
I have two hidden fields in my jsp form. When i get the page in browser and do 'view source', I could see only the first hidden field, not the second field.
<input type="hidden" name="url" id="url" value="<%=url%>" />
<input type="hidden" name="age" id="age" value="<%=age%>" />
Is the syntax wrong? Please help
Update:
Code:
<form name="displayForm" action="javascript: submitPage();">
<input type="hidden" name="url" id="url" value="<%=url%>" />
<input type="hidden" name="age" id="age" value="<%=age%>" />
<span class="notice required">* indicates required field</span> Source in the browser is
<form name="displayForm" action="javascript: submitPage();">
<input type="hidden" name="url" id="url" value="unix.com"; />
<span class="notice required">* indicates required field</span>
Upvotes: 0
Views: 1862
Reputation: 3865
which browser do you use? Did you try to inspect it with some sort of "developer tool" (Chrome - Developer tools, FF - Firebug, IE8+ - Developer tools)?
When you submit the form what happens, what do you get for "age"?
Upvotes: 0
Reputation: 5666
Make sure that the tomcat serving the JSP has actually deployed your changes. Try to locate the file "jspfilename_jsp.java" and look if your hidden field statements are actually in there. You might want to take a look at Lambda Probe for Tomcat, which cleans the cache with a click of a mouse, forcing a rebuild.
Upvotes: 2
Reputation: 240928
No. It must be there. You might be conditionally rendering it.
Upvotes: 1