8.5 BUILD A JAVA WEB PROJECT TO MANIPULATE DATA IN THE ORACLE DATABASE Now let’s take care of manipulating data against our Oracle 18c XE database by using different methodologies, which include inserting, updating and deleting records from our sample database, CSE _ DEPT, via our Web application project. FIGURE…
Continue Reading....Category: Add a Method to the Java Bean to Perform Faculty Data Deleting
Insert New Records to the Faculty Table Using JavaServer Pages and Java Beans – Develop Java Web Applications to Access Databases
8.5.2 Insert New Records to the Faculty Table Using JavaServer Pages and Java Beans To use JavaServer Pages and Java bean techniques to insert a new record into the Faculty Table, we need to perform the following operations: 1) Create a new Java bean class file, FacultyInsertBean.java, to handle the…
Continue Reading....Update and Delete Data from the Faculty Table Using JSP and Java Beans Techniques 2 – Develop Java Web Applications to Access Databases
G. A FileInputStream object, fis, is created and works as a handler of the InputStream for the updated faculty image later. H. A new File object, fimage, is also generated to convert the updated faculty image that is stored in a string variable, upFaculty[6], to a file object, and it…
Continue Reading....Update and Delete Data from the Faculty Table Using JSP and Java Beans Techniques – Develop Java Web Applications to Access Databases
8.5.3 Update and Delete Data from the Faculty Table Using JSP and Java Beans Techniques To use the JavaServer Pages and Java bean techniques to perform data updating and delete actions against the Faculty Table, we need to perform the following operations: 1) Create a new Java Session bean class,…
Continue Reading....Modify the FacultyProcess Page to Handle Faculty Data Updating 2 – Develop Java Web Applications to Access Databases
Now we can build and run our project to test this faculty record update function. Click on the Clean and Build Main Project button to clean up and build our project. Then click on the Run button to run our project. Enter the appropriate username and password, such as jhenry…
Continue Reading....Modify the FacultyProcess Page to Handle Faculty Data Updating – Develop Java Web Applications to Access Databases
8.5.3.2 Modify the FacultyProcess Page to Handle Faculty Data UpdatingDouble-click on the FacultyProcess.jsp page in the Projects window and perform the fol-lowing modifications to this page to use the Java bean FacultyUpdateDeleteBean.java to perform the faculty record update actions: 1) Move the cursor to just under the line else if…
Continue Reading....Create the CourseProcess.jsp Page 2 – Develop Java Web Applications to Access Databases
F. Then the method getCourse() defined in the Java Bean class file CourseQuery. java is called to query all courses, that is, all course _ id values, based on the selected faculty name, fname, obtained from step E. G. If the getCourse() method is executed successfully, which means that all…
Continue Reading....Create the CourseProcess.jsp Page – Develop Java Web Applications to Access Databases
8.6.2 Create the CourseProcess.jsp Page The purpose of this page is to direct control to the different help class files based on the button clicked by the user on the Course.jsp page. The following Java Bean class files will be triggered and executed based on the button clicked by the…
Continue Reading....Create the Java Bean or Java Model File, CourseQuery.java 3 – Develop Java Web Applications to Access Databases
Now let’s take care of the second part of the code for this Java Bean class, which is shown in Figure 8.102. A. The user-defined method, QueryCourse(), is defined starting from here. The function of this method is to collect the details for each course (course _ id) selected by…
Continue Reading....Create the Java Bean or Java Model File, CourseQuery.java 2 – Develop Java Web Applications to Access Databases
H. First a local integer variable, index, is declared and initialized to zero, and it works as a key number to be inserted into our HashMap object list later to build our HashMap object. Also, an acting HashMap object, sCourse, is generated with a key and a value format; both…
Continue Reading....