The document provides an overview of JavaServer Faces (JSF) including:
- Key JSF concepts like page navigation, managed beans, expression language, and event handling.
- How to implement static and dynamic navigation between pages using navigation rules defined in faces-config.xml.
- An example of dynamic navigation that collects user information, invokes a controller method on submit, and conditionally navigates to an acceptance or rejection page.
Architecting Large Enterprise Java ProjectsMarkus Eisele
In the past I've been building component oriented applications with what I had at hand. Mostly driven by the features available in the Java EE standard to be "portable" and easy to use. Looking back this has been a perfect fit for many customers and applications. With an increasing demand for highly integrated applications which use already available services and processes from all over the place (departmental, central or even cloud services) this approach starts to feel more and more outdated. And this feel does not come from a technology perspective but from all the requirements around it. Having this in mind this post is the starting point of a series of how-to's and short tutorials which aim to showcase some more diverse ways of building (Enterprise Java) applications that fit better into today's requirements and landscapes.
The document discusses technologies for Java web development including Maven, Servlet 3.0, Java Server Faces 2.2, and PrimeFaces 4.0. The agenda covers using these technologies to create a sample web application with Maven, adding dependencies to the pom.xml file, configuring the web.xml file, and developing JSF and PrimeFaces pages with managed beans. Code snippets and configurations are provided as examples.
The document provides an overview of J2EE (Java 2 Enterprise Edition) and its core technologies including JDBC, Servlets, JSP, EJB, and RMI. It then discusses JDBC in more detail, explaining the JDBC architecture, drivers, and basic steps to access a database using JDBC including loading drivers, connecting, executing statements, processing results, and closing connections. It also covers PreparedStatement and CallableStatement objects.
The document discusses Java servlets and Java Server Pages (JSP). It provides an introduction to HTTP and web interactions, and describes how servlets and JSPs allow Java code to generate dynamic web content. It explains the request-response cycle between clients and servers, and how servlets fit into this model. It also covers servlet containers, the servlet lifecycle, deployment descriptors, and developing and running servlets.
A Java servlet is a server-side program that processes requests from clients. Servlets offer improved performance over CGI by remaining loaded in memory between requests. The Servlet API defines interfaces and classes for writing servlets, including Servlet, ServletRequest, and ServletResponse. Tomcat is a popular servlet container for developing and testing servlets. A basic "Hello World" servlet uses the Servlet API to write a response containing HTML.
JSP is a technology based on Java that produces dynamic web pages. JSP files contain HTML tags as well as special JSP tags where Java code is embedded. There are three main types of JSP elements - directives, scripting elements, and action elements. Directives provide information to the JSP engine, scripting elements contain Java code, and action elements perform tasks like accessing Java beans. Common implicit objects in JSP include application, page, session, and request objects. Java beans can be used with JSP through action tags like useBean, setProperty, and getProperty.
This document discusses Java servlets, which are server-side components that dynamically extend Java-enabled servers. Servlets benefit from Java's architecture and platform independence. A servlet takes an HTTP request as input and responds with an HTTP response. Servlets are more efficient and powerful than traditional CGI technologies. The document covers servlet types, software requirements, environment setup, advantages and disadvantages, the HTTP request lifecycle, and provides a simple "Hello World" servlet example.
Architecting Large Enterprise Java ProjectsMarkus Eisele
In the past I've been building component oriented applications with what I had at hand. Mostly driven by the features available in the Java EE standard to be "portable" and easy to use. Looking back this has been a perfect fit for many customers and applications. With an increasing demand for highly integrated applications which use already available services and processes from all over the place (departmental, central or even cloud services) this approach starts to feel more and more outdated. And this feel does not come from a technology perspective but from all the requirements around it. Having this in mind this post is the starting point of a series of how-to's and short tutorials which aim to showcase some more diverse ways of building (Enterprise Java) applications that fit better into today's requirements and landscapes.
The document discusses technologies for Java web development including Maven, Servlet 3.0, Java Server Faces 2.2, and PrimeFaces 4.0. The agenda covers using these technologies to create a sample web application with Maven, adding dependencies to the pom.xml file, configuring the web.xml file, and developing JSF and PrimeFaces pages with managed beans. Code snippets and configurations are provided as examples.
The document provides an overview of J2EE (Java 2 Enterprise Edition) and its core technologies including JDBC, Servlets, JSP, EJB, and RMI. It then discusses JDBC in more detail, explaining the JDBC architecture, drivers, and basic steps to access a database using JDBC including loading drivers, connecting, executing statements, processing results, and closing connections. It also covers PreparedStatement and CallableStatement objects.
The document discusses Java servlets and Java Server Pages (JSP). It provides an introduction to HTTP and web interactions, and describes how servlets and JSPs allow Java code to generate dynamic web content. It explains the request-response cycle between clients and servers, and how servlets fit into this model. It also covers servlet containers, the servlet lifecycle, deployment descriptors, and developing and running servlets.
A Java servlet is a server-side program that processes requests from clients. Servlets offer improved performance over CGI by remaining loaded in memory between requests. The Servlet API defines interfaces and classes for writing servlets, including Servlet, ServletRequest, and ServletResponse. Tomcat is a popular servlet container for developing and testing servlets. A basic "Hello World" servlet uses the Servlet API to write a response containing HTML.
JSP is a technology based on Java that produces dynamic web pages. JSP files contain HTML tags as well as special JSP tags where Java code is embedded. There are three main types of JSP elements - directives, scripting elements, and action elements. Directives provide information to the JSP engine, scripting elements contain Java code, and action elements perform tasks like accessing Java beans. Common implicit objects in JSP include application, page, session, and request objects. Java beans can be used with JSP through action tags like useBean, setProperty, and getProperty.
This document discusses Java servlets, which are server-side components that dynamically extend Java-enabled servers. Servlets benefit from Java's architecture and platform independence. A servlet takes an HTTP request as input and responds with an HTTP response. Servlets are more efficient and powerful than traditional CGI technologies. The document covers servlet types, software requirements, environment setup, advantages and disadvantages, the HTTP request lifecycle, and provides a simple "Hello World" servlet example.
This document provides instructions for a hands-on lab on packaging and deploying an enterprise application with EJBs, data objects, servlets, and JSPs. It describes creating an enterprise application archive (EAR) file by selecting projects to include from an IDE. It then explains deploying the EAR file to an application server using the server's administrative console and testing the application by invoking test points from JSPs. The goal of the hands-on lab is to demonstrate how to package and deploy the different components of an enterprise application together in a single EAR file.
The document discusses Java servlets and Java Server Pages (JSP). It describes servlets as Java programs that run on a web or application server between the HTTP client and server. JSP is described as a dynamic web page that mixes HTML and Java code enclosed in special tags. The document outlines the servlet/JSP lifecycle of init, service, and destroy phases. It provides examples of JSP tags like scriptlets, declarations, comments, directives, and implicit objects to access request parameters and session attributes.
This document provides an introduction and overview of the CakePHP framework. It discusses the MVC architecture that CakePHP follows and describes the framework's folder structure and conventions. The document outlines how CakePHP uses configurations for the database, core, and routes. It also provides examples of how controller classes, model classes, and views are structured in CakePHP applications.
This document contains slides from a lecture on servlets and server-side Java. It introduces servlets as Java programs executed on the server to generate dynamic web pages. It discusses how servlets interface with a servlet container like Tomcat to handle HTTP requests and responses. The key aspects covered include the servlet lifecycle, interfaces like GenericServlet, and common annotations in the deployment descriptor (web.xml) used to map servlets to URLs. Examples are provided of simple servlets to output "Hello World" and retrieve user input from an HTML form using the GET and POST methods.
JAX-WS is a Java framework for creating and consuming web services. It allows developers to create web services using Java annotations or a contract-first approach by defining services in WSDL. JAX-WS handles generating the necessary artifacts like WSDL and XSD. Services are deployed as a WAR file and configured using web.xml and sun-jaxws.xml. Clients can be generated using wsimport to call the web service operations.
TomatoCMS is a content management system based on PHP and uses the Zend Framework. It supports multiple databases and platforms. The architecture includes Tomato libraries, core modules, standard and third party modules. Models represent data and use the Tomato entity class instead of Zend's database table classes. This provides a data access layer that supports MySQL, MS SQL, and PostgreSQL databases.
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEsoftTech
ICEfaces EE is a JSF/AJAX development framework that allows enterprises to quickly build rich web and mobile applications. It provides a certified code base that is fully tested and compatible with various Java EE technologies. ICEfaces EE offers subscriptions that provide access to the code base, components, support, and expertise to ensure robust and stable application performance. It also allows extending applications to mobile devices. Key benefits include certified and optimized software releases, support for various platforms, and assistance from technical experts.
JavaServer Pages (JSP) allow developers to insert Java code into HTML pages using special tags. A JSP file is converted into a servlet class by the JSP container. The servlet class is then executed to generate an HTML response. The JSP lifecycle includes compilation, initialization, execution, and cleanup similar to a servlet lifecycle. Apache Tomcat is an open source web server that implements the JSP and servlet specifications and includes components like Catalina, Coyote, and Jasper to handle servlet container functions, HTTP connections, and JSP compilation respectively.
This document provides an overview of using JDBC (Java Database Connectivity) to access databases from Java applications. It covers the main JDBC concepts like drivers, connections, statements, result sets, and transactions. It also describes the typical steps for querying and updating databases using JDBC: establishing a connection, creating statements, executing SQL statements, processing result sets, and closing resources. The document includes examples for connecting to Oracle and ODBC databases and using prepared statements. It discusses best practices like using connection pools, tuning transactions, and optimizing SQL queries.
This document provides an overview of using Java Database Connectivity (JDBC) to connect to and interact with relational databases from Java servlets. It describes relational databases and how they organize data into tables. It explains the basic JDBC connection flow of getting a connection, executing SQL statements, and reading results. It also covers key JDBC interfaces like Connection, Statement, and ResultSet. The document provides an example servlet for looking up phone numbers from a database and discusses best practices like reusing connections and using connection pooling.
Java servlets are small Java programs that run on a web server and respond to requests from a client browser. Servlets receive HTTP requests from the browser, generate dynamic content, and return HTTP responses. When the server first loads a servlet, it calls the servlet's init() method to initialize it. The servlet then handles requests via its service() method, building responses using server resources. When the server removes a servlet, it calls the servlet's destroy() method to perform cleanup. Servlets allow dynamic web content and interaction between clients and server resources like databases.
The document provides an outline and instructions for a hands-on lab on Java servlets. The lab covers creating basic servlets, connecting servlets to a database via JDBC, handling HTTP sessions in servlets, invalidating HTTP sessions, and deploying servlets in a WAR file on WebLogic server. The lab instructions include screenshots and steps for setting up servlet classes, making code changes, running servlets, and testing the servlets.
JSP (Java Server Pages) is a technology that allows the creation of dynamic web pages by embedding Java code in HTML pages. This provides a simpler way to add dynamic content to web pages compared to servlets. Some key points:
- JSP pages allow embedding of Java code in HTML pages using scripting elements like <% %> tags. This separates dynamic content from static content.
- JSP pages are compiled to servlets, separating the work of Java programmers and page authors.
- Common JSP elements include scriptlets, expressions, declarations, and directives that control things like page attributes and included files.
- JSP provides built-in support for HTTP sessions and can integrate with Java
This document introduces CakePHP, an open source PHP framework that follows the MVC architecture and convention over configuration approach. It highlights key CakePHP features such as automatic code generation, associations, components, helpers, behaviors, callbacks, and conventions for simplified development. Resources for the CakePHP community and documentation are also provided.
This document provides an introduction to Java Enterprise Edition and servlet technology. It discusses what servlets are, how they are used by servlet containers and application servers to handle client requests and generate dynamic web content, and the relationships between servlets, the servlet API, and servlet containers. The servlet API defines standard interfaces and classes for communication between servlets and containers in a platform-independent way.
This document provides an overview of Java servlets technology, including:
1. What Java servlets are and their main purposes and advantages such as portability, power, and integration with server APIs.
2. Key aspects of servlet architecture like the servlet lifecycle, the HttpServletRequest and HttpServletResponse objects, and how different HTTP methods map to servlet methods.
3. Examples of simple servlets that process parameters, maintain a session counter, and examples of deploying servlets in Eclipse IDE.
The document discusses servlets and how they work, including:
1) Servlets receive requests and generate responses, acting as a container for Java code on the web.
2) Requests and responses work like ordering food - the browser sends a request and the servlet returns a response.
3) Servlets are more efficient, convenient, and portable than other options like CGI since they are written in Java.
The document outlines the chapters of a course on Servlets and JSP including introductions to Java web development, servlets, JSPs, MVC pattern, sharing information, advanced JSP concepts, using JavaBeans, JSP Expression Language, JSP Standard Tag Library, custom JSP tags, accessing databases, using JavaMail, securing applications, downloading files, listeners, and filters. It also describes setting up a basic web project structure and the lifecycle of a Java web application.
Présentation des framework JSF et richfaces issue de la formation J2EE réalisée par le club CFEM ( club futur entrepreneur en multimédia) au sein de l'institut supérieur d'informatique et multimédia de sfax (ISIMS)
This document provides an overview of JavaServer Faces (JSF), including:
- An introduction to JSF and what it is
- A description of the JSF request lifecycle and faces servlet
- An explanation of JSF component models and commonly used tags
- A step-by-step guide for creating a basic "Hello World" JSF application
- Details about JSP architectures (Model 1 and Model 2) that provide context for JSF
This document provides instructions for a hands-on lab on packaging and deploying an enterprise application with EJBs, data objects, servlets, and JSPs. It describes creating an enterprise application archive (EAR) file by selecting projects to include from an IDE. It then explains deploying the EAR file to an application server using the server's administrative console and testing the application by invoking test points from JSPs. The goal of the hands-on lab is to demonstrate how to package and deploy the different components of an enterprise application together in a single EAR file.
The document discusses Java servlets and Java Server Pages (JSP). It describes servlets as Java programs that run on a web or application server between the HTTP client and server. JSP is described as a dynamic web page that mixes HTML and Java code enclosed in special tags. The document outlines the servlet/JSP lifecycle of init, service, and destroy phases. It provides examples of JSP tags like scriptlets, declarations, comments, directives, and implicit objects to access request parameters and session attributes.
This document provides an introduction and overview of the CakePHP framework. It discusses the MVC architecture that CakePHP follows and describes the framework's folder structure and conventions. The document outlines how CakePHP uses configurations for the database, core, and routes. It also provides examples of how controller classes, model classes, and views are structured in CakePHP applications.
This document contains slides from a lecture on servlets and server-side Java. It introduces servlets as Java programs executed on the server to generate dynamic web pages. It discusses how servlets interface with a servlet container like Tomcat to handle HTTP requests and responses. The key aspects covered include the servlet lifecycle, interfaces like GenericServlet, and common annotations in the deployment descriptor (web.xml) used to map servlets to URLs. Examples are provided of simple servlets to output "Hello World" and retrieve user input from an HTML form using the GET and POST methods.
JAX-WS is a Java framework for creating and consuming web services. It allows developers to create web services using Java annotations or a contract-first approach by defining services in WSDL. JAX-WS handles generating the necessary artifacts like WSDL and XSD. Services are deployed as a WAR file and configured using web.xml and sun-jaxws.xml. Clients can be generated using wsimport to call the web service operations.
TomatoCMS is a content management system based on PHP and uses the Zend Framework. It supports multiple databases and platforms. The architecture includes Tomato libraries, core modules, standard and third party modules. Models represent data and use the Tomato entity class instead of Zend's database table classes. This provides a data access layer that supports MySQL, MS SQL, and PostgreSQL databases.
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEsoftTech
ICEfaces EE is a JSF/AJAX development framework that allows enterprises to quickly build rich web and mobile applications. It provides a certified code base that is fully tested and compatible with various Java EE technologies. ICEfaces EE offers subscriptions that provide access to the code base, components, support, and expertise to ensure robust and stable application performance. It also allows extending applications to mobile devices. Key benefits include certified and optimized software releases, support for various platforms, and assistance from technical experts.
JavaServer Pages (JSP) allow developers to insert Java code into HTML pages using special tags. A JSP file is converted into a servlet class by the JSP container. The servlet class is then executed to generate an HTML response. The JSP lifecycle includes compilation, initialization, execution, and cleanup similar to a servlet lifecycle. Apache Tomcat is an open source web server that implements the JSP and servlet specifications and includes components like Catalina, Coyote, and Jasper to handle servlet container functions, HTTP connections, and JSP compilation respectively.
This document provides an overview of using JDBC (Java Database Connectivity) to access databases from Java applications. It covers the main JDBC concepts like drivers, connections, statements, result sets, and transactions. It also describes the typical steps for querying and updating databases using JDBC: establishing a connection, creating statements, executing SQL statements, processing result sets, and closing resources. The document includes examples for connecting to Oracle and ODBC databases and using prepared statements. It discusses best practices like using connection pools, tuning transactions, and optimizing SQL queries.
This document provides an overview of using Java Database Connectivity (JDBC) to connect to and interact with relational databases from Java servlets. It describes relational databases and how they organize data into tables. It explains the basic JDBC connection flow of getting a connection, executing SQL statements, and reading results. It also covers key JDBC interfaces like Connection, Statement, and ResultSet. The document provides an example servlet for looking up phone numbers from a database and discusses best practices like reusing connections and using connection pooling.
Java servlets are small Java programs that run on a web server and respond to requests from a client browser. Servlets receive HTTP requests from the browser, generate dynamic content, and return HTTP responses. When the server first loads a servlet, it calls the servlet's init() method to initialize it. The servlet then handles requests via its service() method, building responses using server resources. When the server removes a servlet, it calls the servlet's destroy() method to perform cleanup. Servlets allow dynamic web content and interaction between clients and server resources like databases.
The document provides an outline and instructions for a hands-on lab on Java servlets. The lab covers creating basic servlets, connecting servlets to a database via JDBC, handling HTTP sessions in servlets, invalidating HTTP sessions, and deploying servlets in a WAR file on WebLogic server. The lab instructions include screenshots and steps for setting up servlet classes, making code changes, running servlets, and testing the servlets.
JSP (Java Server Pages) is a technology that allows the creation of dynamic web pages by embedding Java code in HTML pages. This provides a simpler way to add dynamic content to web pages compared to servlets. Some key points:
- JSP pages allow embedding of Java code in HTML pages using scripting elements like <% %> tags. This separates dynamic content from static content.
- JSP pages are compiled to servlets, separating the work of Java programmers and page authors.
- Common JSP elements include scriptlets, expressions, declarations, and directives that control things like page attributes and included files.
- JSP provides built-in support for HTTP sessions and can integrate with Java
This document introduces CakePHP, an open source PHP framework that follows the MVC architecture and convention over configuration approach. It highlights key CakePHP features such as automatic code generation, associations, components, helpers, behaviors, callbacks, and conventions for simplified development. Resources for the CakePHP community and documentation are also provided.
This document provides an introduction to Java Enterprise Edition and servlet technology. It discusses what servlets are, how they are used by servlet containers and application servers to handle client requests and generate dynamic web content, and the relationships between servlets, the servlet API, and servlet containers. The servlet API defines standard interfaces and classes for communication between servlets and containers in a platform-independent way.
This document provides an overview of Java servlets technology, including:
1. What Java servlets are and their main purposes and advantages such as portability, power, and integration with server APIs.
2. Key aspects of servlet architecture like the servlet lifecycle, the HttpServletRequest and HttpServletResponse objects, and how different HTTP methods map to servlet methods.
3. Examples of simple servlets that process parameters, maintain a session counter, and examples of deploying servlets in Eclipse IDE.
The document discusses servlets and how they work, including:
1) Servlets receive requests and generate responses, acting as a container for Java code on the web.
2) Requests and responses work like ordering food - the browser sends a request and the servlet returns a response.
3) Servlets are more efficient, convenient, and portable than other options like CGI since they are written in Java.
The document outlines the chapters of a course on Servlets and JSP including introductions to Java web development, servlets, JSPs, MVC pattern, sharing information, advanced JSP concepts, using JavaBeans, JSP Expression Language, JSP Standard Tag Library, custom JSP tags, accessing databases, using JavaMail, securing applications, downloading files, listeners, and filters. It also describes setting up a basic web project structure and the lifecycle of a Java web application.
Présentation des framework JSF et richfaces issue de la formation J2EE réalisée par le club CFEM ( club futur entrepreneur en multimédia) au sein de l'institut supérieur d'informatique et multimédia de sfax (ISIMS)
This document provides an overview of JavaServer Faces (JSF), including:
- An introduction to JSF and what it is
- A description of the JSF request lifecycle and faces servlet
- An explanation of JSF component models and commonly used tags
- A step-by-step guide for creating a basic "Hello World" JSF application
- Details about JSP architectures (Model 1 and Model 2) that provide context for JSF
The document discusses JavaServer Faces (JSF), an MVC framework for building web interfaces. It provides:
- An overview of JSF concepts like managed beans, expression language, navigation rules, and components.
- Examples of using JSF for static and dynamic navigation between pages, including declaring beans and navigation rules in faces-config.xml.
- How JSF handles form submission and uses managed beans to represent request parameters and output data to results pages.
The Struts framework is a model-view-controller architecture for developing web applications. It separates the application logic, presentation, and user input handling into distinct components. Actions route requests and interact with the business logic layer. Form beans hold user input and tag libraries help populate the view layer. The framework provides internationalization, validation, and reuse capabilities to simplify web application development.
The Struts framework is a model-view-controller architecture for developing web applications. It separates the application logic, presentation, and user input handling into distinct components. Actions route requests and interact with the business logic layer. Form beans hold user input and tag libraries help populate the view layer without scriptlets. The framework provides validation, internationalization, and reuse capabilities out of the box.
This document provides an overview of JavaServer Faces (JSF), a Java framework for building user interfaces for web applications. It discusses that JSF is a standard Java framework created as a Java Community Process to make client-side development browser-independent and include features like state management. It also summarizes that JSF uses a model-view-controller approach with UI components on the server-side, has a defined programming model and tag libraries, and helps with reusability and easier event handling and separation of behavior and presentation. Finally, it provides examples of converting a JSP to a JSF page and using managed beans and navigation in JSF applications.
This document provides an overview of JavaServer Faces (JSF), a Java framework for building user interfaces for web applications. It discusses that JSF is a standard created by Java Community Process to make client-side development browser-independent and include features like state management. It also describes key characteristics of JSF like being server-side, using a component framework, and supporting features like validation and error handling. The document outlines the JSF application lifecycle process and how JSF uses managed backing beans to hold user-entered data. It provides examples of converting a JSP to a JSF page and the JSF navigation model.
Silicon Valley Code Camp - JSF Controller for Reusabilityjcruizjdev
This session provides an overview of the JSF-based controller on ADF 11g - the ADF Controller. The session provides an overview of the extensions implemented by Oracle to the standard JSF controller that make the ADF Controller.
JavaServer Faces (JSF) is a web application framework that uses the model-view-controller (MVC) paradigm. It provides reusable UI components and manages the flow of web applications. MyFaces is an open source implementation of JSF that provides additional pre-built components. The document discusses the JSF architecture, how it works, example code components like input fields and validators, and advantages like reusable components and built-in validation.
Java Server Faces (JSF) is a Java web application framework that uses the model-view-controller (MVC) architectural pattern. JSF has a component-based user interface that separates UI components from business logic. It provides features like data binding, validation, internationalization and AJAX. JSF applications typically consist of JavaBeans components, JSP pages that represent views, and configuration files that define workflows between pages.
The document provides an introduction and overview of ASP.NET MVC, including a comparison to ASP.NET Web Forms. It discusses the model-view-controller pattern, routing, controllers, views and extensibility in ASP.NET MVC. The document also shares resources for learning more about ASP.NET MVC and provides an agenda for covering topics like testing and a real world walkthrough of an ASP.NET MVC application.
- ASP.NET MVC is a framework that enables building web applications using the Model-View-Controller pattern. It provides clear separation of concerns, testability, and fine-grained control over HTML and JavaScript.
- The key components of MVC are models (the data), views (the presentation), and controllers (which handle requests and respond by rendering a view). Controllers retrieve data from models and pass them to views to generate the response.
- ASP.NET MVC supports features like routing, dependency injection, and unit testing to build robust and maintainable web applications. It also maintains backward compatibility with existing ASP.NET technologies.
JavaServer Faces 2.0 - JavaOne India 2011Arun Gupta
The document outlines the key features and enhancements of Java Server Faces 2.0, including improved ease of development through Facelets and composite components, integrated Ajax support, HTTP GET support, validation integration with Bean Validation, and runtime performance improvements through partial state saving and behaviors. It provides code samples to illustrate many of the new capabilities.
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFLuc Bors
Luc Bors presented tips for UI reuse in Oracle Application Development Framework (ADF). He discussed using page templates, declarative components, stylesheets, and task flows to create reusable components. Page templates allow defining common page layouts and styles. Declarative components encapsulate combinations of ADF Faces components. Stylesheets define common styles. Task flows create reusable multi-page flows with input parameters and output events. These reusable assets can be packaged in ADF libraries and shared across applications.
For ages we have known that reinventing the wheel is not a smart thing to do. However, we as software
developers tend to do this all the time. In this session you will learn how to avoid this by taking advantage of the
reuse capabilities of the ADF Framework. You will see how to create Page Templates and use them throughout
your application instead of creating the same complex layout over and over again. Next you will see how to create
a reusable skin to use in your applications. Finally you will see how to extend the ADF Component Library with
your own reusable declarative components and reuse them throughout your application.
JSF 2 life cycle consists of 6 phases: restore view, apply request values, process validations, update model values, invoke application, and render response. Managed beans are JavaBeans that can be accessed from JSF pages and are used to store data. Facelets is the templating language used by JSF 2 that replaced JSP. Navigation between pages can be done through configuration, implicit navigation based on action outcomes, or redirection. New features in JSF 2.2 include faces flows for page flows, HTML5 support, and a file upload component.
Struts is a framework that uses the MVC pattern to separate the presentation, business logic, and user interface components of web applications. It provides tag libraries and configuration files to help developers build dynamic web applications in Java. Struts handles common tasks like internationalization, validation, and error handling. The framework uses Java servlets as controllers, JavaBeans for the business model, and JSP pages as views. Configuration files map actions to Java classes and views, allowing flexibility. Struts helps enforce separation of concerns and centralizes control of web application workflow and interaction between components.
This document provides an overview of ASP.NET MVC including its history, the MVC pattern, controllers, views, routing, and Razor views. It discusses the Model-View-Controller components, controller actions, action results, and action filters. It also covers view helpers, layouts, sections, and Razor syntax features.
This document summarizes the steps taken to migrate a project from Angular.js to Blazor. It began with a proof of concept of Blazor, then migrated the first module. Authentication was migrated to use Azure Active Directory. The main modules were then migrated along with configuration modules and improvements. Challenges included authenticating with AAD in Blazor, addressing performance issues with many tabs and large grids, and replacing modals and notifications. JavaScript dependencies for alerts, prompts, and CSV export were also addressed.
This document summarizes key features of the Spring MVC framework, including:
1. Spring MVC uses a DispatcherServlet as a front controller to handle requests and dispatch them to controllers. Controllers return ModelAndViews to select views.
2. Configuration can be done via XML or annotations. Common view technologies like JSP and Velocity are supported.
3. Features include form binding, validation, internationalization, AJAX support, and error handling. Table sorting and pagination are demonstrated using the DisplayTag library.
JSLink is client functionality in SharePoint 2013 that allows you to format the look, feel and functionality of various objects such as site collection fields, list forms and list views. This session will take the audience from the absolute beginning of using JSLink to examples of using it in real world applications. Level: Beginner
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Zilliz
Join us to introduce Milvus Lite, a vector database that can run on notebooks and laptops, share the same API with Milvus, and integrate with every popular GenAI framework. This webinar is perfect for developers seeking easy-to-use, well-integrated vector databases for their GenAI apps.
Building RAG with self-deployed Milvus vector database and Snowpark Container...Zilliz
This talk will give hands-on advice on building RAG applications with an open-source Milvus database deployed as a docker container. We will also introduce the integration of Milvus with Snowpark Container Services.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
20 Comprehensive Checklist of Designing and Developing a WebsitePixlogix Infotech
Dive into the world of Website Designing and Developing with Pixlogix! Looking to create a stunning online presence? Look no further! Our comprehensive checklist covers everything you need to know to craft a website that stands out. From user-friendly design to seamless functionality, we've got you covered. Don't miss out on this invaluable resource! Check out our checklist now at Pixlogix and start your journey towards a captivating online presence today.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
5. Different views of JSF
Comparing JSF to standard servlet/JSP technology
Comparing JSF to Apache Struts
6. A set of Web-based GUI controls and associated handlers?
– JSF provides many prebuilt HTML-oriented GUI controls, along
with code to handle their events.
A device-independent GUI control framework?
– JSF can be used to generate graphics in formats other than HTML,
using protocols other than HTTP.
A better Struts?
– Like Apache Struts, JSF can be viewed as an MVC framework for
building HTML forms, validating their values, invoking business
logic, and displaying results.
7. • Custom GUI controls
– JSF provides a set of APIs and associated custom tags to create
HTML forms that have complex interfaces
• Event handling
– JSF makes it easy to designate Java code that is invoked when forms
are submitted. The code can respond to particular buttons, changes in
particular values, certain user selections, and so on.
• Managed beans
– In JSP, you can use property="*" with jsp:setProperty to
automatically populate a bean based on request parameters. JSF
extends this capability and adds in several utilities, all of which serve
to greatly simplify request param processing.
• Expression Language
– JSF provides a concise and powerful language for accessing bean
properties and collection elements
8. • Bigger learning curve
– To use MVC with the standard RequestDispatcher, you need to be
comfortable with the standard JSP and servlet APIs. To use MVC with
JSF, you have to be comfortable with the standard JSP and servlet APIs
and a large and elaborate framework that is almost equal in size to the
core system. This drawback is especially significant with smaller
projects, near-term deadlines, and less experienced developers; you
could spend as much time learning JSF as building your actual system.
• Worse documentation
– Compared to the standard servlet and JSP APIs, JSF has fewer online
resources, and many first-time users find the online JSF
documentation confusing and poorly organized. MyFaces is
particularly bad.
10. • When form submitted
– A static page is displayed
• Static result
– No business logic, beans, or Java code of any sort
– The return path is specified in the button itself.
• Main points
– Format of original form
– Use of navigation-rule in faces-config.xml
11. • Input form has following format:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
HTML markup
<h:form>
HTML markup and h:blah tags
</h:form>
HTML markup
</f:view>
• faces-config.xml specifies navigation rules:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC …>
<faces-config>
<navigation-rule>
<from-view-id>/blah.jsp</from-view-id>
<navigation-case>
<from-outcome>some string</from-outcome>
<to-view-id>/WEB-INF/results/something.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
12. The h:form element
– ACTION is automatically self (current URL)
– METHOD is automatically POST
• Elements inside h:form
– Use special tags to represent input elements
• h:inputText corresponds to <INPUT TYPE="TEXT">
• h:inputSecret corresponds to <INPUT TYPE="PASSWORD">
• h:commandButton corresponds to <INPUT TYPE="SUBMIT">
– In later sections, we will see that input elements will be associated
with bean properties
– For static navigation, specify simple string as action of
h:commandButton
• String must match navigation rule from faces-config.xml
18. Filename/URL correspondence
– Actual files are of the form blah.jsp
– URLs used are of the form blah.faces
– You must prevent clients from directly accessing JSP
pages
• Since they would give erroneous results
• Strategies
– You cannot put input-form JSP pages in WEB-INF
• Because URL must correspond directly to file location
– So, use filter in web.xml. But:
• You have to know the extension (.faces)
• Assumes no non-JSF .jsp pages
• This is a major drawback to JSF design
19. FacesRedirectFilter
public class FacesRedirectFilter implements Filter {
private final static String EXTENSION = "faces";
public void doFilter(ServletRequest req,
ServletResponse res,
FilterChain chain)
throws ServletException, IOException {
HttpServletRequest request = (HttpServletRequest)req;
HttpServletResponse response = (HttpServletResponse)res;
String uri = request.getRequestURI();
if (uri.endsWith(".jsp")) {
int length = uri.length();
String newAddress =
uri.substring(0, length-3) + EXTENSION;
response.sendRedirect(newAddress);
} else { // Address ended in "/"
response.sendRedirect("index.faces");
}
}
22. • A form is displayed
– Form uses f:view and h:form
• The form is submitted to itself
– Original URL and ACTION URL are http://…/blah.faces
• A bean is instantiated
– Listed in the managed-bean section of faces-config.xml
• The action controller method is invoked
– Listed in the action attribute of h:commandButton
• The action method returns a condition
– A string that matches from-outcome in the navigation rules in facesconfig.xml
• A results page is displayed
– The page is specified by to-view-id in the navigation rules in facesconfig.xml
23. 1) Create a bean
A) Properties for form data
B) Action controller method
C) Placeholders for results data
2) Create an input form
A) Input fields refer to bean properties
B) Button specifies action controller method that will return condition
3) Edit faces-config.xml
A) Declare the bean
B) Specify navigation rules
4) Create results pages
– Output form data and results data with h:outputText
5) Prevent direct access to JSP pages
– Use a filter that redirects blah.jsp to blah.faces
24. • Collects info to see if user qualifies for health
plan
• When form submitted, one of two possible
results will be displayed
– User is accepted into health plan
– User is rejected from health plan
• Main points
– Specifying an action controller in the form
– Creating an action controller method in the bean
– Using faces-config.xml to
• Declare bean
• Map return conditions to output pages
25. • Specify the controller with #{beanName.methodName}
<h:commandButton
value="Sign Me Up!"
action="#{healthPlanController.signup}"/>
• Controller method returns strings corresponding to conditions
– If null is returned, the form is redisplayed
– Unlike with Struts, the controller need not extend a special class
• Use faces-config.xml to declare the controller as follows
<faces-config>
<managed-bean>
<managed-bean-name>controller name</managed-bean-name>
<managed-bean-class>controller class</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
• Add multiple navigation-rule entries to faces-config.xml
– One for each possible string returned by the controller
– If no string matches, the form is redisplayed
26. (A) Properties for form data
– Postponed until next session
(B) Action controller method
public class HealthPlanController {
public String signup() {
if (Math.random() < 0.2) {
return("accepted");
} else {
return("rejected");
}
}
}
(C) Placeholders for results data
– Postponed until next session
27. • Same general syntax as in previous example
– Except for action of commandButton
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
…
<h:form>
First name: <h:inputText/><BR>
Last name: <h:inputText/><BR>
...
<h:commandButton
value="Sign Me Up!"
action="#{healthPlanController.signup}"/>
</h:form>…
</f:view>
35. • Use filter that captures url-pattern *.jsp
– No changes from previous example
36. • Wildcards in navigation rule
– * for from-view-id matches any starting page
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/WEB-INF/results/success.jsp</to-view-id>
</navigation-case>
</navigation-rule>
• Getting the request and response objects
HttpServletRequest request =
(HttpServletRequest)context.getRequest();
HttpServletResponse response =
(HttpServletResponse)context.getResponse();
• In some environments, you cast results of getRequest and getResponse
to values other than HttpServletRequest and HttpServletResponse
E.g., in a portlet environment, you might cast result to
PortletRequest and PortletResponse
37. • If you have several different addresses in
your app, it is OK to alternate
<managed-bean>
Stuff for bean1
</managed-bean>
<navigation-rule>
Rules for address that uses bean1
</navigation-rule>
<managed-bean>
Stuff for bean2
</managed-bean>
<navigation-rule>
Rules for address that uses bean2
</navigation-rule>
– Of course, it is also OK to put all bean defs at the top,
followed by all navigation rules.
38. • Using beans to represent request
parameters
• Declaring beans in faces-config.xml
• Referring to beans in input forms
• Outputting bean properties
39.
40. 1) Create a bean
A) Properties for form data
B) Action controller method
C) Placeholders for results data
2) Create an input form
A) Input fields refer to bean properties
B) Button specifies action controller method that will return condition
3) Edit faces-config.xml
A) Declare the bean
B) Specify navigation rules
4) Create results pages
– Output form data and results data with h:outputText
5) Prevent direct access to JSP pages
– Use a filter that redirects blah.jsp to blah.faces
41. • When form submitted, three possible results
– Error message re illegal email address
– Error message re illegal password
– Success
• New features
– Action controller obtains request data from within bean
– Output pages access bean properties
• Main points
– Defining a bean with properties for the form data
– Declaring beans in faces-config.xml
– Outputting bean properties
42. (1A) Form data
public class RegistrationBean implements Serializable {
private String email = "user@host";
private String password = "";
public String getEmail() {
return(email);
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return(password);
}
public void setPassword(String password) {
this.password = password;
}
44. (1C) Placeholder for storing results
– Note that action controller method called business
logic and placed the result in this placeholder
private SuggestionBean suggestion;
public SuggestionBean getSuggestion() {
return(suggestion);
}
45. Result returned by business logic
package coreservlets;
import java.io.*;
public class SuggestionBean implements Serializable {
private String email;
private String password;
public SuggestionBean(String email, String password) {
this.email = email;
this.password = password;
}
public String getEmail() {
return(email);
}
public String getPassword() {
return(password);
}
}
54. • Use filter that captures url-pattern *.jsp
– No changes from previous example
55. Important
• Shorthand notation for bean properties.
– To reference the companyName property (i.e., result of the
getCompanyName method) of a scoped variable (i.e. object stored in
request, session, or application scope) or managed bean named
company, you use #{company.companyName}. To reference the
firstName property of the president property of a scoped variable or
managed bean named company, you use
#{company.president.firstName}.
• Simple access to collection elements.
– To reference an element of an array, List, or Map, you use
#{variable[indexOrKey]}. Provided that the index or key is in a form
that is legal for Java variable names, the dot notation for beans is
interchangeable with the bracket notation for collections.
56. Less Important
• Succinct access to request parameters, cookies, and other request data.
– To access the standard types of request data, you can use one of several
predefined implicit objects.
• A small but useful set of simple operators.
– To manipulate objects within EL expressions, you can use any of several
arithmetic, relational, logical, or empty-testing operators.
• Conditional output.
– To choose among output options, you do not have to resort to Java scripting
elements. Instead, you can use #{test ? option1 : option2}.
• Automatic type conversion.
– The expression language removes the need for most typecasts and for much
of the code that parses strings as numbers.
• Empty values instead of error messages.
– In most cases, missing values or
57. To enforce EL-only with no scripting, use scriptinginvalid in web.xml
– Still permits both the JSF EL and the JSP 2.0 EL
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</web-app>
58. import java.util.*;
public class TestBean {
private Date creationTime = new Date();
private String greeting = "Hello";
public Date getCreationTime() {
return(creationTime);
}
public String getGreeting() {
return(greeting);
}
public double getRandomNumber() {
return(Math.random());
}
}
62. public class NameBean {
private String firstName = "Missing first name";
private String lastName = "Missing last name";
public NameBean() {}
public NameBean(String firstName, String lastName) {
setFirstName(firstName);
setLastName(lastName);
}
public String getFirstName() {
return(firstName);
}
public void setFirstName(String newFirstName) {
firstName = newFirstName;
}
...
}
63. public class CompanyBean {
private String companyName;
private String business;
public CompanyBean(String companyName,
String business) {
setCompanyName(companyName);
setBusiness(business);
}
public String getCompanyName() { return(companyName); }
public void setCompanyName(String newCompanyName) {
companyName = newCompanyName;
}
...
}
64. public class EmployeeBean {
private NameBean name;
private CompanyBean company;
public EmployeeBean(NameBean name, CompanyBean company) {
setName(name);
setCompany(company);
}
public EmployeeBean() {
this(new NameBean("Marty", "Hall"),
new CompanyBean("coreservlets.com",
"J2EE Training and Consulting"));
}
public NameBean getName() { return(name); }
public void setName(NameBean newName) {
name = newName;
}
...
}
69. 1. Create a .properties file
• Contains simple keyName=value pairs
• Must be deployed to WEB-INF/classes
• In Eclipse, this means you put it in "src" folder
2. Load file with f:loadBundle
– basename gives base file name
– var gives scoped variable (Map) that will hold results
• Relative to WEB-INF/classes, .properties assumed
• E.g., for WEB-INF/classes/messages.properties
<f:loadBundle basename="messages" var="msgs"/>
• E.g., for WEB-INF/classes/package1/test.properties
<f:loadBundle basename="package1.test" var="msgs"/>
3. Output messages using normal EL
– #{msgs.keyName}
70. 1. Create a .properties file in/under WEB-INF/classes
– Values contain {0}, {1}, {2}, etc.
– E.g., someName=blah {0} blah {1}
– Warning: MyFaces bug prevents single quotes in values
2. Load file with f:loadBundle as before
– basename gives base file name
– var gives scoped variable (Map) that will hold results
3. Output messages using h:outputFormat
– value gives base message
– nested f:param gives substitution values
– E.g.:
<h:outputFormat value="#{msgs.someName}">
<f:param value="value for 0th entry"/>
<f:param value="value for 1st entry"/>
</h:outputFormat>
71. 1. Create multiple similarly named .properties
files
– blah.properties, blah_es.properties,
blah_es_mx.properties
2. Supply locale argument to f:view
<f:view
locale="#{facesContext.externalContext.request.loca
le}">
– Determines locale from browser language settings
– Can also set the Locale based on user input
locale="#{settings.selectedLocale}"