the application has a button and starts with the number 0, and each time the button is clicked on, the integer is increased by 1.
the problem is I have to incorporate it with this code and covert string "0" to integer 0
<%
int x = 0;
try { x = Integer.parseInt("0"); }
catch (Exception e) { x = 0; }
%>
also how would I continue to stay on the same page to click on the button to add one (do I put the code within the html?)
this is what I have so far:
<html>
<body>
<form method="post" action="index.jsp" />
<%
String integer = request.getParameter("0");
%>
<%
int x = 0;
try { x = Integer.parseInt("0"); }
catch (Exception e) { x = 0; }
%>
<input type="text" name="integer" value="<%=integer%>"/>
<input type="submit" value="submit" />
</form>
</body>
</html>