Dynamic Web Pages using JSP - Lab Deliverable 12

1. Viết một chương trình để hiển thị một trang giới thiệu về phía trước hành động. Cung cấp một liên kết trên trang demo để chuyển tiếp các đầu ra vào một tập tin JSP. Hiển thị thông báo cho người sử dụng khi người dùng nhấp chuột vào liên kết. Giải pháp: Các tập tin được sử dụng để chạy các ứng dụng là: 1. 2. 3. | Lab Deliverable 12 Using Actions Part II 1. Write a program to display a forward action demo page. Provide a link on the demo page to forward the output to another JSP file. Display a message to the user when the user clicks on the link. Solution The files used to run the application are 1. 2. 3. sp html head title Using Include Actions title head body h1 Using Forward Actions h1 a href Click here for Forward Action a body html Enter the code in Notepad and save the file as index. j sp in TOMCAT_HOME webapps . sp DOCTYPE HTML PUBLIC - W3C DTD HTML Transitional EN html head title Sample First Document title head body h1 br You are being forwarded to this page h1 body html Save the file as Forward_Demo .jsp in TOMCAT_HOME webapps . Using Actions Ver 2005 Aptech Limited 1 sp @ taglib uri tags struts-bean prefix bean @ taglib uri tags struts-html prefix html @ taglib uri tags struts-logic prefix logic html html locale true head title bean message key title html base head body bgcolor white logic notPresent name scope application font color red ERROR Application resources not loaded -- check servlet container logs for error messages. font logic notPresent h3 bean message key h3 p bean message key p body html html Save the file as Welcome .jsp in TOMCAT_HOME webapps Session21 directory. Enter the path http localhost 8080 in the address bar. A welcome page appears as shown in Figure . Figure Forward Action Page 2 Ver 2005 Aptech Limited JSP and Struts Click on the link on the forward action page to see the implementation of forwardaction. The output appears as shown in Figure . Figure Result Page 2. Write a program to provide three colors to the user in a drop-down list. When the user selects a color and clicks on Submit button dispatch

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.