List of tools or API listings to be familiar with

Source: Internet
Author: User

1. Properites load profile Web path settings

2, Commonutils.uuid ()

3. Txqueryrunner C3P0 Database Connection pool

4, Mailutil (SMTP service of mailbox to open otherwise fail connected)

5, Messageformat to complete the replacement of the placeholder

6. Encapsulate the form data into the user object user Formuser = Commonutils.tobean (Req.getparametermap (), user.class);

7. Alt+shit+s popup Menu

8. Custom exception throws Userservlet layer in UserService layer catch exception and set request domain forward to msg.jsp page

1 UserService2 3         Try {4User User =Userdao.findbycode (code);5             if(User = =NULL)6                 Throw NewUserexception ("Invalid Activation Code");7             if(User.isstatus ())8                 Throw NewUserexception ("You have activated, cannot be activated two times!") ");9Userdao.updatestatus (User.getuid (),true);Ten}Catch(SQLException e) { One             //TODO auto-generated Catch block A             Throw NewRuntimeException (e); -}

1 Userservlet2 //activation function3      PublicString Activation (httpservletrequest req, HttpServletResponse resp) {4         //System.out.println ("Activation");5         //1. Get the Activation Code6         //2, to the service activation function to activate7         //The service method may run out of exception to save the exception information to the request8         //forward to msg.jsp display9String code=req.getparameter ("Activationcode");Ten         Try { One userservice.activation (code); AReq.setattribute ("Code", "Success"); -Req.setattribute ("msg", "Congratulations on activation success, please login now!") "); -}Catch(userexception e) { theReq.setattribute ("MSG", E.getmessage ()); -Req.setattribute ("Code", "Error"); -              -         } +         return"F:/jsps/msg.jsp"; -}

9, about the conversion of SqlException IOException to new RuntimeException (e).

List of tools or API listings to be familiar with

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.