#
#

J2EE 1.7 Projects: Black book (Record no. 2446)

MARC details
000 -LEADER
fixed length control field 49077nam a22002177a 4500
003 - CONTROL NUMBER IDENTIFIER
control field OSt
005 - DATE AND TIME OF LATEST TRANSACTION
control field 20200219121811.0
008 - FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION
fixed length control field 200117b ||||| |||| 00| 0 eng d
020 ## - INTERNATIONAL STANDARD BOOK NUMBER
International Standard Book Number 978-93-5119-876-5
028 ## - PUBLISHER NUMBER
Source Allied Informatics, Jaipur
Bill Number 7084
Bill Date 13/01/2020
Purchase Year 2019-20
040 ## - CATALOGING SOURCE
Original cataloging agency BSDU
Language of cataloging English
Transcribing agency BSDU
082 ## - DEWEY DECIMAL CLASSIFICATION NUMBER
Classification number 005.133
Item number DTE
100 ## - MAIN ENTRY--PERSONAL NAME
Personal name DT Editorial Services
245 ## - TITLE STATEMENT
Title J2EE 1.7 Projects: Black book
260 ## - PUBLICATION, DISTRIBUTION, ETC.
Place of publication, distribution, etc. New Delhi
Name of publisher, distributor, etc. Dreamtech Press
Date of publication, distribution, etc. 2016
300 ## - PHYSICAL DESCRIPTION
Extent 588
500 ## - GENERAL NOTE
General note Ever wondered why all software project books are complex and tedious to understand! In fact, they should be fast and fun to comprehend. One book that stands out for following this thought consistently is the J2EE 1.7 Projects book. The projects in this book abide by two concepts—first, to help engineer the best software product that follows all phases of Software Development Life Cycle, including analysis, software design, testing and implementation; and second, to efficiently use the features, tools, and technologies provided by the platform for the project
504 ## - BIBLIOGRAPHY, ETC. NOTE
Bibliography, etc. note <br/>Contents<br/><br/>INTRODUCTION ................................................................................................................ xiii<br/>CHAPTER 1: INTRODUCING JAVA EE ...................................................................................... 1<br/>Need for Enterprise Programming ................................................................................................................ 4<br/>Enterprise Architecture Layers ...................................................................................................................... 5<br/>Exploring Enterprise Architecture Types ....................................................................................................... 6<br/>The Single-Tier Architecture ............................................................................................................................... 6<br/>The 2-Tier Architecture ...................................................................................................................................... 6<br/>The 3-Tier Architecture ...................................................................................................................................... 8<br/>The n-Tier Architecture ...................................................................................................................................... 9<br/>Objectives of Enterprise Applications ......................................................................................................... 11<br/>Introducing the Java EE 7 Platform ............................................................................................................. 13<br/>Features of the Java EE Platform ................................................................................................................. 14<br/>Platform Independence .................................................................................................................................... 14<br/>Managed Objects ............................................................................................................................................. 14<br/>Reusability ........................................................................................................................................................ 14<br/>Modularity ........................................................................................................................................................ 15<br/>Easier Development .......................................................................................................................................... 15<br/>Simplified EJB ................................................................................................................................................... 15<br/>Enhanced Web Services ................................................................................................................................... 15<br/>Support for Web 2.0 ......................................................................................................................................... 15<br/>New Features of Java EE 7 Platform ............................................................................................................ 15<br/>Exploring the Java EE 7 Platform ................................................................................................................ 16<br/>The Runtime Infrastructure ............................................................................................................................... 16<br/>The Java EE 7 APIs ............................................................................................................................................ 17<br/>Exploring the Architecture of Java EE 7 ....................................................................................................... 21<br/>Describing Java EE 7 Containers ................................................................................................................ 22<br/>Container Types ............................................................................................................................................... 23<br/>Java EE 7 Container Architecture ....................................................................................................................... 23<br/>Developing Java EE 7 Applications............................................................................................................. 26<br/>Probable Java EE Application Architectures ....................................................................................................... 27<br/>Application Development and Deployment Roles ............................................................................................. 29<br/>Application Development Process ..................................................................................................................... 30<br/>Listing the Compatible Products for the Java EE Platform ........................................................................... 32<br/>Introducing the Servers for Java EE Applications ......................................................................................... 33<br/>Introducing Web Servers .................................................................................................................................. 34<br/>Introducing Application Servers ......................................................................................................................... 34<br/>Technologies used in Projects Development .............................................................................................. 35<br/>Servlets ............................................................................................................................................................. 35<br/>iv J2EE 1.7 PROJECTS<br/>JSP .................................................................................................................................................................... 37<br/>Struts Framework .............................................................................................................................................. 38<br/>Java Server Faces .............................................................................................................................................. 41<br/>The Spring Framework ..................................................................................................................................... 42<br/>PROJECT I: CHAT APPLICATION<br/>CHAPTER 1: CASE STUDY: CHAT APPLICATION ...................................................................... 47<br/>SDLC of the Project .................................................................................................................................. 50<br/>Requirement Analysis ....................................................................................................................................... 50<br/>Software Design ............................................................................................................................................... 50<br/>Development.................................................................................................................................................... 51<br/>Testing .............................................................................................................................................................. 52<br/>Implementation and Maintenance ..................................................................................................................... 52<br/>CHAPTER 2: CREATING HOME PAGE ..................................................................................... 53<br/>Creating MainChatServlet Servlet ........................................................................................................ 56<br/>MainChatServlet.java .............................................................................................................................. 56<br/>Mapping of Servlet in web.xml ........................................................................................................................ 59<br/>Designing Home Page ............................................................................................................................... 60<br/>Running the Application ............................................................................................................................ 62<br/>CHAPTER 3: LOGIN MODULE............................................................................................... 65<br/>Creating Login User Interfaces ................................................................................................................... 67<br/>Creating login.jsp ....................................................................................................................................... 67<br/>Creating loginhandler.jsp ......................................................................................................................... 70<br/>Creating loginfail.jsp ............................................................................................................................... 73<br/>Creating logout.jsp ..................................................................................................................................... 74<br/>CHAPTER 4: ADMIN MODULE .............................................................................................. 75<br/>Adding New Users ................................................................................................................................... 77<br/>Creating adduser.jsp ................................................................................................................................... 78<br/>Creating adduserhandler.jsp .................................................................................................................... 79<br/>Viewing Users .......................................................................................................................................... 80<br/>Deleting Users .......................................................................................................................................... 83<br/>Configuring ChatRooms .............................................................................................................................. 84<br/>CHAPTER 5: USER MODULE ................................................................................................. 89<br/>Selecting Chat Room ............................................................................................................................... 91<br/>Implementing Chatting Process .................................................................................................................. 95<br/>doGet() Method ............................................................................................................................................ 99<br/>doPost() Method ........................................................................................................................................ 100<br/>getProfileName() Method ........................................................................................................................ 101<br/>getRoom() Method ...................................................................................................................................... 101<br/>TABLE OF CONTENTS v<br/>messageFrame() Method ............................................................................................................................ 102<br/>writeMessage() Method ............................................................................................................................ 103<br/>Creating ChatRoomEntry Class .................................................................................................................. 104<br/>PROJECT II: PEOPLE MANAGEMENT<br/>CHAPTER 1: CASE STUDY: PEOPLE MANAGEMENT ............................................................... 109<br/>Software Requirements .............................................................................................................................111<br/>SDLC of the Project .................................................................................................................................111<br/>Requirement Analysis ..................................................................................................................................... 112<br/>Software Design ............................................................................................................................................. 112<br/>Database Design ............................................................................................................................................ 113<br/>Development.................................................................................................................................................. 117<br/>Testing ............................................................................................................................................................ 118<br/>Implementation and Maintenance ................................................................................................................... 118<br/>Summary .................................................................................................................................................118<br/>CHAPTER 2: CASE STUDY: CREATING LOGIN MODULE ........................................................ 119<br/>Designing Login User Interface .................................................................................................................121<br/>Creating the people_user_login Servlet ................................................................................................... 123<br/>Creating the UserLoginDBObj Class ............................................................................................................ 126<br/>Creating the UserLoginDBMethods Class .................................................................................................... 127<br/>Creating the people_default.jsp File ...................................................................................................... 129<br/>Directory Structure of the Project ..............................................................................................................133<br/>Login and Navigating to Home Page .........................................................................................................134<br/>Changing Password .................................................................................................................................136<br/>CHAPTER 3: CASE STUDY: CREATING PROFILE MANAGEMENT MODULE ................................ 139<br/>Implementing Logic with Servlet ...............................................................................................................141<br/>Creating the people_employee Servlet ........................................................................................................ 142<br/>Creating the EmployeeDBObj Class .............................................................................................................. 146<br/>Creating the EmployeeDBMethods Class ...................................................................................................... 147<br/>Creating the GenerateId Class ..................................................................................................................... 150<br/>Creating Views ........................................................................................................................................151<br/>Creating the employee_insert JSP Page ..................................................................................................... 151<br/>Creating the employee_search JSP Page ..................................................................................................... 156<br/>Creating the employee_edit JSP Page ......................................................................................................... 158<br/>Creating the employee_list JSP Page ......................................................................................................... 162<br/>Creating the employee_profile JSP Page................................................................................................... 164<br/>CHAPTER 4: CASE STUDY: CREATING RECRUITMENT MODULE .............................................. 169<br/>Creating the people_applicant Servlet ..................................................................................................... 172<br/>Creating the ApplicantDBObj Class ............................................................................................................ 176<br/>Creating the ApplicantDBMethods Class .................................................................................................... 176<br/>Creating the GenerateId Class ..................................................................................................................... 183<br/>vi J2EE 1.7 PROJECTS<br/>Creating an Interface for Applicant Registration ............................................................................................... 184<br/>Creating the applicant_test_dtl Servlet ................................................................................................. 196<br/>Designing JSP Views ....................................................................................................................................... 202<br/>Working of the Recruitment Module ............................................................................................................... 214<br/>CHAPTER 5: CASE STUDY: CREATING ATTENDANCE MANAGEMENT MODULE ......................... 217<br/>Creating the time_management Servlet .................................................................................................219<br/>Creating JSP Views ...................................................................................................................................230<br/>Creating the employee_daily_attendance JSP Page ............................................................................... 230<br/>Creating the employee_daily_attendance_summary JSP Page .............................................................. 233<br/>CHAPTER 6: CASE STUDY: CREATING LEAVE MANAGEMENT MODULE ................................... 237<br/>Creating the leave_management Servlet ..............................................................................................239<br/>Creating the LeaveRequest Class ............................................................................................................... 245<br/>Creating the LeaveMgmtBeanMethods Class ............................................................................................... 246<br/>Creating the GenerateId Class ..................................................................................................................... 251<br/>Designing JSP Views ................................................................................................................................251<br/>Creating the leave_request JSP Page ......................................................................................................... 252<br/>Creating the leave_request_edit JSP Page ............................................................................................. 256<br/>Creating the leave_request_reject JSP Page .......................................................................................... 260<br/>Creating the leave_request_list JSP Page ........................................................................................ 263<br/>CHAPTER 7: CASE STUDY: CREATING PAYROLL MODULE ..................................................... 267<br/>Updating Salary Statement ........................................................................................................................269<br/>Creating people_payroll Servlet .........................................................................................................270<br/>Creating the EmpSal Class .............................................................................................................................. 277<br/>Creating the EmployeeAgreement Class ...................................................................................................... 278<br/>Creating the PayrollBeanMethods Class .................................................................................................... 278<br/>Designing JSP Views ................................................................................................................................286<br/>Creating the employee_agreement JSP Page .............................................................................................. 286<br/>Creating the employee_agreement_edit JSP Page ................................................................................... 291<br/>Creating the salary_search.jsp File ........................................................................................................ 293<br/>Creating the salary_slip JSP Page .............................................................................................................. 294<br/>PROJECT III: ONLINE SHOPPING SITE<br/>CHAPTER 1: CASE STUDY: MYSHOPPINGSITE ....................................................................... 301<br/>SDLC of the Project .................................................................................................................................304<br/>Requirement Analysis ..................................................................................................................................... 304<br/>Client-Side Requirements ............................................................................................................................... 304<br/>Customer-Side Requirements.......................................................................................................................... 304<br/>Software Design ............................................................................................................................................. 304<br/>Database Design ............................................................................................................................................ 307<br/>Development.................................................................................................................................................. 308<br/>TABLE OF CONTENTS vii<br/>Testing ............................................................................................................................................................ 308<br/>Implementation and Maintenance ................................................................................................................... 308<br/>CHAPTER 2: CREATING HOME PAGE ................................................................................... 309<br/>The Directory Structure .............................................................................................................................311<br/>web.xml ........................................................................................................................................................ 312<br/>The struts-config.xml File ..................................................................................................................... 314<br/>Creation of Home Page .............................................................................................................................316<br/>CHAPTER 3: CREATING LOGIN INTERFACE ........................................................................... 321<br/>Creating the LoginForm Class .................................................................................................................323<br/>The reset() Method .................................................................................................................................... 325<br/>The validate() Method .............................................................................................................................. 325<br/>Creating the LoginAction Class ............................................................................................................325<br/>The getUser() Method ............................................................................................................................... 325<br/>The execute() Method ............................................................................................................................... 326<br/>Creating the login.jsp File ...................................................................................................................329<br/>MessageResources and ApplicationResources.properties ................................................................................ 330<br/>Updating the struts-config.xml File ................................................................................................331<br/>Creating the CategoryListAction Class .............................................................................................333<br/>Creating the categoryList.jsp File ....................................................................................................335<br/>Working of Module .................................................................................................................................337<br/>CHAPTER 4: MANIPULATING CATEGORY ............................................................................. 339<br/>Adding Category ......................................................................................................................................341<br/>Creating the addCategory.jsp File ............................................................................................................ 341<br/>Creating CategoryForm ............................................................................................................................... 343<br/>Creating AddCategoryAction ..................................................................................................................... 344<br/>insertCategory() Method ........................................................................................................................ 344<br/>Execute() Method ...................................................................................................................................... 344<br/>Adding New Action and Form Bean Mapping ................................................................................................. 346<br/>Updating Category ...................................................................................................................................347<br/>GetCategoryAction Class .......................................................................................................................... 347<br/>editCategory.jsp .................................................................................................................................... 350<br/>EditCategoryAction Class........................................................................................................................ 351<br/>Deleting Category ....................................................................................................................................353<br/>DeleteCategoryAction Class ................................................................................................................... 354<br/>CHAPTER 5: HANDLING OF PRODUCT DETAILS ................................................................... 357<br/>Showing Product List ...............................................................................................................................359<br/>ProductListAction Class .......................................................................................................................... 360<br/>productList.jsp ...................................................................................................................................... 364<br/>Adding Product .......................................................................................................................................366<br/>viii J2EE 1.7 PROJECTS<br/>Creating addProduct.jsp ........................................................................................................................... 367<br/>Creating ProductForm ................................................................................................................................. 369<br/>Creating AddProductAction Class .............................................................................................................. 371<br/>Editing Product ........................................................................................................................................374<br/>GetProductAction Class ............................................................................................................................ 375<br/>editProduct.jsp ...................................................................................................................................... 378<br/>EditProductAction Class .......................................................................................................................... 380<br/>Deleting Product......................................................................................................................................382<br/>DeleteProductAction Class ..................................................................................................................... 382<br/>CHAPTER 6: SEARCHING AND SHOPPING-CART HANDLING ................................................ 385<br/>Searching Product ....................................................................................................................................387<br/>Search by Category ......................................................................................................................................... 388<br/>Search by Keyword ......................................................................................................................................... 391<br/>SearchForm Class ........................................................................................................................................ 393<br/>ProductSearchByKeywordAction Class .................................................................................................. 393<br/>olns_product_search_result.jsp ...................................................................................................... 396<br/>Shopping Using Shopping-Cart .................................................................................................................399<br/>olns_product_dtl.jsp ............................................................................................................................ 400<br/>AddItem2CartAction Class........................................................................................................................ 402<br/>olns_shopping_cart_dtl.jsp ............................................................................................................... 407<br/>ShoppingItemForm Class ............................................................................................................................ 410<br/>olns_order_delivery_dtl.jsp ............................................................................................................. 412<br/>OrderForm Class .......................................................................................................................................... 414<br/>InsertOrderAction Class .......................................................................................................................... 416<br/>olns_prod_order_dtl.jsp ...................................................................................................................... 422<br/>PROJECT IV: BANKING INFORMATION SYSTEM<br/>CHAPTER 1: CASE STUDY: BANKING INFORMATION SYSTEM ................................................. 427<br/>SDLC of the Project .................................................................................................................................430<br/>Requirement Analysis ..................................................................................................................................... 430<br/>Software Design ............................................................................................................................................. 430<br/>Database Design ............................................................................................................................................ 431<br/>Development of the Project ............................................................................................................................. 433<br/>Testing ............................................................................................................................................................ 434<br/>Implementation and Maintenance ................................................................................................................... 434<br/>CHAPTER 2: HIBERNATE MODULES ..................................................................................... 435<br/>Hibernate—A Brief Discussion .................................................................................................................437<br/>Overview of Hibernate Architecture .........................................................................................................437<br/>Components in Hibernate Module ............................................................................................................439<br/>Persistence Class ............................................................................................................................................ 439<br/>Mapping File .................................................................................................................................................. 439<br/>TABLE OF CONTENTS ix<br/>Login—Our First Hibernate Module ..........................................................................................................439<br/>Creating the Login Class ............................................................................................................................... 440<br/>Creating Mapping File .................................................................................................................................... 441<br/>The AccountHolder Hibernate Module .....................................................................................................441<br/>The AccountHolder.java File ................................................................................................................... 441<br/>Creating AccountHolder.hbm.xml File ..................................................................................................... 445<br/>The Savings Hibernate Module .................................................................................................................446<br/>The Savings.java File ............................................................................................................................... 446<br/>Creating the Savings.hbm.xml File ............................................................................................................ 447<br/>Recurring Hibernate Module ....................................................................................................................448<br/>The Recurring.java File ............................................................................................................................ 448<br/>Creating the Recurring.hbm.xml File ........................................................................................................ 450<br/>The Current Hibernate Module .................................................................................................................450<br/>The Current.java File ............................................................................................................................... 450<br/>Creating the Current.hbm.xml File ............................................................................................................ 451<br/>The Transaction Hibernate Module ...........................................................................................................452<br/>The Transaction.java File ....................................................................................................................... 452<br/>Creating the Transacton.hbm.xml File ...................................................................................................... 454<br/>Configuring Hibernate ..............................................................................................................................454<br/>The Hibernate configuration File ........................................................................................................ 455<br/>Creating a Hibernate Session ....................................................................................................................457<br/>The HibernateUtil Module ....................................................................................................................... 457<br/>CHAPTER 3: JSF AND SPRING MODULES ............................................................................. 459<br/>JSF—A Brief Discussion ............................................................................................................................461<br/>Role of JSF in an Enterprise Application........................................................................................................... 461<br/>Overview of JSF Architecture.......................................................................................................................... 462<br/>Lifecycle of JSF Page ....................................................................................................................................... 464<br/>Components of a JSF Application .................................................................................................................... 464<br/>Exploring JSF Tag Libraries ........................................................................................................................465<br/>The HTML Tag Library ................................................................................................................................... 465<br/>Exploring the Core Tag Library ........................................................................................................................ 469<br/>Creating a JSF Page ..................................................................................................................................471<br/>JSP .................................................................................................................................................................. 471<br/>Facelets .......................................................................................................................................................... 471<br/>Creating Master.xhtml ............................................................................................................................... 472<br/>Creating the index.xhtml File ..................................................................................................................... 474<br/>Spring—A Brief Discussion .......................................................................................................................475<br/>Login Process ................................................................................................................................................. 475<br/>JSF Module ..................................................................................................................................................... 475<br/>Spring Module ................................................................................................................................................ 479<br/>x J2EE 1.7 PROJECTS<br/>CHAPTER 4: BANK MASTER MODULES ................................................................................ 483<br/>Managing Customer Account ....................................................................................................................485<br/>Opening a New Account ..........................................................................................................................486<br/>JSF Module for Opening a New Account ......................................................................................................... 486<br/>Spring Module for Opening a New Account ................................................................................................... 494<br/>JSF Module for Savings Account ...................................................................................................................... 498<br/>Spring Module for Savings Account ................................................................................................................. 500<br/>JSF Module for Current Account ...................................................................................................................... 503<br/>Spring Module for Current Account ................................................................................................................. 505<br/>JSF Module for Recurring Account ................................................................................................................... 507<br/>Spring Module for Recurring Account ............................................................................................................. 511<br/>Modifying an Account ..............................................................................................................................513<br/>JSF Module for Modifying an Account ............................................................................................................. 513<br/>Spring Module for Modifying an Account ........................................................................................................ 522<br/>Viewing an Account ................................................................................................................................526<br/>JSF Module for Viewing an Account ................................................................................................................ 526<br/>Spring Module for Viewing an Account ........................................................................................................... 535<br/>CHAPTER 5: TRANSACTION AND REPORT MODULES ............................................................ 537<br/>Transactions ............................................................................................................................................539<br/>Withdrawing Money ................................................................................................................................540<br/>JSF Module for Withdrawing Money................................................................................................................ 540<br/>Spring Module for Withdrawing Money .......................................................................................................... 545<br/>Depositing Money ...................................................................................................................................549<br/>JSF Module for Depositing Money ................................................................................................................... 549<br/>Spring Module for Depositing Money .............................................................................................................. 552<br/>Transferring Money ..................................................................................................................................552<br/>JSF Module for Transferring Money ................................................................................................................. 552<br/>Spring Module for Transferring Money ............................................................................................................ 557<br/>Reports ....................................................................................................................................................557<br/>Daily Report ................................................................................................................................................... 557<br/>Monthly Report .............................................................................................................................................. 563<br/>Spring Module for Monthly Report .................................................................................................................. 565<br/>CHAPTER 6: CONFIGURATION AND DEPLOYMENTS ............................................................. 569<br/>Hibernate Reverse Engineering .................................................................................................................571<br/>The hibernate.reveng.xml File ............................................................................................................... 571<br/>Application Configuration .........................................................................................................................572<br/>The applicationContext.xml File .......................................................................................................... 572<br/>Spring Configuration ................................................................................................................................572<br/>Dispatcher Servlet Configuration...............................................................................................................573<br/>The web.xml Configuration ....................................................................................................................574<br/>Deploying and Running the Application ...................................................................................................576<br/>TABLE OF CONTENTS xi<br/>PROJECT V: BUG TRACKING SYSTEM<br/>CHAPTER 1: CASE STUDY: BUG TRACKING SYSTEM .............................................................. 579<br/>SDLC of the Project .................................................................................................................................582<br/>Requirement Analysis ..................................................................................................................................... 582<br/>Software Design ............................................................................................................................................. 583<br/>Development.................................................................................................................................................. 585<br/>Testing ............................................................................................................................................................ 586<br/>Implementation and Maintenance ................................................................................................................... 587<br/>ONLINE RESOURCE .......................................................................................................... 589
650 ## - SUBJECT ADDED ENTRY--TOPICAL TERM
Topical term or geographic name entry element Java
942 ## - ADDED ENTRY ELEMENTS (KOHA)
Source of classification or shelving scheme Dewey Decimal Classification
Koha item type Books
Holdings
Withdrawn status Lost status Source of classification or shelving scheme Damaged status Not for loan Home library Current library Shelving location Date acquired Cost, normal purchase price Total Checkouts Full call number Barcode Date last seen Date last checked out Cost, replacement price Price effective from Koha item type
    Dewey Decimal Classification     BSDU Knowledge Resource Center, Jaipur BSDU Knowledge Resource Center, Jaipur General Stacks 01/17/2020 449.00 2 005.133 DTE 018000 10/13/2023 10/10/2023 449.00 01/17/2020 Books