JAVA EE, JSP form Cancel button and submit button Name property naming problem

Source: Internet
Author: User

<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%><%@ taglib prefix= "s" uri= "/ Struts-tags "%><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >{%> <font color= "Red" ><%=error%></font> <%}    %> <form action= "Register" name= "form" method= "POST" > <table> <tr>                    <td> User name </td> <td><input type= "text" Name= "Register.username"                Value= ' <s:property value= ' register.username '/> ' ></td> </tr> <tr>                    <td> password </td> <td><input type= "password" name= "Register.password"                Value= ' <s:property value= ' Register.password '/> ' ></td> </tr> <tr>                    <td> email </td> <td><input type= "text" Name= "Register.email"                Value= ' <s:property value= ' register.email '/> ' ></td> </tr> <tr> <td> phone </td> <td><input type= "text" name= "Register.phone" value = ' <s:property value= 'Register.phone "/> ></td> </tr> <tr> <td><input type= "Submit" name= "register" value= "registration" > </td> <td><input type= "reset" Name= "R Egister "value=" Reset > </td> </tr> </table> </form></body& Gt;

The reason for the 404 error (as shown in 1) is that the following button is named with the same name as the object, as shown in 2.

<td><input type= "Submit" name= "register" value= "registration" >                </td>                <td><input type= " Reset "name=" register "value=" Reset >                </td>


Figure 2

Figure 1

JAVA EE, JSP form Cancel button and submit button Name property naming problem

Related Article

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.