A HISTORICAL REVIEW ABOUT JAVA WEB APPLICATION DEVELOPMENT – Develop Java Web Applications to Access Databases

8.1   A HISTORICAL REVIEW ABOUT JAVA WEB APPLICATION DEVELOPMENT Java Web applications are based on the Servlet technique, and the Servlet works as a Web server that provides all support, such as receiving requests from the client and sending responses back to the client. That is, a Servlet is a server class built in the … Read moreA HISTORICAL REVIEW ABOUT JAVA WEB APPLICATION DEVELOPMENT – Develop Java Web Applications to Access Databases

Using Java Help Class Files for Java Web Applications 3 – Develop Java Web Applications to Access Databases

Now let’s build our LogInQuery.jsp page, which works as a part of the server, to receive and handle the Form data, including the login information sent by the index.jsp page. Figure 8.9 shows the code for this page. Let’s have a closer look at this piece of code to see how it works. A. A … Read moreUsing Java Help Class Files for Java Web Applications 3 – Develop Java Web Applications to Access Databases

Build the Transaction JSP File, FacultyQuery.jsp – Develop Java Web Applications to Access Databases

8.1.4.2  Build the Transaction JSP File, FacultyQuery.jspThe purpose of this file is to transfer data and information between our main display page,FacultyPage.jsp, and our working help class file, FacultyBean, which performs all JDBC- and database-related operations and business logic. The code for this file is shown in Figure 8.14. Let’s take a closer look at … Read moreBuild the Transaction JSP File, FacultyQuery.jsp – Develop Java Web Applications to Access Databases

Using Java Beans Technology for Java Web Applications 2 – Develop Java Web Applications to Access Databases

There is no difference between creating a help class and creating a Java bean class. In fact, the help class FacultyBean.java we created in the last section is a Java bean class.The JSP provide three basic tags for working with beans. <jsp:useBean id=”bean name” class=”bean class” scope = “page | request | ses-sion |application”/>The definitions … Read moreUsing Java Beans Technology for Java Web Applications 2 – Develop Java Web Applications to Access Databases

Build a New Starting Web Page, FacultyBeanPage – Develop Java Web Applications to Access Databases

8.1.5.2  Build a New Starting Web Page, FacultyBeanPage The preview of this page is shown in Figure 8.21. The difference between this starting page and the FacultyPage.jsp starting page we built in the last section is: in FacultyPage.jsp, we used a JSP built-in or implicit object session to transfer data between the page and the … Read moreBuild a New Starting Web Page, FacultyBeanPage – Develop Java Web Applications to Access Databases

Using JavaServer Faces Technology for Java Web Applications – Develop Java Web Applications to Access Databases

8.1.6   Using JavaServer Faces Technology for Java Web Applications JavaServer Faces provides new techniques and components for building user interfaces (UIs) for server-side applications. In fact, JSF is a server-side technology for developing Web applications with rich user interfaces. Before JavaServer Faces, developers who built Web applications had to rely on building HTML user interface … Read moreUsing JavaServer Faces Technology for Java Web Applications – Develop Java Web Applications to Access Databases

Sample JavaServer Face Page Files 2 – Develop Java Web Applications to Access Databases

An interesting thing in step E in this piece of sample code is that an embedded backing bean property, userName, has been bound to the value attribute of the inputText tag. Recall that we used either the getAttribute() method of a JSP implicit object session (session.getAt-tribute()) or the getProperty() method of a Java bean to … Read moreSample JavaServer Face Page Files 2 – Develop Java Web Applications to Access Databases

A Complete Run Procedure of JSF Web Applications – Develop Java Web Applications to Access Databases

8.1.6.5  A Complete Run Procedure of JSF Web Applications As we mentioned, a UI component represented by a JSF tag in a JSP page can be bound to a Java bean’s property or method. To separate the presentation and business logic, we can use JSP pages to present our GUI and Java beans to store … Read moreA Complete Run Procedure of JSF Web Applications – Develop Java Web Applications to Access Databases

The Java Bean–JSF Page Relationship and Page Navigation 2 – Develop Java Web Applications to Access Databases

A detailed explanation of the code shown in Figure 8.31 follows: A. Our Java managed bean LogInBean is defined using the tag. B. The full class name, including the package name and the bean class name, is defined by the tag. C. The scope of this Java bean is defined by using the tag. FIGURE … Read moreThe Java Bean–JSF Page Relationship and Page Navigation 2 – Develop Java Web Applications to Access Databases

The Java Bean–JSF Page Relationship and Page Navigation – Develop Java Web Applications to Access Databases

8.1.6.5.1   The Java Bean–JSF Page Relationship and Page Navigation Table 8.1 lists all data access methods and action methods used in this example. A Java bean can be connected to a JSF page by using the value attribute of a UI component represented by a JSF tag in that page. That is, a property or … Read moreThe Java Bean–JSF Page Relationship and Page Navigation – Develop Java Web Applications to Access Databases



                    Blog, Contribute ,Privacy,Terms of Use,Trademarks,© estherknow 2024