Java Web Programming [1/9] : Introduction to Web ApplicationIMC Institute
This document provides an overview of web application development. It discusses the evolution of application frameworks from single-tier to multi-tier architectures. It also describes the components of a web application like servlets, JSPs, and the web container. The steps for building a simple web application using Eclipse and Tomcat are outlined, including creating the project structure, deployment descriptor, and deploying the WAR file.
Web applications allow users to interact with dynamic content through a web browser rather than a local application. They utilize client-server architecture and communicate through HTTP requests and responses. Key components include web servers, which host the applications, and web containers that provide runtime services to web components like servlets and JSP pages. Web applications offer advantages like centralized data storage and 24/7 accessibility from anywhere but also present challenges in supporting different browsers and securing sensitive information.
J2EE is a platform-independent Java-centric environment for developing, building, and deploying web-based enterprise applications. It consists of services, APIs, and protocols that provide functionality for developing multi-tier, web-based applications. J2EE supports component-based development of multi-tier enterprise applications consisting of client, web, EJB, and EIS tiers. Statements are used to send SQL commands and receive data from databases, with PreparedStatements being useful for queries with parameters and CallableStatements for stored procedures.
The document provides an overview of J2EE (Java 2 Platform Enterprise Edition) and servlets. It discusses how J2EE improved on earlier two-tier architectures by introducing a multi-tier architecture. It describes the key components and features of J2EE, including servlets, JavaServer Pages, and Enterprise JavaBeans. It explains how servlets and JSPs handle presentation logic and interface with EJBs, which handle application logic.
This document provides an introduction to the Java Platform, Enterprise Edition (JEE). It discusses the course details, including contents, assessment, and lectures. It covers JEE technology overview, containers, architecture, and APIs. The lectures include an overview of JEE, transaction processing and ACID properties, multilayered architectures, and 1-tier, 2-tier, 3-tier and n-tier architectures.
This document provides an overview of enterprise Java and related technologies. It discusses what enterprise applications are and how they differ from regular applications. It then describes Java Enterprise Edition (Java EE), its evolution from J2EE to current versions, and some of its core technologies like EJBs, JSPs, Servlets, etc. It also discusses the Glassfish application server, its features, and how it implements the Java EE platform. The document aims to introduce readers to enterprise Java development and the technologies involved.
Suresh has over 8 years of experience developing Java applications. He has extensive experience with technologies like Java, J2EE, Struts, Spring, Hibernate, RESTful web services, SQL, PL/SQL, and databases like Oracle. He has worked on projects for clients in various industries, developing applications involving web interfaces, distributed architectures, and integrating with other systems. Suresh is proficient in the full development lifecycle from requirements gathering to deployment and has a track record of successfully delivering projects.
The document discusses the roles involved in developing, assembling, and deploying Java EE applications. It describes the Java EE product provider who implements the Java EE platform, the tool provider who develops tools, the application component provider who creates reusable Java EE components packaged in JAR/WAR files, and the application assembler who bundles these components into an EAR file. Finally, an application deployer installs the EAR file onto a Java EE server.
Spring is an open source Java application framework that uses dependency injection to manage the lifecycle and interdependencies of application objects. It simplifies enterprise application development by providing an alternative to EJB components and by supporting aspects like inversion of control, aspect-oriented programming, and facilitating testing. The core of Spring is the IoC container which manages the configuration and instantiation of application objects.
Glassfish is an open source application server that supports Java EE technologies like Servlets, JSP, EJB. It uses Grizzly, which is based on Apache Tomcat, as its servlet container and uses Java NIO for improved performance. Key Java EE technologies it supports include Servlets, JSP, EJB, advanced XML technologies.
Introduction to Web Application Technologies
CGI Programs on the Web Server
What is servlet?
Jobs of servlet
Advantages over CGI
Why pages are build dynamically?
Servlet container
Installation & configuration
- Type 1: Integration of Tomcat server and eclipse
- Type 2: Java Servlet
Servlet Sample Example
Servlet Overview And Architecture
- Servlet Life cycle/Single Thread Model
- Interface Servlet
- HttpServlet Class
- HttpServletRequest, HttpServletResponse
This document contains an interview preparation guide for IBM WebSphere with 12 questions and answers about WebSphere. Some key points covered include:
1. Deployment descriptors are XML files that describe how to deploy modules or applications, specifying configuration and container options. There are two types: web application deployment descriptors and portlet deployment descriptors.
2. There are three main ways to deploy applications in WebSphere: directly copying files, using Ant tasks, or through the administration console.
3. The main difference between a web server and application server is that an application server provides additional services for security, transactions, threading, etc. and supports deployment of WAR and EAR files.
4. Global Guideline provides resources
Mumbai Academics is Mumbai’s first dedicated Professional Training Center for Training with Spoke and hub model with Multiple verticles . The strong foundation of Mumbai Academics is laid by highly skilled and trained Professionals, carrying mission to provide industry level input to the freshers and highly skilled and trained Software Professionals/other professional to IT companies.
IBM Websphere introduction and installation for beginnersShubham Gupta
The document provides an overview of Websphere Application Server (WAS). It discusses the basic architecture of WAS including versions and editions. It explains key concepts in WAS like application server, nodes, deployment manager, administrative agents and job manager. It also provides instructions on stand-alone and distributed configuration of WAS and discusses concepts like cells, node groups and administrative domains.
Quontra Solutions is leading provider of IT career advice, Training and consulting services for IT Professional and corporates across USA. We train individuals or Corporate via online or class Room training in all IT tools and Technologies.
We always strive to bring out innovative methods along with the traditional teaching techniques which enhance the overall experience of the students and teachers to extract the return on Investments, high efficiency and scalability.
The company’s architecture is based on the insights from the marketplace, business analytics and strategies keeping intact the fundamental principles in mind, helps us to compete and win in today’s environment without changing any quality in training.
The support, service and training provided by Quontra solutions for various customers assures a “stay up to date” easy transition from previous to current in terms of technology. Our advertisers and promoters are none other than the clients you have been associated with us for their training needs. We improve our training programs from the feedback from the students.
Email Id : [email protected]
Website: http://www.quontrasolutions.co.uk
CETPA INFOTECH PVT LTD is one of the IT education and training service provider brands of India that is preferably working in 3 most important domains. It includes IT Training services, software and embedded product development and consulting services.
The document discusses the key capabilities of IBM WebSphere Portal including:
1. Providing a single user experience and navigation model across different devices and clients.
2. Supporting personalization, security, web content management, and application integration features.
3. Allowing integration with Microsoft applications and environments like SharePoint through out-of-the-box federation portlets.
The J2EE architecture divides applications into three tiers - the client tier, server tier, and database tier. The client tier handles the user interface. The server tier consists of the web tier and business tier, with the web tier handling HTTP requests and the business tier containing application logic. The database tier communicates with databases and external systems to store and retrieve persistent data.
CETPA INFOTECH PVT LTD is one of the IT education and training service provider brands of India that is preferably working in 3 most important domains. It includes IT Training services, software and embedded product development and consulting services.
http://www.cetpainfotech.com
Its an distributed enviornment for developing the enterprise application.We can develop multi-tier,three-tier or n-tier architecture using this.In this Java Server Pages and Servlet is the important things
This document provides an introduction and overview of Java Database Connectivity (JDBC). It discusses what JDBC is, the different types of JDBC drivers, how to connect to databases using JDBC, and how to execute SQL statements and process result sets. It also covers how to access database metadata and provides examples of using JDBC to connect to and query a Microsoft Access database.
Ibm web sphere application server interview questionspraveen_guda
WebSphere Application Server is an application server that provides runtime environments for Java EE applications. It allows deploying, configuring, and managing applications. A profile defines the runtime environment and includes files processed at runtime. Profiles can be created using command line or GUI tools and include Deployment Manager profiles, Application Server profiles, and custom profiles.
WebSphere Application Server (WAS) provides the infrastructure to develop and run web and enterprise applications. It includes a web container to handle HTTP requests and servlets/JSPs, an EJB container to manage enterprise java beans, and various services like transactions, security, and messaging. WAS implements the J2EE specification and is available in different packages for single server or clustered/scalable environments. It supports the development and deployment of web services, SOA applications, and dynamic web sites.
Spring-
Spring framework is an open source Java platform that provides comprehensive infrastructure support for developing robust Java applications very easily and very rapidly. Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.
Spring provides a very clean division between controllers, JavaBean models, and views.
Spring's MVC is very flexible. Unlike Struts, which forces your Action and Form objects into concrete inheritance (thus taking away your single shot at concrete inheritance in Java), Spring MVC is entirely based on interfaces. Furthermore, just about every part of the Spring MVC framework is configurable via plugging in your own interface. Of course we also provide convenience classes as an implementation option.
Spring, like WebWork, provides interceptors as well as controllers, making it easy to factor out behavior common to the handling of many requests.
Spring MVC is truly view-agnostic. You don't get pushed to use JSP if you don't want to; you can use Velocity, XLST or other view technologies. If you want to use a custom view mechanism – for example, your own templating language – you can easily implement the Spring View interface to integrate it.
Spring Controllers are configured via IoC like any other objects. This makes them easy to test, and beautifully integrated with other objects managed by Spring.
Spring MVC web tiers are typically easier to test than Struts web tiers, due to the avoidance of forced concrete inheritance and explicit dependence of controllers on the dispatcher servlet.
The web tier becomes a thin layer on top of a business object layer. This encourages good practice. Struts and other dedicated web frameworks leave you on your own in implementing your business objects; Spring provides an integrated framework for all tiers of your application.
This presentation was shown at Spring Framework Meeting 2009 in Rome (Lazio - Italy) - 31th October 2009.
http://www.open4dev.com/journal/2009/10/26/spring-framework-meeting-2009-rome.html
Abstract:
Spring LDAP basics: how to start to use the LdapTemplate in your custom J2EE application. This how-to will show you how to bind, unbind, search and authenticate users in your LDAP using the LdapTemplate provided by Spring.
Suresh has over 8 years of experience developing Java applications. He has extensive experience with technologies like Java, J2EE, Struts, Spring, Hibernate, RESTful web services, SQL, PL/SQL, and databases like Oracle. He has worked on projects for clients in various industries, developing applications involving web interfaces, distributed architectures, and integrating with other systems. Suresh is proficient in the full development lifecycle from requirements gathering to deployment and has a track record of successfully delivering projects.
The document discusses the roles involved in developing, assembling, and deploying Java EE applications. It describes the Java EE product provider who implements the Java EE platform, the tool provider who develops tools, the application component provider who creates reusable Java EE components packaged in JAR/WAR files, and the application assembler who bundles these components into an EAR file. Finally, an application deployer installs the EAR file onto a Java EE server.
Spring is an open source Java application framework that uses dependency injection to manage the lifecycle and interdependencies of application objects. It simplifies enterprise application development by providing an alternative to EJB components and by supporting aspects like inversion of control, aspect-oriented programming, and facilitating testing. The core of Spring is the IoC container which manages the configuration and instantiation of application objects.
Glassfish is an open source application server that supports Java EE technologies like Servlets, JSP, EJB. It uses Grizzly, which is based on Apache Tomcat, as its servlet container and uses Java NIO for improved performance. Key Java EE technologies it supports include Servlets, JSP, EJB, advanced XML technologies.
Introduction to Web Application Technologies
CGI Programs on the Web Server
What is servlet?
Jobs of servlet
Advantages over CGI
Why pages are build dynamically?
Servlet container
Installation & configuration
- Type 1: Integration of Tomcat server and eclipse
- Type 2: Java Servlet
Servlet Sample Example
Servlet Overview And Architecture
- Servlet Life cycle/Single Thread Model
- Interface Servlet
- HttpServlet Class
- HttpServletRequest, HttpServletResponse
This document contains an interview preparation guide for IBM WebSphere with 12 questions and answers about WebSphere. Some key points covered include:
1. Deployment descriptors are XML files that describe how to deploy modules or applications, specifying configuration and container options. There are two types: web application deployment descriptors and portlet deployment descriptors.
2. There are three main ways to deploy applications in WebSphere: directly copying files, using Ant tasks, or through the administration console.
3. The main difference between a web server and application server is that an application server provides additional services for security, transactions, threading, etc. and supports deployment of WAR and EAR files.
4. Global Guideline provides resources
Mumbai Academics is Mumbai’s first dedicated Professional Training Center for Training with Spoke and hub model with Multiple verticles . The strong foundation of Mumbai Academics is laid by highly skilled and trained Professionals, carrying mission to provide industry level input to the freshers and highly skilled and trained Software Professionals/other professional to IT companies.
IBM Websphere introduction and installation for beginnersShubham Gupta
The document provides an overview of Websphere Application Server (WAS). It discusses the basic architecture of WAS including versions and editions. It explains key concepts in WAS like application server, nodes, deployment manager, administrative agents and job manager. It also provides instructions on stand-alone and distributed configuration of WAS and discusses concepts like cells, node groups and administrative domains.
Quontra Solutions is leading provider of IT career advice, Training and consulting services for IT Professional and corporates across USA. We train individuals or Corporate via online or class Room training in all IT tools and Technologies.
We always strive to bring out innovative methods along with the traditional teaching techniques which enhance the overall experience of the students and teachers to extract the return on Investments, high efficiency and scalability.
The company’s architecture is based on the insights from the marketplace, business analytics and strategies keeping intact the fundamental principles in mind, helps us to compete and win in today’s environment without changing any quality in training.
The support, service and training provided by Quontra solutions for various customers assures a “stay up to date” easy transition from previous to current in terms of technology. Our advertisers and promoters are none other than the clients you have been associated with us for their training needs. We improve our training programs from the feedback from the students.
Email Id : [email protected]
Website: http://www.quontrasolutions.co.uk
CETPA INFOTECH PVT LTD is one of the IT education and training service provider brands of India that is preferably working in 3 most important domains. It includes IT Training services, software and embedded product development and consulting services.
The document discusses the key capabilities of IBM WebSphere Portal including:
1. Providing a single user experience and navigation model across different devices and clients.
2. Supporting personalization, security, web content management, and application integration features.
3. Allowing integration with Microsoft applications and environments like SharePoint through out-of-the-box federation portlets.
The J2EE architecture divides applications into three tiers - the client tier, server tier, and database tier. The client tier handles the user interface. The server tier consists of the web tier and business tier, with the web tier handling HTTP requests and the business tier containing application logic. The database tier communicates with databases and external systems to store and retrieve persistent data.
CETPA INFOTECH PVT LTD is one of the IT education and training service provider brands of India that is preferably working in 3 most important domains. It includes IT Training services, software and embedded product development and consulting services.
http://www.cetpainfotech.com
Its an distributed enviornment for developing the enterprise application.We can develop multi-tier,three-tier or n-tier architecture using this.In this Java Server Pages and Servlet is the important things
This document provides an introduction and overview of Java Database Connectivity (JDBC). It discusses what JDBC is, the different types of JDBC drivers, how to connect to databases using JDBC, and how to execute SQL statements and process result sets. It also covers how to access database metadata and provides examples of using JDBC to connect to and query a Microsoft Access database.
Ibm web sphere application server interview questionspraveen_guda
WebSphere Application Server is an application server that provides runtime environments for Java EE applications. It allows deploying, configuring, and managing applications. A profile defines the runtime environment and includes files processed at runtime. Profiles can be created using command line or GUI tools and include Deployment Manager profiles, Application Server profiles, and custom profiles.
WebSphere Application Server (WAS) provides the infrastructure to develop and run web and enterprise applications. It includes a web container to handle HTTP requests and servlets/JSPs, an EJB container to manage enterprise java beans, and various services like transactions, security, and messaging. WAS implements the J2EE specification and is available in different packages for single server or clustered/scalable environments. It supports the development and deployment of web services, SOA applications, and dynamic web sites.
Spring-
Spring framework is an open source Java platform that provides comprehensive infrastructure support for developing robust Java applications very easily and very rapidly. Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.
Spring provides a very clean division between controllers, JavaBean models, and views.
Spring's MVC is very flexible. Unlike Struts, which forces your Action and Form objects into concrete inheritance (thus taking away your single shot at concrete inheritance in Java), Spring MVC is entirely based on interfaces. Furthermore, just about every part of the Spring MVC framework is configurable via plugging in your own interface. Of course we also provide convenience classes as an implementation option.
Spring, like WebWork, provides interceptors as well as controllers, making it easy to factor out behavior common to the handling of many requests.
Spring MVC is truly view-agnostic. You don't get pushed to use JSP if you don't want to; you can use Velocity, XLST or other view technologies. If you want to use a custom view mechanism – for example, your own templating language – you can easily implement the Spring View interface to integrate it.
Spring Controllers are configured via IoC like any other objects. This makes them easy to test, and beautifully integrated with other objects managed by Spring.
Spring MVC web tiers are typically easier to test than Struts web tiers, due to the avoidance of forced concrete inheritance and explicit dependence of controllers on the dispatcher servlet.
The web tier becomes a thin layer on top of a business object layer. This encourages good practice. Struts and other dedicated web frameworks leave you on your own in implementing your business objects; Spring provides an integrated framework for all tiers of your application.
This presentation was shown at Spring Framework Meeting 2009 in Rome (Lazio - Italy) - 31th October 2009.
http://www.open4dev.com/journal/2009/10/26/spring-framework-meeting-2009-rome.html
Abstract:
Spring LDAP basics: how to start to use the LdapTemplate in your custom J2EE application. This how-to will show you how to bind, unbind, search and authenticate users in your LDAP using the LdapTemplate provided by Spring.
Mise en place d'une plateforme SAP BI autour de SAP MM :
- Définition des processus métier logistique autour de SAP MM
- Définition des tableaux de bords pour la mesure de performance et contrôle
- Définition des cubes MM dans SAP BI pour l'élaboration des tableaux de bords et KPI
- Réalisation des requetes
- Réalisation des tableaux de bords et KPI
- Dataquality (données BI et données système source SAP)
- Mesure de l'éfficacité des résultats (tableaux de bords et KPI)
- Mise en production
contact :[email protected]
The document provides an overview of advanced Java topics for an industrial training course, including introductions to Java, J2EE, MVC architecture, Java Server Pages, JavaBeans, servlets, how servlets work, cookies and sessions, creating a simple servlet, and JDBC. It describes these technologies and how they are used to develop web applications and interact with databases.
The document discusses the evolution of J2EE architecture from single-tier to multi-tier architectures. It describes the key components and services in J2EE like EJBs, servlets, JSPs, JNDI, JTA, etc. It also discusses how J2EE applications are deployed on application servers with different containers managing different components.
The document provides an introduction to the Struts framework. It describes Struts as an open source MVC framework that implements the JSP Model 2 architecture. It stores routing information in a configuration file and separates the model, view, and controller layers. All requests are routed through the Struts controller which uses the configuration file to map requests to actions, which then call services and forward to view resources.
The document provides an overview of the Java EE 7 platform. It describes Java EE 7 as an enterprise application platform that aims to simplify development by providing common foundations and APIs. The key components of Java EE 7 applications include web components, enterprise beans, application clients, and Java EE containers that manage the execution of components. The document also outlines the architecture of Java EE applications and how different application parts interact, as well as APIs, tools, and benefits of the Java EE 7 platform for developers.
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
Servlet Technology is used to create web applications. Servlet technology uses Java language to create web applications.
As Servlet Technology uses Java, web applications made using Servlet are Secured, Scalable and Robust.
Web applications are helper applications that resides at web server and build dynamic web pages. A dynamic page could be anything like a page that randomly chooses picture to display or even a page that displays the current time.
Enrterprise Java-Unit 1 (All chapters) for TYIT PPTxdcruzsophia24
Unit 1 of Enterprise Java introduces the core concepts of the Java EE platform, focusing on its architecture and components for building scalable, multitiered enterprise applications. It covers key technologies like Servlets, JSP, JSF for web development, and Enterprise JavaBeans (EJB) for business logic. The unit also explores the Java Persistence API (JPA) for database interaction, and Java Messaging Service (JMS) for enterprise messaging. Security aspects, including authentication, authorization, and role-based access, are addressed. This unit provides a foundational understanding of Java EE, essential for developing robust and secure enterprise applications.
J2EE (Java 2 Platform, Enterprise Edition) is a platform for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications. It uses a distributed multi-tiered application model where application logic is divided into components running on different machines depending on their function. Components include web components, enterprise beans running business logic on the server, and application clients running on the client. The J2EE platform provides containers that manage these components and offer underlying services like transaction management, security, and connectivity.
The Java EE platform is a complete platform for developing multi-tier distributed applications. It consists of the Java Virtual Machine, Java SE APIs, a Java EE application server, and Java EE APIs. Java EE specifications are defined by the Java Community Process and implemented through Java Specification Requests. Different implementations can exist for the same API. Java EE provides features like persistence, transaction processing, security, and deployment of software components to a server.
This document discusses server-side programming and servlets. It defines a web application as an application accessible from the web, composed of web components like servlets that execute on the web server. It describes CGI technology and its disadvantages. It then discusses server-side scripting, why server-side programming is important for enterprise applications, and the advantages it provides over client-side programming. The document outlines different types of server-side programs and provides details on servlets, the servlet container, servlet API, and the servlet lifecycle.
This document provides an overview of enterprise application development using Java. It discusses the evolution from two-tier client-server architectures to the more scalable multi-tier Java 2 Platform, Enterprise Edition (J2EE). Key components of J2EE include servlets, JavaServer Pages (JSP), and Enterprise JavaBeans (EJB) that allow developing scalable applications across tiers for clients, presentation logic, and application logic. EJBs in particular help encapsulate complex business logic and coordinate transactional work across entity beans. The document outlines the benefits of J2EE like component-based models, container services, and simplified yet flexible architectures for developing enterprise applications using Java.
J2EE Notes JDBC database Connectiviy and Programs related to JDBCChaithraCSHirematt
- Java 2 Platform, Enterprise Edition (J2EE) builds upon Java 2 Platform, Standard Edition (J2SE) and is used to create large, distributed, multi-tier enterprise applications. It provides APIs and services for these types of applications.
- J2EE applications typically use a multi-tier architecture with client, web, business, and data tiers. The client tier interacts with users/devices. The web tier contains web components like servlets and JSPs. The business tier houses enterprise beans that implement business logic. The data tier consists of databases.
- Containers in each tier manage components and provide common services. For example, the EJB container manages enterprise beans and provides transactions.
- Java EE provides APIs to develop distributed applications using the client-server model, where requests from clients are served by remote servers.
- In the client-server model, a client such as a web browser makes requests to a server like a web server, which responds with static or dynamic content typically in HTML format.
- The Java EE platform facilitates an architecture where business components are placed in a separate middle tier, enhancing features like scalability, extensibility and maintainability.
This document provides an overview of Enterprise JavaBeans (EJBs). It discusses that EJBs are reusable components that represent data and behavior, and can be combined visually using development tools. EJBs provide advantages like avoiding the need to write multi-threaded, database access, network communication, transaction management, and other complex code. EJBs from different systems can interact easily through well-defined interfaces. The document also outlines EJB containers, web browsers, applets and other Java EE components, and common scripts used to manage the Java EE server.
Web Component Development with Servlet and JSP Technologies Unit 01Prashanth Shivakumar
Download Complete Material - https://www.instamojo.com/prashanth_ns/
This Web Component Development with Servlet and JSP Technologies contains 16 Units and each unit contains 60 slides in it.
Contents…
• Introduction to Web Application Technologies
• Developing a View Component
• Developing a Controller Component
• Developing Dynamic Forms
• Sharing Application Resources Using the Servlet Context
• Designing the Business Tier
• Developing Web Applications Using Struts
• Developing Web Applications Using Session Management
• Using Filters in Web Applications
• Integrating Web Applications With Databases
• Developing JSP™ Pages
• Developing JSP Pages Using Custom Tags
• Developing Web Applications Using Struts Action Forms
• Building Reusable Web Presentation Components
This document provides an overview of JEE technologies and servlet APIs:
- It describes websites and web applications, and identifies enterprise applications.
- It explores the servlet API and identifies key concepts like HTTP requests and responses, servlet containers, and the execution process of servlets.
- The document discusses key servlet terminology and the advantages and limitations of using servlets.
This document provides an overview of the J2EE (Java 2 Enterprise Edition) technology components covered in the first day of a J2EE tutorial. It discusses the evolution of Java technologies and introduces the three main editions: J2SE, J2EE, and J2ME. The tutorial will focus on J2EE, which provides an integrated framework for developing enterprise applications. J2EE comprises component technologies like servlets and EJBs, service technologies like JNDI and JTA, and communication technologies. The document explains the J2EE architecture and containers, including the web container, EJB container, and applet container. It defines a J2EE container as a runtime that manages components and provides access to
This document discusses enterprise architecture types and Java EE. It describes single, two, and three-tier architectures. It also discusses n-tier architecture and the advantages it provides. Finally, it provides an overview of Java EE, including its benefits, features, runtime infrastructure, APIs, containers, and the process for developing a Java EE application.
The document discusses the implementation of a project, including:
- The selection of Windows 7 and a platform-independent J2EE platform for development
- The selection of Java as the programming language due to its object-oriented capabilities, rich APIs, powerful development tools, open source libraries, and platform independence
- The use of Oracle Database for its reliability and ability to ensure data integrity through ACID properties
- Requirements including Java/J2EE, HTML, JavaScript, JSON, and Tomcat as the web server
- Guidelines for programming including naming conventions and handling exceptions
- The implementation procedure including creating a dynamic web project in Eclipse and exporting a WAR file
Web Application Technologies,What is servlet?
Jobs of servlet
Advantages over CGI
Why pages are build dynamically?
Servlet container
Installation & configuration
- Type 1: Integration of Tomcat server and eclipse
- Type 2: Java Servlet
Servlet Sample Example
Servlet Overview And Architecture
- Servlet Life cycle/Single Thread Model
- Interface Servlet
- HttpServlet Class
- HttpServletRequest, HttpServletResponse
Handling client request :Http request
Generating Server Response : Http status code
Handling Session
- Cookies
- Session Tracking
- URL-re writing
- Hidden Form fields
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025BookNet Canada
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, transcript, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxAnoop Ashok
In today's fast-paced retail environment, efficiency is key. Every minute counts, and every penny matters. One tool that can significantly boost your store's efficiency is a well-executed planogram. These visual merchandising blueprints not only enhance store layouts but also save time and money in the process.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just tools—they're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...SOFTTECHHUB
I started my online journey with several hosting services before stumbling upon Ai EngineHost. At first, the idea of paying one fee and getting lifetime access seemed too good to pass up. The platform is built on reliable US-based servers, ensuring your projects run at high speeds and remain safe. Let me take you step by step through its benefits and features as I explain why this hosting solution is a perfect fit for digital entrepreneurs.
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell
With expertise in data architecture, performance tracking, and revenue forecasting, Andrew Marnell plays a vital role in aligning business strategies with data insights. Andrew Marnell’s ability to lead cross-functional teams ensures businesses achieve sustainable growth and operational excellence.
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungenpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-und-verwaltung-von-multiuser-umgebungen/
HCL Nomad Web wird als die nächste Generation des HCL Notes-Clients gefeiert und bietet zahlreiche Vorteile, wie die Beseitigung des Bedarfs an Paketierung, Verteilung und Installation. Nomad Web-Client-Updates werden “automatisch” im Hintergrund installiert, was den administrativen Aufwand im Vergleich zu traditionellen HCL Notes-Clients erheblich reduziert. Allerdings stellt die Fehlerbehebung in Nomad Web im Vergleich zum Notes-Client einzigartige Herausforderungen dar.
Begleiten Sie Christoph und Marc, während sie demonstrieren, wie der Fehlerbehebungsprozess in HCL Nomad Web vereinfacht werden kann, um eine reibungslose und effiziente Benutzererfahrung zu gewährleisten.
In diesem Webinar werden wir effektive Strategien zur Diagnose und Lösung häufiger Probleme in HCL Nomad Web untersuchen, einschließlich
- Zugriff auf die Konsole
- Auffinden und Interpretieren von Protokolldateien
- Zugriff auf den Datenordner im Cache des Browsers (unter Verwendung von OPFS)
- Verständnis der Unterschiede zwischen Einzel- und Mehrbenutzerszenarien
- Nutzung der Client Clocking-Funktion
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
Quantum Computing Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
How Can I use the AI Hype in my Business Context?Daniel Lehner
𝙄𝙨 𝘼𝙄 𝙟𝙪𝙨𝙩 𝙝𝙮𝙥𝙚? 𝙊𝙧 𝙞𝙨 𝙞𝙩 𝙩𝙝𝙚 𝙜𝙖𝙢𝙚 𝙘𝙝𝙖𝙣𝙜𝙚𝙧 𝙮𝙤𝙪𝙧 𝙗𝙪𝙨𝙞𝙣𝙚𝙨𝙨 𝙣𝙚𝙚𝙙𝙨?
Everyone’s talking about AI but is anyone really using it to create real value?
Most companies want to leverage AI. Few know 𝗵𝗼𝘄.
✅ What exactly should you ask to find real AI opportunities?
✅ Which AI techniques actually fit your business?
✅ Is your data even ready for AI?
If you’re not sure, you’re not alone. This is a condensed version of the slides I presented at a Linkedin webinar for Tecnovy on 28.04.2025.
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...Alan Dix
Talk at the final event of Data Fusion Dynamics: A Collaborative UK-Saudi Initiative in Cybersecurity and Artificial Intelligence funded by the British Council UK-Saudi Challenge Fund 2024, Cardiff Metropolitan University, 29th April 2025
https://alandix.com/academic/talks/CMet2025-AI-Changes-Everything/
Is AI just another technology, or does it fundamentally change the way we live and think?
Every technology has a direct impact with micro-ethical consequences, some good, some bad. However more profound are the ways in which some technologies reshape the very fabric of society with macro-ethical impacts. The invention of the stirrup revolutionised mounted combat, but as a side effect gave rise to the feudal system, which still shapes politics today. The internal combustion engine offers personal freedom and creates pollution, but has also transformed the nature of urban planning and international trade. When we look at AI the micro-ethical issues, such as bias, are most obvious, but the macro-ethical challenges may be greater.
At a micro-ethical level AI has the potential to deepen social, ethnic and gender bias, issues I have warned about since the early 1990s! It is also being used increasingly on the battlefield. However, it also offers amazing opportunities in health and educations, as the recent Nobel prizes for the developers of AlphaFold illustrate. More radically, the need to encode ethics acts as a mirror to surface essential ethical problems and conflicts.
At the macro-ethical level, by the early 2000s digital technology had already begun to undermine sovereignty (e.g. gambling), market economics (through network effects and emergent monopolies), and the very meaning of money. Modern AI is the child of big data, big computation and ultimately big business, intensifying the inherent tendency of digital technology to concentrate power. AI is already unravelling the fundamentals of the social, political and economic world around us, but this is a world that needs radical reimagining to overcome the global environmental and human challenges that confront us. Our challenge is whether to let the threads fall as they may, or to use them to weave a better future.
Dev Dives: Automate and orchestrate your processes with UiPath MaestroUiPathCommunity
This session is designed to equip developers with the skills needed to build mission-critical, end-to-end processes that seamlessly orchestrate agents, people, and robots.
📕 Here's what you can expect:
- Modeling: Build end-to-end processes using BPMN.
- Implementing: Integrate agentic tasks, RPA, APIs, and advanced decisioning into processes.
- Operating: Control process instances with rewind, replay, pause, and stop functions.
- Monitoring: Use dashboards and embedded analytics for real-time insights into process instances.
This webinar is a must-attend for developers looking to enhance their agentic automation skills and orchestrate robust, mission-critical processes.
👨🏫 Speaker:
Andrei Vintila, Principal Product Manager @UiPath
This session streamed live on April 29, 2025, 16:00 CET.
Check out all our upcoming Dev Dives sessions at https://community.uipath.com/dev-dives-automation-developer-2025/.
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPathCommunity
Join this UiPath Community Berlin meetup to explore the Orchestrator API, Swagger interface, and the Test Manager API. Learn how to leverage these tools to streamline automation, enhance testing, and integrate more efficiently with UiPath. Perfect for developers, testers, and automation enthusiasts!
📕 Agenda
Welcome & Introductions
Orchestrator API Overview
Exploring the Swagger Interface
Test Manager API Highlights
Streamlining Automation & Testing with APIs (Demo)
Q&A and Open Discussion
Perfect for developers, testers, and automation enthusiasts!
👉 Join our UiPath Community Berlin chapter: https://community.uipath.com/berlin/
This session streamed live on April 29, 2025, 18:00 CET.
Check out all our upcoming UiPath Community sessions at https://community.uipath.com/events/.
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
5. Components of Generic Web Application
Client: Generally a browser(user agent) is controlled by a user to operate the Web
application. The client’s functionality can be expanded by installing plug-in sandapplets.
Firewall: A piece of software regulating the communication between insecure networks
(e.g.,the Internet)and secure networks(e.g.,corporate LANs). This communication is
filtered by access rules.
Proxy: A proxy is typically used to temporarily store Web pages in a cache. However
, proxies can also assume other functionalities, e.g., adapting the contents for users
(customization), or user tracking.
Web server :A Web server is a piece of software that supports various Web protocols
like HTTP and HTTPS, etc., to process client requests.
Database server: This server normally supplies an organization’s production data in
structured form ,e.g., in tables.
Media server: This component is primarily used for content streaming of non-
structured bulk data(e.g.,audio or video).
Content management server: Similar to a database server, a content management
server holds contents to serve an application. These contents are normally available in
the form of semi-structured data ,e.g., XML documents.
Application server: An application server holds the functionality required by several
applications, e.g., workflow or customization.
Legacy application: A legacy application is an older system that should be integrated as
an internal or external component.
8. Why J2EE ?
Technical Benefits
• Enables component based approach to develop enterprise web application.
• Reduces cost and complexity of developing large,multi-tier-web-based
application.
• Component types supported,State management,Database caching,declarative
(automated) persistance,scalability through load balancing.
Buisness Benefits
•Indusrty buy-in and choice of vendors,greater utilization of existing IT assets.
• Faster response to change,choice of proven ,scalable and reliable platform.
9. Components of J2EE Web Application
Client Tier
• Client tier supports both applet container and application client container.
• Applet container is the container to manage the execution of applets.Exam-
-ples of an applet container are applet viewer,web browser and java Plug-in
running on the client together.
• Application client container is the one which is responsible for managing the
application client components. Both application client and its container resides
at the client machine and are executed on the client end. Example of
application container is JVM.
10. Components of J2EE Web Application
Middle Tier
• Whole presentation and buisness logic is executed in middle tier which con-
sists of Web container , EJB container and a number of industry standered APIs
for accessing Enterprise Information system and Database.
• EJB Container
Enterprise Java Beans (EJB) is a tecnology in J2EE platform,which standerdizes
how to build server side components for distributed applications.It is a reusa-
ble software components written in java,which run inside EJB Container.EJB
container is a part of J2EE application server which manages whole lifecycle of
EJBs and provide them with some important system level services.When client
sends request through JSP,JSP request EJB for information.Once EJB generate
Information from database,JSP file then display it to client.
EJB is NOT relevant to our discussion to Struts.
11. Components of J2EE Web Application
Middle Tier
• Web Container
In Web Container also known as Servlet container,JSPs and Servlets are main
non-pure java components mixed with plain static pages.They can also
generate dynamic HTML with dynamic contents coming from back end tier and
interact with client-tier components.
In J2EE platform,the presentation between end user and system response
should be handled by JSP and Servlets technologies and buisness logic should
be encapsulated by Java Bean (or Enterprise Java Bean).
•Industry Standerd APIs are for accessing Enterprise Information system and
Database. They include following services : 1)HTTP,HTTPs 2)Java Transaction
API(JTA) 3)Java Interface Definition Language(JavaIDL) 4)Java Naming and
Directory Services (JNDI) 5)Java Message Services (JMS) 6)RMI-IIOP etc.
12. Components of J2EE Web Application
• Java EE Containers
1) Application client container
2) Applet Container
3) Web container – part of Java EE Application Server
4) EJB Container - part of Java EE Application Server
All of the above comes under Java EE Containers.
• Java EE Application Servers
J2EE specification defines a whole lot of interfaces and a few
classes.Implementations for these interfaces adhering to the J2EE
specifications. These implementations are called J2EE Application
Servers.
Example : WebLogic by Oracle,WebSphere by IBM,Gerinomo,TomEE
by Apache,Jboss etc
14. CGI ,SERVLET AND JSP
Evolution of Dynamic Content Generation
When World Wide Web (WWW) started in the year 1989 at he CERN laboratory
the idea was to have a mechanism which enabled sharing of research
information among researchers using hypertext docs. And hence Web was
designed to serve static contents in the beginning. The obvious and natural
progression was to have the ability of dynamic content generation on Web and
there came the concept of CGI.
CGI - Common Gateway Interface
CGI was designed to generate the contents on the Web dynamically. It became
hugely popular in no time as it allowed the Web applications to access the
database to show results based on dynamically selected criterio and it also
facilitated insert/update of information in the database accepting the info from
the end-user.As the popularity grew the scalability of the web applications also
grew and then we started realizing the limitaions of CGI.
15. CGI ,SERVLET AND JSP
Limitations of CGI
New Process per Request - the main drawback of CGI approach was that it
spawned a new heavy-weight Operating System process everytime a new
request was made from the end users (from browser). This immensely
restricted the scalability and responsiveness of the web applications as creating
(and reclaiming once the request is served) OS processes are time and resource
consuming stuff.Communication Gap between Web Server and Requests - since
all the requests are executed in a different OS process from the Web Server
process hence it becomes difficult to have a smooth communication between
the server and the requests to handle stuff like logging, authorization, etc.
Alternatives of CGI FastCGI,mod_perl,NSAPI,ISAPI Most important and
Popular one :Java Servlets
16. CGI ,SERVLET AND JSP
Java Servlets - what are they?
Sun Microsystems introduced this technology in the year 1997 and it became an instant hit
due to various advantages it provided over CGI. It was no longer required to have a new
process every time a request was made from an end-user.
It was a platform-independent (As it is written completely in Java), component-based
approach of developing web applications having dynamic content genration capabilities.
Since it is written in Java hence all the tested and tried rich set of APIs of Java are readily
available to be used and this advantage took this technology way above its competitors.
18. CGI ,SERVLET AND JSP
J2EE Web Application
Any web application that runs in the servlet container is called a J2EE web
application. The servlet container implements the Servlet and JSP specification.
It provides various entry points for handling the request originating from a web
browser. There are three entry points for the browser into the J2EE web
application - Servlet, JSP and Filter. You can create your own Servlets by
extending the javax.servlet.http.HttpServlet class and implementing
the doGet() and doPost() method. You can create JSPs simply by creating a
text file containing JSP markup tags. You can create Filters by implementing the
javax.servlet.Filter interface.
The servlet container becomes aware of Servlets and Filters when they are
declared in a special file called web.xml . A J2EE web application has exactly
One web.xml.
19. CGI ,SERVLET AND JSP
Why were JSPs needed when we had Servlets?
Servlet Drawbacks
Servlets do an excellent job of dynamic content generation, but it becomes difficult and
tedious to use Servlets for presentation of the data in HTML. EVery HTML change requires
us to recompile the Servlet and the maintenance of Servlets become difficult as HTML
changes are quite frequest in nature and using Servlets to do that ends up making
corresponding Java code changes everytime.
Another serious drawback of this approach was that it didn't facilitate clear separation
of roles and responsibilities. HTML design and devlopment is primarily the responsibility
of a Web Designer (usually a person having limited Java expertise) whereas the
responsibility of design & development of Servlets belongs to Java Developers. Using
Servlets for presentaion of data mixed both these roles and hence the entire devlopment
life cycle used to be more complex and hence slower. A clear separation of roles and
responsibilities enhanced the overall development cycle and it also made the applications
better maintainable.
20. CGI ,SERVLET AND JSP
Java Server Pages (JSP) Technology
JSP (JavaServer Pages) Technology is used to achieve the clear separation. A JSP
can use normal HTML tags/elements the way we can have in any other normal
HTML file and in addition it can have Tags, Scriptlets, etc. to encapsulate the
business logic for the dynamic content generation. A Web Designer can simply
use those tags or leave the scriptlets to be embedded by the Java Developers. In
fact, it's become a better practice to avoid scriptlets as much as we can from a
JSP page and to rely only on Tags for the dynamic content generation. This not
only makes the life of JSP Page easier, but also enhances the reusability of the
code (writen for Tags) and hence improves maintanability.
There are two models for developing JSP based web application architectures.
• Model 1 Architecture
• Model 2 Architecture (MVC)
22. Model 1 Architecture – How it Works
In this architecture a JSP Page is used not only for the display of the output to the
client, but also for the entire request processing including Accepting the
Request, Creating JavaBeans (or connecting to the DB for data), Executing the
Business Logic to generate Dynamic Content, etc
Let us illustrate the operation of Model 1 architecture with an example.
Consider a HTML page with a hyperlink to a JSP. When user clicks on the
hyperlink, the JSP is directly invoked. This is shown in Figure 1.1. The servlet
container parses the JSP and executes the resulting Java servlet. The JSP contains
embedded code and tags to access the Model JavaBeans. The Model JavaBeans
contains attributes for holding the HTTP request parameters from the query
string. In addition it contains logic to connect to the middle tier or directly to the
database using JDBC to get the additional data needed to display the page. The
JSP is then rendered as HTML using the data in the Model JavaBeans and other
Helper classes and tags.
23. Model 1 Architecture – Disadvantages
There is some separation between content (Model JavaBeans) and presentation
(JSP). This separation is good enough for smaller applications. Larger applications
have a lot of presentation logic.
The presentation logic usually leads to a significant amount of Java code
embedded in the JSP in the form of scriptlets. This is ugly and maintenance
nightmare even for experienced Java developers.
In large applications, JSPs are developed and maintained by page authors.
The intermingled scriptlets and markup results in unclear definition of roles
and is very problematic.
Application control is decentralized in Model 1 architecture since the next
page to be displayed is determined by the logic embedded in the current
page.Decentralized navigation control can cause headaches. All this leads us
to Model 2 architecture .
32. Model 2 Architecture – How it Works
The main difference between Model 1 and Model 2 is that in Model 2, a
controller handles the user request instead of another JSP. The controller is
implemented as a Servlet. The following steps are executed when the user
submits the request.
1. The Controller Servlet handles the user’s request. (This means the hyperlink
in the JSP should point to the controller servlet).
2 .The Controller Servlet then instantiates appropriate JavaBeans based on the
request parameters (and optionally also based on session attributes).
3 .The Controller Servlet then by itself or through a controller helper
communicates with the middle tier or directly to the database to fetch the
required data.
4 . The Controller sets the resultant JavaBeans (either same or a new one) in
one of the following contexts – request, session or application.
5 . The controller then dispatches the request to the next view based on the
request URL.
6. The View uses the resultant JavaBeans from Step 4 to display data.
33. Model 2 Architecture – How it Works
The main difference between Model 1 and Model 2 is that in Model 2, a
controller handles the user request instead of another JSP. The controller is
implemented as a Servlet. The following steps are executed when the user
submits the request.
1. The Controller Servlet handles the user’s request. (This means the hyperlink
in the JSP should point to the controller servlet).
2 .The Controller Servlet then instantiates appropriate JavaBeans based on the
request parameters (and optionally also based on session attributes).
3 .The Controller Servlet then by itself or through a controller helper
communicates with the middle tier or directly to the database to fetch the
required data.
4 . The Controller sets the resultant JavaBeans (either same or a new one) in
one of the following contexts – request, session or application.
5 . The controller then dispatches the request to the next view based on the
request URL.
6. The View uses the resultant JavaBeans from Step 4 to display data.
34. Model 2 Architecture – Advantages
No presentation logic in JSP, there are no scriptlets. This means
lesser nightmares,although MVC does not architecturally prevent you from
adding scriptlets.
With MVC you can have as many controller servlets in your web application, one
Controller Servlet per module.
A single controller servlet for the web application lets you centralize all the
tasks in a single place,avoids duplication of code.
Web applications based on Model 2 architecture are easier to maintain and
extend since the views do not refer to each other and there is no presenta-
-ion logic in the views.
It also allows you to clearly define the roles and responsibilities in large
projects thus allowing better coordination among team members.
35. Model 2 Architecture – Disadvantages
Controller gone bad – Fat Controller
If MVC is all that great, why do we need Struts after all? The answercomplexities.
the difficulties associated in applying bare bone MVC to real world
lies in
In medium to large applications, centralized control and processing logic in the
servlet – the greatest plus of MVC is also its weakness.
Consider a mediocre application with 15 JSPs. Assume that each page has five
hyperlinks (or five form submissions). The total number of user requests to be
handled in the application is 75. Since we are using MVC framework, a centralized
controller servlet handles every user request. For each type of incoming request
there is “if” block in the doGet method of the controller Servlet to process the
request and dispatch to the next view. For this mediocre application of ours, the
controller Servlet has 75 if blocks. Even if you assume that each if block delegates
the request handling to helper classes it is still no good. You can only imagine how
bad it gets for a complex enterprise web application. So, we have a problem at
hand. The Controller Servlet that started out as the greatest thing next to sliced
bread has gone bad. It has put on a lot of weight to become a Fat Controller.
38. MVC with Configurable Controller
How It works
1. Properties file :It contains information in key value pair which is actually
one to one mapping URL for each http request and handler class. There is a
unique handler class for each url.
2 . Controller Servlet loads the properties file on startup
3 . When the HTTP request arrives from the client, the Controller Servlet looks
up in a properties file to decide on the right Handler class for the HTTP
request.This Handler class is referred to as the Request Handler.
4 . The Request Handler contains the presentation logic for that HTTP request
including business logic invocation. In other words, the Request Handler does
everything that is needed to handle the HTTP request.
5 . The only difference so far from the bare bone MVC is that the controller
servlet looks up in a properties file to instantiate the Handlerinstead of calling
it directly.
39. MVC with Configurable Controller
6. there must be some sort of commonality between the Request Handlers
for the servlet to generically instantiate the Request Handler. The commonal-
-ity is that all Request Handler classes implement a common interface. Let us
call this common interface as Handler Interface. In its simplest form, the
Handler Interface has one method say, execute().
7 . The Controller Servlet instantiates the Request Handler in the doGet()
method and invokes the execute() method on it using Java Reflection. The
execute() method invokes appropriate business logic from the middle tier and
then selects the next view to be presented to the user.
8 . The controller servlet forwards the request to the selected JSP view. All this
happens in the doGet() method of the controller servlet. The doGet() method
lifecycle never changes.What changes is the Request Handler’s execute()
method.
9. You just saw how Struts works in a nutshell!!! Instead of using a properties
file like we did in this example, Struts uses XML to store more useful
information.
42. Struts Framework Components
1. All the core components of Struts framework belong to
Controller category.
2. Struts has no components in the Model category.
3. Struts has only auxiliary components in View category. A
collection of custom tags making it easy to interact with the
controller. The View category is neither the core of Struts
framework nor is it necessary.However it is a helpful library for
using Struts effectively in JSP based rendering.
43. Struts Framework Components
Controller Category
The ActionServlet and the collaborating classes form the controller
and is the core of the framework. The collaborating classes are :
1.RequestProcessor
2.ActionForm
3.Action
4.ActionMapping
5 .Action Forward.
View Category
It contains utility classes – variety of custom tags making it easy
to interact with the controller. It is not mandatory to use these
utility classes. You can replace it with classes of your own.
44. Struts Framework Components
Model Category
Struts does not offer any components in the Model Category.Many
component models (CORBA, EJB) are available to implement the
business tier.
NOTE: Some people argue that ActionForm is the model component.
However ActionForm is really part of the controller. The Struts
documentation also speaks along similar lines. It is just View Data
Transfer Object – a regular JavaBeans that has dependencies on the
Struts classes and used for transferring the data to various classes
within the controller.
45. Struts Request Lifecycle
A request from the client browser creates an HTTP request which comes to the servlet
container.
Step 1 :
Servlet container looks up into web.xml,using load-on-startup Instantiate the
ActionServlet and do following three tasks:
First Task : The ActionServlet takes the Struts Config file name as an init-param.
At startup, in the init() method, the ActionServlet reads the Struts Config file and load
into memory.
46. Struts Request Lifecycle
Second Task : If the user types http://localhost:8080/app/submitForm.do in
the browser URL bar, the URL will be intercepted and processed by the
ActionServlet since the URL has a pattern *.do, with a suffix of "do".
Because servlet-mapping is
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
Third Task : Then ActionServlet delegates the request handling to another
class called RequestProcessor by invoking
its process() method.
47. Struts Request Lifecycle
Step 2 :
The RequestProcessor does the following in its process() method
a) The RequestProcessor looks up the configuration file for the URL pattern
/submitForm (if the URL is http://localhost:8080/app/submitForm.do). and
and finds the XML block (ActionMapping).
ActionMapping from struts-config.xml
48. Struts Request Lifecycle
b) The RequestProcessor instantiates the EmpForm and puts it in appropriate
scope – either session or request.The RequestProcessor determines the
appropriate scope by looking at the scope attribute in the same ActionMapping.
c) RequestProcessor iterates through the HTTP request parameters and populates
the EmpForm.
d) the RequestProcessor checks for the validateattribute in the ActionMapping.
If the validate is set to true, the RequestProcessor invokes the validate() method
on the EmpForm instance.
This is the method where you can put all the html form data validations.
If Validate fail the RequestProcessor looks for the input attribute and return to JSP
page mentioned in input tag.
If Validate pass goto next step.
e) The RequestProcessor instantiates the Action class specified in the
ActionMapping (EmpAction) and invokes the execute() method on the EmpAction
instance.
49. Struts Request Lifecycle
Signature of the execute method :
f)Association of the logical name and the physical JSP page is encapsulated in the
ActionForward instance returned from the execute method.
In return mapping.findForward("success") RequestProcessor looks for the success
attribute and forward to JSP page mentioned in success tag. i.e success.jsp.
In return mapping.findForward("failure")
RequestProcessor looks for the failure attribute and forward to JSP page mentioned in
failure tag. i.e. failure.jsp
In J2EE terms, this is referred to as dispatching the view to the user.
50. ‘Simple Hello World’ Example
Requirements :
Softwares
1. Eclipse IDE http://www.eclipse.org/downloads/
2. Tomcat Server http://tomcat.apache.org/download-60.cgi
3. JDK www.oracle.com/technetwork/java/javase/downloads/index.html
Libraries Struts 1.3 FILES
XML Java
1.web.xml 1.HelloWorldAction.java
2.struts-config.xml 2.HelloWorldForm.java
JSP
1.HelloWorld.jsp
2.index.jsp
3.failure.jsp
http://struts.apache.org/download.cgi
60. STEPS TO EXECUTE
1. Create dynamic web project in eclipse
2. Add jsp,xml and java files according to directory structure.
3. Add struts libraries in Web-INF/lib folder.
4. Add same struts libraries in java build path(Right click on main
project ->properties->java build path->libraries ->add external
jar
5. Add tomcat server (Windows menu -> show view ->servers ->OK
6. Go to server wizard -> add new server - >Apache -> select the
tomcat version you downloaded ->Next ->Browse ->select the
folder where you extracted or installed the downloaded
tomcat ->finish
7. After adding server,right click on Project-> Run as -> Run on
Server ->select server you added ->Finish