Java for Web Development: Create Full-Stack Java Applications with Servlets, JSP Pages, MVC Pattern and Database Connectivity
- Length: 212 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2022-03-12
- ISBN-10: 9355511434
- ISBN-13: 9789355511430
- Sales Rank: #1058719 (See Top 100 Books)
Play around JavaBeans, NetBeans IDE, and build strong foundation of web development concepts
Key Features
- Extensive demonstrations of Servlets and JSP in action, including various instances.
- Prepares you to succeed in Java Full Stack and Web Programming Interviews.
- Increases familiarity with MVC techniques for web programming.
Description
This book is about creating web applications with Java, servlets, Java Server Pages, and struts. Servlets, JSP pages, and database connectivity will be covered in detail. The more you read this book, the better you will be at making GUI apps, using JavaBeans in JSP, and making your tag libraries.
The book covers various key topics, including the MVC pattern, servlets, JSP, database connectivity, struts, and localization. With examples and demonstrations, you’ll learn about every aspect of web development and how to use Java and associated tools effectively throughout the process. All programmes are made in the NetBeans IDE and run on Tomcat Server. The hierarchy of classes and the architecture are also illustrated graphically. Readers will get comprehensive knowledge of concepts through analogies drawn from real-world situations. Interview questions with solutions are also included for users looking for jobs in software companies.
Readers will be able to create dynamic websites and blogs with the help of this book. The book is a wonderful resource for aspiring java programmers and web developers who wish to master both basic and advanced level web application development in Java through their efforts and this book.
What you will learn
- Connect to a database using a thin driver.
- Create GUI apps, reuse JavaBeans in JSP, and custom tag libraries.
- Discover how to run a Tomcat server.
- Acquaint with the NetBeans IDE and create all applications using it.
- Explore solutions on Java programming to get ready for the workplace.
Who this book is for
If you are an aspiring web developer and interested in developing dynamic websites and web applications using Java, this book is the go-to guide for you. Prior knowledge of Java programming is preferred to speed up the learning of the book.
Cover Page Title Page Copyright Page Dedication Page About the Authors About the Reviewer Acknowledgement Preface Errata Table of Contents 1. Database Connectivity Introduction Structure Objectives Database Management ODBC Application Programming Interface (API) JDBC-API Categories of JDBC Drivers JDBC-ODBC bridge + ODBC driver Native-API driver Network protocol driver Thin Driver Querying a database Connecting to a database The connection object Loading the Driver and establishing the connection The JDBC URL A Sample JDBC URL Processing querying in a database Conclusion Multiple Choice Questions Answers Fill in the blanks State True/False Questions Interview Questions 2. Internationalization (I18N) Introduction Structure Objective Localization (L10N) Locale Constructors of Locale Class Commonly used methods of Locale class Resource Bundle Constructor of ResourceBundle Methods of ResourceBundle Class Steps to develop the I18N-based application Internationalizing Date and Time (I18N with Date and Time) Methods of java.text.DateFormat Internationalizing with Numbers (I18N with Numbers) Conclusion Multiple Choice Questions 3. Introduction to Java Servlets Introduction Structure Objectives Webserver Introduction to Servlets Characteristics of Servlets Comparison between Servlets and Applets Comparison between Servlets and other server-side scripting technologies CGI scripts Active Server Pages (ASP) Working of Servlets The GET and POST methods The Javax.servlet package Lifecycle of a Servlet Servlet Interface Creating a Servlet Creating the deployment descriptor (web.xml file) Conclusion Questions 4. HTTP Servlet Introduction Structure Objectives HTTP Servlet Need of HTTPServlet class HTTP Request and HTTP Response The GET and POST methods HttpServletRequest Interface Method of ServletRequest Interface Conclusion Questions Multiple Choice Questions 5. Working with Servlet Sessions Introduction Structure Objective Session tracking Techniques to keep track of sessions in servlets URL Rewriting Hidden Form Fields Using the HttpSession Interface Cookies The javax.servlet.http.Cookie class Conclusion Questions 6. Inter-Servlet Communication Introduction Structure The RequestDispatcher Interface Method of ServletContext Interface Method to get the object of RequestDispatcher Methods of RequestDispatcher interface Implementing Inter servlet communication via a problem statement Tasklist Client Interface index.xhtml Code of FirstServlet SendRedirect Difference between forward() and sendRedirect() method Conclusion Questions 7. Java Server Pages(JSP) Introduction Structure Objectives Need for JSP Difference between Servlet and JSP Advantages of JSP The JSP request-response cycle Lifecycle of JSP Structure of a JSP Page The directory structure of the JSP Page Conclusion Questions 8. Comment Tag and Scripting Element Structure Objectives JSP Elements Comment Tag Scripting Elements Scriptlet tag Expression Tag Declaration tag Implicit Objects Conclusion Questions Select the Correct Option 9. JSP Directives Structure Objective Types Of Directives JSP directives The page directive Implicit Objects contentType extends errorPage isErrorPage import= “package list” language= “scripting language.” Session=true/false info= “servlet information” Buffer isELIgnored= “true/false” isThreadSafe autoFlush The include directive The Taglib directive Conclusion Questions 10. JSP Action Element and Custom Tags Introduction Structure Objectives JSP Action Tags jsp:useBean action tag jsp:setProperty and jsp:getProperty action tags Jsp:forward action tag jsp:include action tag JSP custom tags Custom Tag Library Need of XML Custom Tags The structure of the TLD file The structure of the JSP File Expression Language(EL) Model View Controller (MVC) Architecture in JSP MVC Example in JSP Conclusion Questions 11. Introduction to Struts Introduction Structure Objective Features of Struts2 Components of Struts2 Architecture of Struts2 Creating a Struts Application Conclusion Questions Interview Questions Index Back Cover
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.