Hello
I am having problems with what you have adviced me.
I have a variable called patronId on a jsp page. I want to pass it to a servlet which will then call the database class and query values.
How can i insert the patronId and the form can remember it cause I have tried this....
String patronId = ""+1234 ;
out.println("<input type=\"hidden\" name=\"bookId\" value=\"+bookId+\" size=\"25\">") ;
hope u understood got me
> hello
>
> this is working fine: out.println("<input
> type=\"hidden\" name=\"bookId\" value=\"+bookId+\"
> size=\"25\">") ;
>
> works fine
>
> thnks
I guess you didn't understand me. Look to the difference between the following two statements:
out.println("<input type=\"hidden\" name=\"bookId\" value=\"+bookId+\" size=\"25\">") ;
and
out.println("<input type=\"hidden\" name=\"bookId\" value=\""+bookId+"\" size=\"25\">") ;
In the first you're handling the bookId variable as String, in the second it will use the actual value of bookId.