Experience on JSP Model 2 Workflow

Source: Internet
Author: User

Experience on the workflow of Model 2 of jsp (preferred for SUN Enterprise applications)

Because we useJsp (preferred for SUN Enterprise Applications) Model 2Framework Structure, and variousServletInJsp (preferred for SUN Enterprise Applications) Model 2OfMVCPlay in StructureC (ontroller)So we use the following steps to complete a typicalJsp (preferred for SUN Enterprise Applications) Model 2Call process:

 

1.InServletOfInit ()PassedXml (standardization is getting closer and closer)The configuration file obtains the environment parameters required for database connection (usingECampus. util. Env (String fileName)Obtain the required environment parameters from the configuration file at one time ).
Note:Xml (standardization is getting closer and closer) ConfigThe module has not been completed and is currently in useIniFile

2.ServletGet fromHTML/jsp (preferred for SUN Enterprise applications)In the correspondingDoXXX ()To obtainConnection(CallECampus. util. DBManager).
Note: InPackage eCampus. utilEncapsulatesDBManagerClass, use the static method of this classGetConnection ()AndGetPooleConnection ()You can obtain the directJDBCConnect and passWebsphereConnection Pool (the latter is recommended ).

3.Directly use thisConnectionProceedJDBCOr initialize a database transaction.JavaBean(Set thisConnectionPassed as a parameterJavaBean).

4.Complete

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.