TAILIEUCHUNG - Java Server Pages: A Code-Intensive Premium Reference- P9

Java Server Pages: A Code-Intensive Premium Reference- P9:Before you begin reading Pure JSP Java Server Pages, you might want to take a look at its basic structure. This should help you outline your reading plan if you choose not to read the text from cover to cover. This introduction gives you an overview of what each chapter covers. | title Welcome to JSP title head body Welcome getUser request br From getCompany request body html You can see that the SubclassJSP provides empty jspinit and jspDestroy life-cycle methods which satisfy the JSP subclass requirements. It also makes calls to its parent s getUser and getCompany methods. Now compile the PureJSPBase servlet to the SERVER_ROOT purejsp WEB-INF classes directory and move the to the SERVER_ROOT purejsp directory. You should then open your browser to http oca hosf 8080 purejsp user Bob company Sams You should see a page similar to Figure . Figure The output of . Summary In this chapter you saw how you can subclass JSPs to provide common utility methods. You also looked at the requirements of both the superclass and the JSP subclass. In Chapter 9 we are going to cover using the JSP s implicit objects. Chapter 9 Using the JSP s Implicit Objects Overview As a JSP author you have access to certain objects that are available for use in JSP documents without being declared first. These objects are parsed by the JSP engine and inserted into the generated servlet as if you defined them yourself. - 81 - In reality the JSP engine recognizes the implicit object names and knows that they will be declared by or passed into the generated servlet. Here s a example of a code snippet containing a _jspService method public void _jspService HttpServletRequest request HttpServletResponse response throws lOException ServletException JspFactory _jspxFactory null PageContext pageContext null HttpSession session null ServletContext application null ServletConfig config null JspWriter out null Object page this String _value null try if _jspx_inited false _jspx_init _jspx_inited true _jspxFactory text html pageContext this request response true 8192 true application config .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.