JSP simple Exercise-page redirection

Source: Internet
Author: User

In JSP programming, it is often to redirect the page, such as in the page program to add a judgment statement that satisfies the condition to go to a page, does not meet the conditions to another page.

The following is a simple example:

<%@ page contenttype= "text/html; charset=gb2312"%>
In this procedure, a form is declared, the data is submitted to this page, the form is submitted when the option to change the dropdown box is changed, and in the program, the page is redirected with the Sendredirect () method of the response object after it receives the address to be turned in the submitted form. In the program to determine whether the received parameters are empty, because the data submitted to this page, when the form data is not submitted, the data of the corresponding data will be empty, the page is not redirected.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.