First, Web.xml
1.
init-param>
servlet>
2.
taglib>
Second, Struts-Config.xml
Type = "org.apache.struts.validator.dynavalidatorform"> form-bean> 2. global-forwards> 3. .................. .................. action-mappings> 4.
Local or Global "Forward" Rather Than A Module-Relative Path -> controller> 5. message-resources> 6. plug-in> Property = "Pathnames" Value = "/ Web-inf / validator-rules.xml, /Web-inf/Validation.xml "/> plug-in> Third, struts-config-registration.xml Define the relevant operations of the registration: 1. Form-bean: RegistrationForm 2. Global-Forwards: 3. Action-mapings: TYPE = "ZWD_10.EDITREGISTRATIONATIONACTION" Attribute = "registrationform" Scope = "request" Validate = "false"> action> TYPE = "ZWD_10.SAveRegistrationAction" Name = "registrationform" Scope = "request" Input = "registration" /> 4, Java file content Constants: // constant class Public Final Class Constants { Public static final string package = "zwd_10"; Public static final string database_key = "database"; Public static final string subscription_key = "subscription"; Public static factory string user_key = "user"; 2. User: // Interface Public interface user { Public userDatabase getDatabase (); Public string getFromaddress (); Public void setfromaddress (String fromaddress); Public string getFullName (); Public void setfullname (String Fullname); Public string getpassword (); Public void setPassword (String Password); Public string getreplytoaddress (); Public void setReplyToaddress (String replytoAddress); PUBLIC SUBSCRIPTION [] GetSubscriptions (); Public String getUsername (); Public Subscription CreateSubscription (String Host); Public Subscription FindSubscription (String Host); Public void RemoveSubscription (Subscription Subscription); MemoryUser: // Implement the USER interface 3. UserDatabase: // Interface Public interface userdatabase { Public user createuser (String UserName); Public void close () throws Exception; Public user finduser (String username) Public user [] findusers (); Public void open () throws exception; Public Void Removeuser (User User); Public void save () throws exception; MemoryUserDatabase: // Implement MemoryUserDatabase interface 4. Subscription: // Interface Public interface subscription { Public Boolean getautoconnect (); Public void setAutoconnect (Boolean AutoConnect); Public String gethost (); Public string getpassword (); Public void setPassword (String Password); Public String gettype (); public void settype; Public user getuser (); Public String getUsername (); Public void setusername (String Username); MemorySubscription: // Implement MemoryUserDatabase interface 5. MemoryDatabasePlugin: // Implement the PLUGIN interface, which is described in Struts-Config.xml 5. App.TLD (Custom Label) 1. Statement Checklogontag ---- Corresponding Checklogontag.java Checklogontag: // Extends Tagsupport interface 2. Declaration LinksubscriptionTAG ---- Corresponding to LinkSubscriptionTAG.JAVA LinkSubscriptionTAG: // Extends Tagsupport interface 3. Declaration LinkUsertag ---- Corresponding to LinkUsertag.java LinkUsertag: // Extends Tagsupport interface Sixth, registration part Seven, Logon section Eight, logoff part Nine, Subscription section The above content is my own understanding, please also ask all criticism to correct, thank you.