Bài 7: Lập trình web với struts 2_TS Nguyễn Mạnh Hùng

52 5K 3
Bài 7: Lập trình web với struts 2_TS Nguyễn Mạnh Hùng

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Lập trình mạng Lập trình web với Struts 2 Giảng viên: TS. Nguyễn Mạnh Hùng Học viện Công nghệ Bưu chính Viễn thông (PTIT) 2 Nội dung  Giới thiệu về Struts 2  Lập trình web với JSP – Java - Tomcat  Bài tập Struts 2 4 Java – JSP - Tomcat DB BeanDAO Control x.JSP doX.JSP 5 Ví dụ: login trên web DB entity.Userdao.UserDAO Home.jsp doLogin.jsp UserHome.jsp 6 Struts2 với Eclipse (2) Bước 1: Cài đặt môi trường JDK, tomcat và axis: Giải nén tập tin jakarta-tomcat-4.0.6.zip tại C:\Webservice\jakarta- tomcat-4.0.6 Giải nén tập tin xml-axis-beta1.zip tại C:\Webservice\xml-axis-beta1 Cài đặt JDK tại C:\Program Files\Java\jdk1.6.0_21 Copy thư mục axis (C:\Webservice\xml-axis-beta1\webapps\axis) vào trong thư mục webapps (C:\Webservice\jakarta-tomcat- 4.0.6\webapps) Copy tập tin xerces.jar (C:\Webservice\jakarta-tomcat- 4.0.6\common\lib\xerces.jar) vào trong thư mục lib (C:\Webservice\jakarta-tomcat-4.0.6\webapps\axis\WEB-INF\lib) 7 Struts2 với Eclipse (2) - New project → Dynamic web project 8 Struts2 với Eclipse (3) - Chọn tên - Click finish 9 Struts2 với Eclipse (4) - Tạo các thư mục và các file tương ứng: 10 Struts2 với Eclipse (5) - Add các file thư viện vào thư mục WEB-INF/lib: [...]... } 12 web. xml Struts Blank struts2 org.apache .struts2 .dispatcher.ng.filter... org.apache .struts2 .dispatcher.ng.filter StrutsPrepareAndExecuteFilter struts2 /* index.jsp < /web- app> 13 struts. xml ... again 26 web. xml Struts Blank struts2 org.apache .struts2 .dispatcher.ng.filter... org.apache .struts2 .dispatcher.ng.filter StrutsPrepareAndExecuteFilter struts2 /* login.jsp < /web- app> 27 struts. xml ... 2.0//EN" "http:/ /struts. apache.org/dtds /struts- 2.0.dtd"> /index.jsp /HelloWorld.jsp < /struts> 14 index.jsp (1) /login.jsp Welcome Xin chao, ! 31 Trang success.jsp (2) 32 Bài tập  Cài đặt bài toán quản lí khách sạn theo mô hình struts2 33 Login với struts 2 và hibernate Tạo project 35 Bảng User 36 ... name="success">/success.jsp /login.jsp < /struts> 28 Trang login.jsp (1) Struts 2 - Login Application Struts 2 - Login Application Basic Struts 2 Application - Welcome Welcome To Struts 2! Hello... taglib prefix="s" uri=" /struts- tags" %> Hello World! 17 Helloworld.jsp (2) 18 Ví dụ 1: Login dùng struts 2 Tạo project . (C:Webservicejakarta-tomcat-4.0.6webappsaxis WEB- INFlib) 7 Struts2 với Eclipse (2) - New project → Dynamic web project 8 Struts2 với Eclipse (3) - Chọn tên - Click finish 9 Struts2 với. trình web với Struts 2 Giảng viên: TS. Nguyễn Mạnh Hùng Học viện Công nghệ Bưu chính Viễn thông (PTIT) 2 Nội dung  Giới thiệu về Struts 2  Lập trình web với JSP – Java - Tomcat  Bài tập Struts. http://java.sun.com/xml/ns/j2ee /web- app _2_ 4.xsd"> <display-name> ;Struts Blank</display-name> <filter> <filter-name> ;struts2 </filter-name> <filter-class> org.apache .struts2 .dispatcher.ng.filter.

Ngày đăng: 13/08/2014, 11:13

Từ khóa liên quan

Mục lục

  • Slide 1

  • Slide 2

  • Slide 3

  • Slide 4

  • Slide 5

  • Slide 6

  • Slide 7

  • Slide 8

  • Slide 9

  • Slide 10

  • Slide 11

  • Slide 12

  • Slide 13

  • Slide 14

  • Slide 15

  • Slide 16

  • Slide 17

  • Slide 18

  • Slide 19

  • Slide 20

Tài liệu cùng người dùng

Tài liệu liên quan