Sử dụng Java Server Pages (JSP) Tags 1. Viết một chương trình bằng cách sử dụng phương pháp () để nhập tên và mật khẩu của người dùng và hiển thị đầu ra trên một trang JSP. Giải pháp: Các tập tin được sử dụng để chạy các ứng dụng là: | Lab Deliverable 2 Using Java Server Pages JSP Tags Part II 1. Write a program using the request. getParameter method to enter the Name and Password of a user and display the output on another JSP page. Solution The files used to run the application are 1. 2. html head title Example of Implicit Objects title head body h1 User submission form h1 form action method post Enter User Name input type text name uname br br Enter Password input type password name pname br br input type submit name submit value Submit form body html Save the code as in the C Tomcat Webapps basic directory. html head title Example of Implicit objects title head body font face Times New Roman size 3 Thank you for your submission. Your information has been successfully added to the database br br 9 String sUName uname String sPName pname Using Java Server Pages JSP Tags Ver 2005 Aptech Limited 1 o User Name sUName br Password sPName br font body html Save the code as in the C Tomcat Webapps basic directory. The output of the program is as shown in Figure . Figure Output of The user enters the information and clicks the Submit button. The control is transferred to the page. 2 Ver 2005 Aptech Limited Java and Struts The output of the program is as shown in Figure . Figure Output of 2. Write a program that uses the response. setHeader method to display the date. In addition set the response header attribute and utilize the JSP expression tag. Solution 1. The file required to run the application is . The file is to be saved in C Tomcat Webapps basic directory. sp html head title Example of JSP Implicit Object title @ page import head body bgcolor ffffff font color Black h2 This example gives the Current Date h2 h3 Refresh 6 Current date new Date . h3 body html Using Java