Novice must master the basic SERVLET,JSP,JDBC development general process

Source: Internet
Author: User

First, create entity beans (entities)

Second, create a database connection

Third, the establishment of the DAO service layer (generally written as an interface, and then directly in the service layer to implement its method)

Iv. Writing Service Tiers

V. Writing a servlet

(Understanding of a few simple methods in the servlet layer)

1.request.setattribute (Name,value) is used to store the values obtained from the database in the invocation service in the request scope

2.req.getrequestdispatcher ("list.jsp"). Forward (REQ,RESP) means that the value is passed to the JSP page, and the forward method can only get internal resources. We should clarify the difference between him and Sendredirect ().

Vi. Configure the service to be written in the Web. xml file

1. The configuration is simplified as follows

<servlet>

<servlet-name></servlet-name>

<servlet-class></servlet-class>

</servlet>

<servlrt-mapping>

<servlet-name></servlet-name>

<url-pattern></url-pattern>

</servlet-mapping>

Vii. Writing JSP pages

I am also a novice this is I write code is the side of the summary of writing, there are many do not understand, ask the big God message, thank you.


This article from the "12212886" blog, reproduced please contact the author!

Novice must master the basic SERVLET,JSP,JDBC development general process

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.