Java & J2EE Page 8 - Developing JavaServer Pages |
When you code a Form tag that requests a JSP, you can code a Method attribute that specifies the HTTP method that's used for the request. The Get method is the default HTTP method, but the Post method is also commonly used. Figure 8 presents the pros and cons of using the Get and Post methods. With either method, you can still test the page by appending the parameters to the URL string. So the question really comes down to selecting the appropriate method for the finished web application. Figure 8: When to Use the Get and Post Methods An HTML form tag that uses the Post method <form action="show_email_entry.jsp" method="post"> A JSP Requested Through the Post Method
When to Use the Get Method
When to Use the Post Method
Description You can test a JSP that uses either method by appending the parameters to the URL.
blog comments powered by Disqus |