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 JavaServer Pages Technology for Java Web Applications 2 – Develop Java Web Applications to Access Databases

In fact, JavaServer Pages can handle more complicated jobs, such as business logic, JDBC-related database connections, data processing and JSP switching. Generally, a main or controller JSP takes charge of passing parameters between the server and clients, forwarding the user to the other target JSP or Web pages based on the run result of the … Read moreUsing JavaServer Pages Technology for Java Web Applications 2 – Develop Java Web Applications to Access Databases

Using the JSP Implicit Object Session for Java Web Applications – Develop Java Web Applications to Access Databases

8.1.4   Using the JSP Implicit Object Session for Java Web Applications As we mentioned in Section 8.1.2, the session is a JSP implicit object used to help developers build professional Java Web applications. “Implicit” means that those objects, including the session object, can be created automatically when a new JSP is executed. The specific property … Read moreUsing the JSP Implicit Object Session for Java Web Applications – 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

Build the Help Class FacultyBean 2 – Develop Java Web Applications to Access Databases

The operational sequence and data transformation structure of the Faculty Name are shown in Figure 8.16, where the faculty name is used as an example to illustrate how to transfer data between the client and the help class. The operational sequence is: 1) First the desired faculty name is entered by the user into the … Read moreBuild the Help Class FacultyBean 2 – Develop Java Web Applications to Access Databases

Build the Help Class FacultyBean – Develop Java Web Applications to Access Databases

8.1.4.3   Build the Help Class FacultyBean This class is a help class but is very similar to a real Java bean class. The code for this class is shown in Figure 8.15. FIGURE 8.15   The code for the FacultyBean help class. Let’s have a closer look at this piece of code to see how it … Read moreBuild the Help Class FacultyBean – 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

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

8.1.6.2  Sample JavaServer Face Page FilesTwo JSF files are shown in Figures 8.25 and 8.26. In Figure 8.25, a Current.jsp page that works as a receiving page to get the username is shown. In Figure 8.26, Next.jsp, which works as a responding page to select and return a matching password based on the username to … Read moreSample JavaServer Face Page Files – Develop Java Web Applications to Access Databases

The Java Bean Class File – Develop Java Web Applications to Access Databases

8.1.6.3   The Java Bean Class File The Java bean class used in JSF pages is very similar to the FacultyBean class we built in Section 8.1.5.1. Like most Java bean classes, it should contain setter and getter methods as well as some special methods to process the business logic. In addition, Java beans need to … Read moreThe Java Bean Class File – 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



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