17 August 2016

Cấu trúc Jsp & Servlet trong Java NetBeans

Cấu trúc Jsp & Servlet trong NetBeans

Khi đưa lên hosting online ta cần lấy fle đuôi .war và upload lên hotting dành cho java
vidu: Tôi dùng Netbeans thì file .war sẽ 
nằm Documents\NetBeansProjects\WebApplication1\dist
Tạo mới file index.jsp  new > jsp
Tạo mới file Display.java  new > servlet
Mỗi lần tạo 1  file servlet ".java" mới thì web.xml lại tự bổ xung thêm vào các đoạn code cần thiết
2 Cách viết code java trong jsp html

Dưới đây là phần chạy file index.jsp
 Đăng nhập đúng user & pass 'xem ở Display.java' thì 
submit Acttion 'xem ở index.jsp' đến display và gọi home.jsp

 

BACK TO TOP

Xuống cuối trang