title: how to add one to integer on submit button to jsp string?
body: <pre><code>&lt;input type="text" name="integer" value="0"/&gt;
  &lt;input type="submit" value="add one" /&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;% 
  String integer = request.getParameter("integer"); 
  %&gt;
  
  &lt;%
  int x = 0;
  try { x = Integer.parseInt("integer"); }
  catch (Exception e) { x = 0; }
  %&gt;
  </code></pre>
  
  <p>How can I add one to the integer each time I hit the submit button?</p>