Application and operation of SSH integration based on Java EE Example II (CRUD operation and configuration)

Source: Internet
Author: User
Tags ssh

CRUD is the acronym for adding (Create), Querying (Retrieve) (re-obtaining data), updating (update), and deleting (delete) of several words while doing calculation processing. It is mainly used to describe the basic operation function of database or persistence layer in software system.

In computing, the CRUD is a acronym for Create, retrieve, update, and delete. It is used to refer to the basic functions of a database or persistence layer in a software system.

C reate New records

R Etrieve Existing Records

U pdate Existing Records

D elete existing records.

In response to the new Department request, the deployment of the orchestration is completed by importing the Struts profile (struts-config.xml). It connects Depadd.jsp and Depadd.do. A client request is generated on the depadd.jsp, and Depadd.do responds to the request and processes the data on the JSP page. When you click on the Save button on the depadd.jsp

(  <div style="float: right; padding: 10px 25px 0 0;">
       <div class="right_button">
       <a href="#" onclick="check();return false;"><bean:message
                 key="go.add" /> </a>
       </div>
</div>)

Check the correctness of the page data first, the input data will be deposited into userinfoform this formbean with the set method after checking pass.

function Check ()
{
var userName = document.userinfoForm.userName.value;
var password = document.userinfoForm.password.value;
var length = document.userinfoForm.password.value.length;
var repassword = Document.userinfoForm.repassword.value;
var tel = document.userinfoForm.tel.value;
var department = Document.userinfoForm.department.value;
if (username== "")
{
Alert (' departmental administrator name cannot be empty! ')
return false;
}

if (password== "")
{
Alert (' Password cannot be empty! ')
return false;
}
if (length<6| | LENGTH>10)
{
Alert (' Password must be greater than 6 characters or less than 10 characters! ')
return false;
}
if (repassword== "")
{
Alert (' Duplicate password cannot be empty! ')
return false;
}
if (Password!=repassword)
{
Alert (' Password input is inconsistent!        ')
  return false;
}
if (tel!= "")
{
No = "0123456789 () +-"
for (i=0; i<tel.length ;                      i++)
{
var checkstr = Tel.charat (i);
if (No.indexof (checkstr) = = 1)
{
Alert ("Incorrect contact phone format!");
return false;         
}
}
}
if (department== "")
{
Alert (' Department admin department cannot be empty! ')
return false;       
}

Else
{
Document.userinfoForm.submit ();
}

}

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.