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 – Develop Java Web Applications to Access Databases

8.1.2   Using JavaServer Pages Technology for Java Web Applications In fact, the JavaServer Pages technique provides a way of using Java code within an HTML page, which means that you can embed a piece of Java code or part of Servlet’s functions into the code on the client side with appropriate tags. The embedded Java … Read moreUsing JavaServer Pages Technology for Java Web Applications – 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

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

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

8.1.5   Using Java Beans Technology for Java Web Applications In recent years, the Java beans technique has been widely applied in Java Web applications. In fact, a Java bean can be considered an extended Java help class, as we discussed in the previous sections, and the main purpose of a Java bean is to handle … Read moreUsing Java Beans Technology for Java Web Applications – Develop Java Web Applications to Access Databases

Modify the Help Class FacultyBean to Make It a Java Bean Class – Develop Java Web Applications to Access Databases

8.1.5.1   Modify the Help Class FacultyBean to Make It a Java Bean Class First we need to create a new Java Session Bean class named FacultyBean in the NetBeans IDE. Then we need to add seven setter() methods into this bean class. Your finished Java bean class, FacultyBean.java, is shown in Figure 8.19. All modified … Read moreModify the Help Class FacultyBean to Make It a Java Bean Class – 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

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