user6454491 user6454491 - 2 years ago 72
Java Question

Is it possible to assign a html form the value of a java String?

Is it possible to do something like this:

<form action="foo" method="get">
<input type="hidden" name="ID" value="<% classInstance.getID(); %>">

Each time I try, the receiving Servlet does not display the Id of the classInstance.

How can I make this work?

Answer Source

Try this instead :

<%= classInstance.getID() %>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download