12 configuration of the input logical view

Source: Internet
Author: User

Five logical view names are available in the action interface

    • SUCCESS
    • ERROR
    • LOGIN
    • Input:input is used in some interceptors
    • NONE

Configure logical View: Struts_demo2.xml, error message after configuration will jump to the specified page

<?XML version= "1.0" encoding= "UTF-8"?><!DOCTYPE struts Public "-//apache software foundation//dtd struts Configuration 2.3//en" "Http://struts.apache.or G/dtds/struts-2.3.dtd "><Struts> < Packagename= "Demo2"extends= "Struts-default"namespace="/">  <Global-results>  <!--go back to the current page as soon as it goes wrong -  <resultname= "Input">/demo2/demo1.jsp</result>  </Global-results>  <Actionname= "UserAction1"class= "Com.itheima.struts2.demo2.UserAction1"Method="">     </Action>    </ Package>           </Struts>

Enter the wrong type of information in the JSP, such as age:

Configure input to jump and display error message:

12 configuration of the input logical view

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.