Java online mall project part 1 user registration module

This article explains the user registration module of the mall project for your reference. Let's take a look at the renderings first:

1. Front desk JS verification:

Event trigger: onsubmit = "checkform()"

2. Use ajax to check whether the asynchronous user name exists

① Event trigger: onblur = "checkusername()"

②AJAX

3. Data verification of background struts 2

①. Write < form action = "${pagecontext. Request. Contextpath} / user in the form_ regist. action”/>

②. Write methods in action

③. Complete data verification:

Create a class name under the package where the action is located - access path corresponding to the method - validation xml

UserAction-user_ regist-validation. xml

4. Send activation email

① Introduce two packages: activation jarmail. jar

②UserService. java

③MailUtils

5. User activation

Click the connection in the email to submit to action Receive activation code in action: query the user according to the activation code: * if found: * modify the user status * if there is no user: * activation failed:

GitHub complete code: https://github.com/ganchuanpu/itcastshop

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>