Invoking a JSP from within an HTML Form
Typing the JSP’s URL on the address line in your browser is one way to invoke a web application. However, when you use JSPs to build a user interface, you will often invoke JSPs from HTML forms. For example:
<%@ page language="java" contentType="text/html" %>
<html>
<h1>Sample Form</h1>
<p>
<form name="edit" method="post" action="sampleFormAction.jsp">
Your Name
<input name="Name">
<input type=SUBMIT value="Go!">
</form>
</html>
In this example, the JSP called sampleFormAction.jsp executes when the user clicks
Go!. For more information about accessing the form input variables, see the description of the
<webm:value> tag in
webMethods Tag Library for JSP.