'The NetBeans E-commerce Tutorial'에 해당되는 글 1

  1. 2011.01.23 [The NetBeans E-commerce Tutorial] 5. Preparing the Page Views and Controller Servlet

[The NetBeans E-commerce Tutorial] 5. Preparing the Page Views and Controller Servlet

[todo] 이거에 대한 화면 캡쳐를 보여주면 이해가 잘될거 같다.

http://netbeans.org/kb/docs/javaee/ecommerce/page-views-controller.html

- index.jsp affablebean.css

  • width와 height로 위치를 잡고 background로 공간이 보이게 한다.
  • margin: 20px auto
    위, 아래로 20px을 띄우고, auto로 좌, 우로도 그만큼 띄운다.
  • float: left
    좌, 우측 컬럼을 만든다.
  • clear: left
    footer에 넣어서 위쪽 border가 표시되게 한다.
    (이게 없으면 footer가 제대로 보이지 않는다.)

- div 로 페이지 구조 잡기
  1. Create the structure in HTML.
  2. Create a set of styles to define the appearance.
  3. View the page to examine the results of your changes.

- jsp 파일을 WEB-INF/view/ 로 옮김.

- Creating a Header and Footer
include를 해도 되지만 모든 페이지에서 반복해야 한다.
header와 footer를 지정하는 방법이 있다.
web.xml 에 추가
- Controller Servlet 작성