Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
/* Do this at the top of the page */
String inputPageURL = "/input.jsp";
int numberInput = 0;
try {
numberInput = Integer.parseInt(request.getParameter("numberInput"));
}
catch (NumberFormatException nfe) {
request.setAttribute("errorMessage","Invalid Input");
/* Redirect Request to Input Page */
try {
RequestDispatcher rd = request.getRequestDispatcher(inputPageURL);
rd.forward(request,response)
}
catch (Exception e) {
/* Do your error handling */
}
}
/* REST OF PAGE */
%>
<%
String errorMessage = request.getAttribute("errorMessage");
if (errorMessage != null) {
out.println(errorMessage);
}
/* REST OF THE PAGE */
%>