Press release System (home)

Source: Internet
Author: User

First, build a Web project, tune the Tomcat container, and then import the JDBC Jar package

Partitioning the architecture to fix:

Two. The entity layer, the DAO layer, and the implementation layer are like OOP, where layers interact with layers, specifically the business Logic layer (servlet)

Build a Newservlet class and then inherit HttpServlet thereby inheriting its doget (), DoPost () method in Doget

Call Dopost (request, response);

Dopost the generic collection into the request scope and forwards it.

Enter index.jsp to get the title position for the page display:

<%List<NewsEntity> list= (list<newsentity>) request.getattribute ("List"); for (newsentity item:list) { %><li><a href= ' newspages/news_read.jsp ' > <%=item.getnewstitle ()%> </a><span> < %=item.getnewscreatedate ()%> </span></li><%}%>

Tip: Finally, change the path on the Web. Xml page.

Press release System (first page)

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.