java - JSP Form is picking the edited value in FireBug -


i have form submitted in jsp file. when submit, form uses value coming hidden value, id.

<input type="hidden" value="1234" name="id"> 

prior submit, able run firebug , edit input value non-numeric value (e.g abc). when submit form, apparently form picks new value , throws error (id cant non-numeric).

how can solve issue? thanks,

might it's can set session variable id , remove hidden field . , session variable wanted .

example :

jsp sessions

if programming site, helpful able associate data each visitor. purpose, "session"s can used in jsp.

a session object associated visitor. data can put in session , retrieved it, hashtable. different set of data kept each visitor site.

<%    session.setattribute( "id", yourid ); %> <html> <body> <a href="nextpage.jsp">continue</a> </body> </html> 

the savename.jsp saves id in session, , puts link page, nextpage.jsp.

nextpage.jsp shows how retrieve saved name.

<html> <body> hello, <%= session.getattribute("id") %> </body> </html> 

if bring 2 different browsers (not different windows of same browser), or run 2 browsers 2 different machines, can put 1 name in 1 browser , name in browser, , both names kept track of.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -