The document outlines JavaServer Pages (JSP) technology which extends Servlet technology to simplify delivery of dynamic web content. It discusses key JSP components like directives, actions, scriptlets and tag libraries. It provides an example JSP page that displays the current date and time using scripting. It also describes standard JSP actions like <jsp:include> and <jsp:forward> that can be used to include or forward to other 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.
This code is not thread-safe because the idNum field is being incremented without synchronization. If this JSP page was accessed concurrently by multiple requests, it could generate non-unique IDs by incrementing idNum multiple times between requests. To make it thread-safe, the idNum field would need to be declared as volatile or access to it would need to be synchronized.
The document discusses different ways to invoke Java code from JSP pages, including JSP expressions, scriptlets, and declarations. It provides examples of each and explains how they correspond to code in the generated servlet class. Expressions output a value, scriptlets can contain multiple statements, and declarations define fields and methods in the servlet class. The document also compares using JSP pages versus servlets for similar tasks and recommends limiting Java code in JSP pages.
The document outlines topics covered in a Servlet and JSP course, including introductions to servlets and JavaServer Pages, how to use MVC pattern, share information and access databases in web applications, and how to secure applications using features like filters and listeners.
The document outlines topics covered in a Servlet and JSP course, including introductions to servlets and JavaServer Pages, how to use MVC pattern, share information between servlets and JSPs, access databases, send email, and secure applications. It also covers advanced JSP concepts, using JavaBeans, JSP Expression Language, JSP Standard Tag Library, custom JSP tags, and working with listeners and filters.
JavaServer Pages (JSP) is a technology that allows developers to embed Java code in HTML pages to create dynamic web content. JSP pages combine HTML code with JSP actions and commands. At runtime, JSP pages are translated into Java servlets that generate the web page content dynamically. This provides better performance than CGI and allows embedding of dynamic elements directly into HTML pages.
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.
This code is not thread-safe because the idNum field is being incremented without synchronization. If this JSP page was accessed concurrently by multiple requests, it could generate non-unique IDs by incrementing idNum multiple times between requests. To make it thread-safe, the idNum field would need to be declared as volatile or access to it would need to be synchronized.
The document discusses different ways to invoke Java code from JSP pages, including JSP expressions, scriptlets, and declarations. It provides examples of each and explains how they correspond to code in the generated servlet class. Expressions output a value, scriptlets can contain multiple statements, and declarations define fields and methods in the servlet class. The document also compares using JSP pages versus servlets for similar tasks and recommends limiting Java code in JSP pages.
The document outlines topics covered in a Servlet and JSP course, including introductions to servlets and JavaServer Pages, how to use MVC pattern, share information and access databases in web applications, and how to secure applications using features like filters and listeners.
The document outlines topics covered in a Servlet and JSP course, including introductions to servlets and JavaServer Pages, how to use MVC pattern, share information between servlets and JSPs, access databases, send email, and secure applications. It also covers advanced JSP concepts, using JavaBeans, JSP Expression Language, JSP Standard Tag Library, custom JSP tags, and working with listeners and filters.
JavaServer Pages (JSP) is a technology that allows developers to embed Java code in HTML pages to create dynamic web content. JSP pages combine HTML code with JSP actions and commands. At runtime, JSP pages are translated into Java servlets that generate the web page content dynamically. This provides better performance than CGI and allows embedding of dynamic elements directly into HTML pages.
In this Java JSP Training session, you will learn JSP. Topics covered in this session are:
• JSP (Java Server Pages Technology)
• JSP vs Servlet
• MVC Architecture
• Scriplet
For more information, visit this link:
https://www.mindsmapped.com/courses/software-development/jsp-and-servlets-designing-web-applications-with-java/
This slide is about basics of java servlet and java server page.
A basic example of JSP using multiple directives.
Further information of setting up and using of Apache Tomcat server.
Java Server Pages (JSP) allow developers to create dynamic web content by mixing static HTML markup with Java code. JSP pages are translated into Java servlets, providing access to full Java functionality. Key elements of JSP include tags for scripting Java code directly in HTML pages, and directives that control page processing. JSP provides a standard way to create dynamic web applications and interfaces with databases using Java.
This document provides an introduction and overview of JSP (JavaServer Pages) technology. Key points include:
- JSP pages allow for mixing HTML and Java code to create dynamic web applications more easily than servlets alone.
- JSP pages are translated into servlets by the web container before execution.
- JSP offers implicit objects, standard actions, tags and directives to simplify coding dynamic content.
- Exception handling and lifecycle management are similar to servlets in JSP.
- Java beans can be used to encapsulate reusable data and logic in JSP applications.
This document provides an overview of Java Server Pages (JSP) technology. It discusses how JSP pages combine HTML/XML markup with Java code to create dynamic web content. Key points include:
- JSP pages are converted into Java servlets by the JSP container/engine to generate HTML responses. This allows accessing Java APIs and databases.
- Common JSP elements like scriptlets, expressions, declarations, comments, and directives allow embedding Java code in JSP pages.
- The JSP lifecycle mirrors the servlet lifecycle with phases like initialization, execution, and destruction.
- Standard Tag Libraries (JSTL) provide commonly used tags to simplify tasks like iteration, conditionals,
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 provides an introduction and overview of keyword search over spatial databases and approximate string matching for spatial queries. It discusses spatial approximate string queries that find objects within a spatial range that have similar descriptions to a query term. It also provides background on technologies like Java Server Pages, Java Script, and communicating with databases from Java.
This document provides an overview of core web application development using servlets and JSPs. It discusses what servlets and JSPs are, their lifecycles, how they interact with clients, and why they are useful for enterprise application development. Servlets are Java programs that handle requests and responses, while JSPs make it easier for designers and developers to work together by separating template data from dynamic content generation code. The document outlines the initialization, execution, and destruction phases of the servlet and JSP lifecycles, and how JSPs are translated into servlets. It also covers request parameters, sessions, JSP elements like directives and scripting tags, implicit objects, and variable scopes in J
In this session you will learn:
The Need for JSP
The JSP Framework
Benefits of JSP
Advantages of JSP Over Competing Technologies
Setting Up Your Environment
Invoking Java Code with JSP Scripting Elements
Uses of JSP Constructs
Design Strategy: Limit Java Code in JSP Pages
Basic Syntax
Types of Scripting Elements
JSP Expressions
JSP/Servlet Correspondence
Predefined Variables
Controlling the Structure of Generated Servlets
Purpose of the page Directive
The import Attribute
The contentType and page encoding Attributes
For more information, visit this link: https://www.mindsmapped.com/courses/software-development/online-java-training-for-beginners/
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.
This document provides an introduction to Java Server Pages (JSP) including its advantages, elements, and lifecycle. JSP uses Java code to dynamically generate web page content while utilizing HTML for presentation. Key elements of a JSP page include static content, directives, expressions, scriptlets, and actions. The JSP lifecycle involves translation, compilation, and execution phases to generate servlets from JSP files and handle requests.
This document provides an introduction to Java Server Pages (JSP) including its advantages, elements, and lifecycle. JSP uses Java code to dynamically generate web page content while utilizing HTML for presentation. Key elements of a JSP page include static content, directives, expressions, scriptlets, and actions. The JSP lifecycle involves translation, compilation, and execution phases to convert JSP pages into servlets and generate the final web response.
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Ayes Chinmay
The document provides information on the topics of Node.js, JSP, and Servlet from a course on Internet and Web Technology. It includes brief introductions and definitions of Node.js, JSP concepts like scripting elements, directives, implicit objects, and the JSP lifecycle. It also discusses using JSP scriptlet, expression, and declaration tags. Examples are given for requesting parameters in JSP and using implicit objects like request.
JSPs are HTML pages with embedded Java code that are compiled into servlets. A JSP lifecycle involves translation, compilation, class loading, initialization, request handling, and destruction. Common scripting tags include scriptlets for Java code, declarations for variables/methods, and expressions for output. Implicit objects provide request, response, and application information. Custom tags can be created to encapsulate reusable functionality.
The document discusses JavaServer Pages (JSP) technology. It provides details about:
- JSP is a popular server-side scripting language that provides dynamic web content using scripting elements and XML tags.
- Key features of JSP include ease of deployment, support for multithreading, reusable components, and cross-platform support.
- JSP pages are preprocessed into Java servlet classes that can be compiled and executed by the web container.
- JSP supports scripting elements like Java code embedded directly in tags, directives to control page behavior, and actions to convert elements to servlet code.
JSP was developed by Sun Microsystems to allow server-side development through HTML files containing Java source code tags. There are 5 main JSP tags: scriptlets for Java code blocks, expressions to output Java expressions in HTML, directives to set page-wide conditions, comments to ignore code, and declarations to define variables and methods. JSP files allow easy creation of dynamic web content through Java integration in an HTML-like format.
The document provides an overview of JavaServer Pages (JSP) technology. It discusses how JSP pages allow mixing static HTML content with server-side Java code to create dynamic web pages. JSP pages are compiled into Java servlets, which generate the HTML responses. The document covers JSP syntax elements like scriptlets, expressions, and directives that allow embedding Java code in JSP pages. It also discusses JSP lifecycle phases like translation, compilation, execution and cleanup. Common JSP actions like include, forward, plugin and working with JavaBeans are also summarized.
This document discusses JSP and JSTL. It begins with an introduction to JSP, explaining that JSP is a server-side technology used to create dynamic web content by inserting Java code into HTML pages. It then covers some advantages of JSP over servlets, features of JSP like ease of coding and database connectivity, and how to run a JSP project in Eclipse. The document next discusses JSTL, the JavaServer Pages Standard Tag Library, which provides commonly used JSP tags. It classifies JSTL tags and provides examples. Finally, it discusses interfacing a Java servlet program with JDBC and MySQL to insert data into a database table.
The document discusses Java Server Pages (JSP). Some key points:
- JSP is a server-side technology that allows creating dynamic web applications using Java code and HTML/XML pages.
- JSP pages can access the full Java API and are compiled into servlets, allowing them to connect to databases and integrate with other Java technologies.
- A JSP page consists of HTML tags, JSP tags, and scriptlets containing Java code. The life cycle of a JSP page involves compilation, initialization, execution, and cleanup similar to servlets.
- JSP offers advantages over plain servlets like easier maintenance and faster development since logic is separated from presentation.
JavaScript, often abbreviated as JS, is a programming language and core techn...MathivananP4
JavaScript, often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. As of 2024, 98.9% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries.
The document announces the 10th International Conference on Pattern Recognition and Machine Intelligence (PReMI'23) to be held in December 2023 in Kolkata, India. The conference aims to provide a platform for presenting research in pattern recognition, machine intelligence, and related fields. Full papers will be published in Springer's LNCS series, and selected papers may be published in special journal issues. Authors are invited to submit papers by April 30, 2023 related to various topics in pattern recognition and machine intelligence.
The document discusses various aspects of computer hardware and software. It begins by listing the main hardware components of a computer like the keyboard, mouse, monitor, and printer. It then discusses the internal components like the CPU, RAM, and different storage areas. The document also covers computer languages from machine language to assembly language to high-level languages. It provides examples of algorithms, flowcharts, and programs in C language. Finally, it discusses key concepts in C programming like data types, operators, functions, and translation of programs.
In this Java JSP Training session, you will learn JSP. Topics covered in this session are:
• JSP (Java Server Pages Technology)
• JSP vs Servlet
• MVC Architecture
• Scriplet
For more information, visit this link:
https://www.mindsmapped.com/courses/software-development/jsp-and-servlets-designing-web-applications-with-java/
This slide is about basics of java servlet and java server page.
A basic example of JSP using multiple directives.
Further information of setting up and using of Apache Tomcat server.
Java Server Pages (JSP) allow developers to create dynamic web content by mixing static HTML markup with Java code. JSP pages are translated into Java servlets, providing access to full Java functionality. Key elements of JSP include tags for scripting Java code directly in HTML pages, and directives that control page processing. JSP provides a standard way to create dynamic web applications and interfaces with databases using Java.
This document provides an introduction and overview of JSP (JavaServer Pages) technology. Key points include:
- JSP pages allow for mixing HTML and Java code to create dynamic web applications more easily than servlets alone.
- JSP pages are translated into servlets by the web container before execution.
- JSP offers implicit objects, standard actions, tags and directives to simplify coding dynamic content.
- Exception handling and lifecycle management are similar to servlets in JSP.
- Java beans can be used to encapsulate reusable data and logic in JSP applications.
This document provides an overview of Java Server Pages (JSP) technology. It discusses how JSP pages combine HTML/XML markup with Java code to create dynamic web content. Key points include:
- JSP pages are converted into Java servlets by the JSP container/engine to generate HTML responses. This allows accessing Java APIs and databases.
- Common JSP elements like scriptlets, expressions, declarations, comments, and directives allow embedding Java code in JSP pages.
- The JSP lifecycle mirrors the servlet lifecycle with phases like initialization, execution, and destruction.
- Standard Tag Libraries (JSTL) provide commonly used tags to simplify tasks like iteration, conditionals,
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 provides an introduction and overview of keyword search over spatial databases and approximate string matching for spatial queries. It discusses spatial approximate string queries that find objects within a spatial range that have similar descriptions to a query term. It also provides background on technologies like Java Server Pages, Java Script, and communicating with databases from Java.
This document provides an overview of core web application development using servlets and JSPs. It discusses what servlets and JSPs are, their lifecycles, how they interact with clients, and why they are useful for enterprise application development. Servlets are Java programs that handle requests and responses, while JSPs make it easier for designers and developers to work together by separating template data from dynamic content generation code. The document outlines the initialization, execution, and destruction phases of the servlet and JSP lifecycles, and how JSPs are translated into servlets. It also covers request parameters, sessions, JSP elements like directives and scripting tags, implicit objects, and variable scopes in J
In this session you will learn:
The Need for JSP
The JSP Framework
Benefits of JSP
Advantages of JSP Over Competing Technologies
Setting Up Your Environment
Invoking Java Code with JSP Scripting Elements
Uses of JSP Constructs
Design Strategy: Limit Java Code in JSP Pages
Basic Syntax
Types of Scripting Elements
JSP Expressions
JSP/Servlet Correspondence
Predefined Variables
Controlling the Structure of Generated Servlets
Purpose of the page Directive
The import Attribute
The contentType and page encoding Attributes
For more information, visit this link: https://www.mindsmapped.com/courses/software-development/online-java-training-for-beginners/
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.
This document provides an introduction to Java Server Pages (JSP) including its advantages, elements, and lifecycle. JSP uses Java code to dynamically generate web page content while utilizing HTML for presentation. Key elements of a JSP page include static content, directives, expressions, scriptlets, and actions. The JSP lifecycle involves translation, compilation, and execution phases to generate servlets from JSP files and handle requests.
This document provides an introduction to Java Server Pages (JSP) including its advantages, elements, and lifecycle. JSP uses Java code to dynamically generate web page content while utilizing HTML for presentation. Key elements of a JSP page include static content, directives, expressions, scriptlets, and actions. The JSP lifecycle involves translation, compilation, and execution phases to convert JSP pages into servlets and generate the final web response.
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Ayes Chinmay
The document provides information on the topics of Node.js, JSP, and Servlet from a course on Internet and Web Technology. It includes brief introductions and definitions of Node.js, JSP concepts like scripting elements, directives, implicit objects, and the JSP lifecycle. It also discusses using JSP scriptlet, expression, and declaration tags. Examples are given for requesting parameters in JSP and using implicit objects like request.
JSPs are HTML pages with embedded Java code that are compiled into servlets. A JSP lifecycle involves translation, compilation, class loading, initialization, request handling, and destruction. Common scripting tags include scriptlets for Java code, declarations for variables/methods, and expressions for output. Implicit objects provide request, response, and application information. Custom tags can be created to encapsulate reusable functionality.
The document discusses JavaServer Pages (JSP) technology. It provides details about:
- JSP is a popular server-side scripting language that provides dynamic web content using scripting elements and XML tags.
- Key features of JSP include ease of deployment, support for multithreading, reusable components, and cross-platform support.
- JSP pages are preprocessed into Java servlet classes that can be compiled and executed by the web container.
- JSP supports scripting elements like Java code embedded directly in tags, directives to control page behavior, and actions to convert elements to servlet code.
JSP was developed by Sun Microsystems to allow server-side development through HTML files containing Java source code tags. There are 5 main JSP tags: scriptlets for Java code blocks, expressions to output Java expressions in HTML, directives to set page-wide conditions, comments to ignore code, and declarations to define variables and methods. JSP files allow easy creation of dynamic web content through Java integration in an HTML-like format.
The document provides an overview of JavaServer Pages (JSP) technology. It discusses how JSP pages allow mixing static HTML content with server-side Java code to create dynamic web pages. JSP pages are compiled into Java servlets, which generate the HTML responses. The document covers JSP syntax elements like scriptlets, expressions, and directives that allow embedding Java code in JSP pages. It also discusses JSP lifecycle phases like translation, compilation, execution and cleanup. Common JSP actions like include, forward, plugin and working with JavaBeans are also summarized.
This document discusses JSP and JSTL. It begins with an introduction to JSP, explaining that JSP is a server-side technology used to create dynamic web content by inserting Java code into HTML pages. It then covers some advantages of JSP over servlets, features of JSP like ease of coding and database connectivity, and how to run a JSP project in Eclipse. The document next discusses JSTL, the JavaServer Pages Standard Tag Library, which provides commonly used JSP tags. It classifies JSTL tags and provides examples. Finally, it discusses interfacing a Java servlet program with JDBC and MySQL to insert data into a database table.
The document discusses Java Server Pages (JSP). Some key points:
- JSP is a server-side technology that allows creating dynamic web applications using Java code and HTML/XML pages.
- JSP pages can access the full Java API and are compiled into servlets, allowing them to connect to databases and integrate with other Java technologies.
- A JSP page consists of HTML tags, JSP tags, and scriptlets containing Java code. The life cycle of a JSP page involves compilation, initialization, execution, and cleanup similar to servlets.
- JSP offers advantages over plain servlets like easier maintenance and faster development since logic is separated from presentation.
JavaScript, often abbreviated as JS, is a programming language and core techn...MathivananP4
JavaScript, often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. As of 2024, 98.9% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries.
The document announces the 10th International Conference on Pattern Recognition and Machine Intelligence (PReMI'23) to be held in December 2023 in Kolkata, India. The conference aims to provide a platform for presenting research in pattern recognition, machine intelligence, and related fields. Full papers will be published in Springer's LNCS series, and selected papers may be published in special journal issues. Authors are invited to submit papers by April 30, 2023 related to various topics in pattern recognition and machine intelligence.
The document discusses various aspects of computer hardware and software. It begins by listing the main hardware components of a computer like the keyboard, mouse, monitor, and printer. It then discusses the internal components like the CPU, RAM, and different storage areas. The document also covers computer languages from machine language to assembly language to high-level languages. It provides examples of algorithms, flowcharts, and programs in C language. Finally, it discusses key concepts in C programming like data types, operators, functions, and translation of programs.
Enhancing Information Retrieval by Personalization Techniquesveningstonk
This document outlines the research modules proposed for a PhD thesis focused on enhancing information retrieval through personalization techniques. The research will include four modules: 1) enhancing retrieval using term association graph representation, 2) integrating document and user topic models for personalization, 3) using genetic algorithms for document re-ranking, and 4) employing ant colony optimization for query reformulation. Module 1 will represent documents as a term graph and use the graph to re-rank documents based on term associations. The methodology for Module 1 includes preprocessing, frequent itemset mining to construct the term graph, and approaches for ranking documents based on semantic associations in the graph.
Personalized Information Retrieval system using Computational Intelligence Te...veningstonk
The document presents research on developing a personalized information retrieval system using computational intelligence techniques. It discusses four proposed models: 1) a term association graph model for document re-ranking, 2) a topic model for document re-ranking, 3) a genetic intelligence model for document re-ranking, and 4) a swarm intelligence model for search query reformulation. The objectives are to improve retrieval effectiveness using term graphs and enhance personalized ranking using user topic modeling. Computational techniques like genetic algorithms and ant colony optimization will be used to re-rank documents and reformulate queries.
Information Retrieval AICTE FDP at GCT Coimbatoreveningstonk
The document discusses information retrieval (IR) techniques for private and public data. It provides an overview of key concepts in web-based IR including technologies, models, architecture, and challenges. It also introduces the concept of private information retrieval (PIR) which aims to allow a user to query a database while hiding which item they are accessing, in order to protect user privacy. The document outlines a potential approach for PIR using linear algebra operations on the database to retrieve the desired item without revealing which item was queried. Overall the document provides background on IR techniques for both public and private data, with a focus on the goal of PIR to allow private querying of databases.
The document proposes a method to re-rank images returned from an image search engine by incorporating visual similarity. It extracts interest points from images to determine visual content. Images are then re-ranked based on visual similarity, as determined by comparing interest points. A graph model is generated to represent visual similarities between images as links. PageRank is then applied to the graph to assign priority scores to images, with more visually similar images being ranked higher. The goal is to return images that are both relevant and visually diverse.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on automated letter generation for Bonterra Impact Management using Google Workspace or Microsoft 365.
Interested in deploying letter generation automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Tatiana Kojar
Skybuffer AI, built on the robust SAP Business Technology Platform (SAP BTP), is the latest and most advanced version of our AI development, reaffirming our commitment to delivering top-tier AI solutions. Skybuffer AI harnesses all the innovative capabilities of the SAP BTP in the AI domain, from Conversational AI to cutting-edge Generative AI and Retrieval-Augmented Generation (RAG). It also helps SAP customers safeguard their investments into SAP Conversational AI and ensure a seamless, one-click transition to SAP Business AI.
With Skybuffer AI, various AI models can be integrated into a single communication channel such as Microsoft Teams. This integration empowers business users with insights drawn from SAP backend systems, enterprise documents, and the expansive knowledge of Generative AI. And the best part of it is that it is all managed through our intuitive no-code Action Server interface, requiring no extensive coding knowledge and making the advanced AI accessible to more users.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
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
1. 2003 Prentice Hall, Inc. All rights reserved.
1
Chapter 25: JavaServer Pages
Outline
25.1 Introduction
25.2 JavaServer Pages Overview
25.3 First JavaServer Page Example
25.4 Implicit Objects
25.5 Scripting
25.5.1 Scripting Components
25.5.2 Scripting Example
25.6 Standard Actions
25.6.1 <jsp:include> Action
25.6.2 <jsp:forward> Action
25.6.3 <jsp:useBean> Action
2. 2003 Prentice Hall, Inc. All rights reserved.
2
25.1 Introduction
• JavaServer Pages
– Extension of Servlet technology
• Simplify delivery of dynamic Web content
• Reuse existing Java components
– Without programming Java
– Use scripts embedded in HTML files
• Classes and interfaces specific to JSP
– Package javax.servlet.jsp
– Package javax.servlet.jsp.tagext
3. 2003 Prentice Hall, Inc. All rights reserved.
3
25.2 JavaServer Pages Overview
• Key components
– Directives
– Actions
– Scriptlets
– Tag libraries
4. 2003 Prentice Hall, Inc. All rights reserved.
4
25.2 JavaServer Pages Overview (cont.)
• Directive
– Message to JSP container
• i.e., program that compiles/executes JSPs
– Enable programmers to specify
• Page settings
• Content to include from other resources
5. 2003 Prentice Hall, Inc. All rights reserved.
5
25.2 JavaServer Pages Overview (cont.)
• Action
– Predefined JSP tags that encapsulate functionality
– Can be embedded in JSP
– Often performed based on information from client request
– Can be used to create Java objects for use in scriptlets
6. 2003 Prentice Hall, Inc. All rights reserved.
6
25.2 JavaServer Pages Overview (cont.)
• Scriptlet
– Also called “Scripting Elements”
– Enable programmers to insert Java code in JSPs
– Performs request processing
• Interacts with page elements and other components to
implement dynamic pages
7. 2003 Prentice Hall, Inc. All rights reserved.
7
25.2 JavaServer Pages Overview (cont.)
• Custom Tag Library
– JSP’s tag extension mechanism
– Enables programmers to define new tags
• Tags encapsulate complex functionality
– Tags can manipulate JSP content
8. 2003 Prentice Hall, Inc. All rights reserved.
8
25.2 JavaServer Pages Overview (cont.)
• JSPs
– Look like standard HTML or XHTML
• Normally include HTML or XHTML markup
– Known as fixed-template data
– Used when content is mostly fixed-template data
• Small amounts of content generated dynamically
• Servlets
– Used when small amount of content is fixed-template data
• Most content generated dynamically
9. 2003 Prentice Hall, Inc. All rights reserved.
9
25.2 JavaServer Pages Overview (cont.)
• Some servlets do not produce content
– Invoke other servlets and JSPs
• JSPs execute as part of a Web server
– JSP container
• JSP first request
– JSP container translates a JSP into a servlet
• Handle the current and future requests
• Code that represents the JSP
– Placed in servlet’s _jspService method
10. 2003 Prentice Hall, Inc. All rights reserved.
10
25.2 JavaServer Pages Overview (cont.)
• JSP errors
– Translation-time errors
• Occur when JSPs are translated into servlets
– Request-time errors
• Occur during request processing
• Methods jspInit and jspDestroy
– Container invokes when initializing and terminating a JSP
• Methods are defined in JSP declarations
– Part of the JSP scripting mechanism
11. 2003 Prentice Hall, Inc. All rights reserved.
11
25.3 A First JavaServer Page Example
• Simple JSP example (Fig. 25.1)
– Demonstrates
• Fixed-template data (XHTML markup)
• Creating a Java object (java.util.Date)
• Automatic conversion of JSP expression to a String
• meta element to refresh Web page at specified interval
– First invocation of clock.jsp
• Some delay while:
– JSP container translates the JSP into a servlet
– JSP container compiles the servlet
– JSP container executes the servlet
• Subsequent invocations should not experience the same delay
12. 2003 Prentice Hall, Inc. All rights reserved.
12
25.3 A First JavaServer Page Example
• Simple JSP example (Fig. 25.1)
<%= new java.util.Date() %>
• JSP expression, String representation inserted into response to
client
13. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
13
clock.jsp
Line 10
Meta element
refershes the Web
page every 60
seconds.
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 25.1: clock.jsp -->
6
7 <html xmlns = "http://www.w3.org/1999/xhtml">
8
9 <head>
10 <meta http-equiv = "refresh" content = "60" />
11
12 <title>A Simple JSP Example</title>
13
14 <style type = "text/css">
15 .big { font-family: helvetica, arial, sans-serif;
16 font-weight: bold;
17 font-size: 2em; }
18 </style>
19 </head>
20
21 <body>
22 <p class = "big">Simple JSP Example</p>
23
meta element refreshes the
Web page every 60 seconds
14. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
14
clock.jsp
Line 30
Creates Date object
24 <table style = "border: 6px outset;">
25 <tr>
26 <td style = "background-color: black;">
27 <p class = "big" style = "color: cyan;">
28
29 <!-- JSP expression to insert date/time -->
30 <%= new java.util.Date() %>
31
32 </p>
33 </td>
34 </tr>
35 </table>
36 </body>
37
38 </html>
Creates Date object that is
converted to a String
implicitly and displayed in
paragraph (p) element
15. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
15
Clock.jsp
16. 2003 Prentice Hall, Inc. All rights reserved.
16
25.4 Implicit Objects
• Implicit Objects
– Provide access to many servlet capabilities within a JSP
– Four scopes
• Application scope
– Objects owned by the container application
– Any servlet or JSP can manipulate these objects
• Page scope
– Objects that exist only in page in which they are defined
– Each page has its own instance of these objects
• Request scope
– Objects exist for duration of client request
– Objects go out of scope after response sent to client
• Session scope
– Objects exist for duration of client’s browsing session
– Objects go out of scope when client terminates session or when
session timeout occurs
17. 2003 Prentice Hall, Inc. All rights reserved.
17
Implicit object Description
Application Scope
application This javax.servlet.ServletContext object represents the container in which the JSP
executes.
Page Scope
config This javax.servlet.ServletConfig object represents the JSP configuration options.
As with servlets, configuration options can be specified in a Web application descriptor.
exception This java.lang.Throwable object represents the exception that is passed to the JSP error
page. This object is available only in a JSP error page.
out This javax.servlet.jsp.JspWriter object writes text as part of the response to a
request. This object is used implicitly with JSP expressions and actions that insert string content
in a response.
page This java.lang.Object object represents the this reference for the current JSP instance.
pageContext This javax.servlet.jsp.PageContext object hides the implementation details of the
underlying servlet and JSP container and provides JSP programmers with access to the implicit
objects discussed in this table.
response This object represents the response to the client and is normally an instance of a class that
implements HttpServletResponse (package javax.servlet.http). If a protocol
other than HTTP is used, this object is an instance of a class that implements
javax.servlet.ServletResponse.
Request Scope
request This object represents the client request. The object normally is an instance of a class that
implements HttpServletRequest (package javax.servlet.http). If a protocol other
than HTTP is used, this object is an instance of a subclass of javax.servlet.Servlet-
Request.
Session Scope
session This javax.servlet.http.HttpSession object represents the client session
information if such a session has been created. This object is available only in pages that
participate in a session.
Fig. 25.2 JSP implicit objects.
18. 2003 Prentice Hall, Inc. All rights reserved.
18
25.5 Scripting
• Scripting
– Dynamically generated content
– Insert Java code and logic in JSP using scripting
19. 2003 Prentice Hall, Inc. All rights reserved.
19
25.5.1 Scripting Components
• JSP scripting components
– Scriptlets (blocks of code containing Java statements
delimited by <% and %>)
– Comments
• JSP comments (delimited by <%-- and --%>)
• XHTML comments (delimited by <!-- and -->)
• Java’s comments (delimited by // and /* and */)
– Expressions (delimited by <%= and %>) (evaluated when
client requests the JSP, String version sent in response)
– Declarations (delimited by <%! and %>) (define variables
for use in JSP
• <%! int counter = 0; %>
20. 2003 Prentice Hall, Inc. All rights reserved.
20
25.5.2 Scripting Example
• Demonstrate basic scripting capabilities
– Responding to get requests
21. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
21
welcome.jsp
Lines 17-23
Line 19
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 25.4: welcome.jsp -->
6 <!-- JSP that processes a "get" request containing data. -->
7
8 <html xmlns = "http://www.w3.org/1999/xhtml">
9
10 <!-- head section of document -->
11 <head>
12 <title>Processing "get" requests with data</title>
13 </head>
14
15 <!-- body section of document -->
16 <body>
17 <% // begin scriptlet
18
19 String name = request.getParameter( "firstName" );
20
21 if ( name != null ) {
22
23 %> <%-- end scriptlet to insert fixed template data --%>
24
Scriptlets used to
insert Java code
Use request implicit
object to get parameter
22. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
22
welcome.jsp
Line 26
Lines 30-35 and 45-49
25 <h1>
26 Hello <%= name %>, <br />
27 Welcome to JavaServer Pages!
28 </h1>
29
30 <% // continue scriptlet
31
32 } // end if
33 else {
34
35 %> <%-- end scriptlet to insert fixed template data --%>
36
37 <form action = "welcome.jsp" method = "get">
38 <p>Type your first name and press Submit</p>
39
40 <p><input type = "text" name = "firstName" />
41 <input type = "submit" value = "Submit" />
42 </p>
43 </form>
44
45 <% // continue scriptlet
46
47 } // end else
48
49 %> <%-- end scriptlet --%>
50 </body>
51
52 </html> <!-- end XHTML document -->
JSP expression
Scriptlets used to
insert Java code
23. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
23
welcome.jsp
24. 2003 Prentice Hall, Inc. All rights reserved.
24
25.6 Standard Actions
• JSP standard actions (most common tasks)
– Provide access to common tasks performed in a JSP
• Including content from other resources
• Forwarding requests to other resources
• Interacting with JavaBeans
– JSP containers process actions at request time
– Delimited by <jsp:action> and </jsp:action>
25. 2003 Prentice Hall, Inc. All rights reserved.
25
25.6 Standard Actions
Action Description
<jsp:include> Dynamically includes another resource in a JSP. As the JSP executes, the
referenced resource is included and processed.
<jsp:forward> Forwards request processing to another JSP, servlet or static page. This
action terminates the current JSP’s execution.
<jsp:plugin> Allows a plug-in component to be added to a page in the form of a
browser-specific object or embed HTML element. In the case of a
Java applet, this action enables the downloading and installation of the
Java Plug-in, if it is not already installed on the client computer.
<jsp:param> Used with the include, forward and plugin actions to specify
additional name/value pairs of information for use by these actions.
JavaBean Manipulation
<jsp:useBean> Specifies that the JSP uses a JavaBean instance. This action specifies the
scope of the bean and assigns it an ID that scripting components can use
to manipulate the bean.
<jsp:setProperty> Sets a property in the specified JavaBean instance. A special feature of
this action is automatic matching of request parameters to bean properties
of the same name.
<jsp:getProperty> Gets a property in the specified JavaBean instance and converts the result
to a string for output in the response.
Fig. 25.5 JSP standard actions.
26. 2003 Prentice Hall, Inc. All rights reserved.
26
25.6.1 <jsp:include> Action
• <jsp:include> action
– Enables dynamic content to be included in a JSP at request
time
– More flexible than include directive (included at
translation time)
• Requires more overhead when page contents change frequently
• <jsp:include page = "toc.html" flush = "true" />
– page is the resource to include
– flush must be true to say to flush buffer after including
27. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
27
banner.html
1 <!-- Fig. 25.7: banner.html -->
2 <!-- banner to include in another document -->
3 <div style = "width: 580px">
4 <p>
5 Java(TM), C, C++, Visual Basic(R),
6 Object Technology, and <br /> Internet and
7 World Wide Web Programming Training <br />
8 On-Site Seminars Delivered Worldwide
9 </p>
10
11 <p>
12 <a href = "mailto:deitel@deitel.com">deitel@deitel.com</a>
13 <br />978.461.5880<br />12 Clock Tower Place, Suite 200,
14 Maynard, MA 01754
15 </p>
16 </div>
28. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
28
toc.html
1 <!-- Fig. 25.8: toc.html -->
2 <!-- contents to include in another document -->
3
4 <p><a href = "http://www.deitel.com/books/index.html">
5 Publications/BookStore
6 </a></p>
7
8 <p><a href = "http://www.deitel.com/whatsnew.html">
9 What's New
10 </a></p>
11
12 <p><a href = "http://www.deitel.com/books/downloads.html">
13 Downloads/Resources
14 </a></p>
15
16 <p><a href = "http://www.deitel.com/faq/index.html">
17 FAQ (Frequently Asked Questions)
18 </a></p>
19
20 <p><a href = "http://www.deitel.com/intro.html">
21 Who we are
22 </a></p>
23
29. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
29
toc.html
24 <p><a href = "http://www.deitel.com/index.html">
25 Home Page
26 </a></p>
27
28 <p>Send questions or comments about this site to
29 <a href = "mailto:deitel@deitel.com">
30 deitel@deitel.com
31 </a><br />
32 Copyright 1995-2003 by Deitel & Associates, Inc.
33 All Rights Reserved.
34 </p>
30. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
30
clock2.jsp
Lines 14-20
1 <!-- Fig. 25.9: clock2.jsp -->
2 <!-- date and time to include in another document -->
3
4 <table>
5 <tr>
6 <td style = "background-color: black;">
7 <p class = "big" style = "color: cyan; font-size: 3em;
8 font-weight: bold;">
9
10 <%-- script to determine client local and --%>
11 <%-- format date accordingly --%>
12 <%
13 // get client locale
14 java.util.Locale locale = request.getLocale();
15
16 // get DateFormat for client's Locale
17 java.text.DateFormat dateFormat =
18 java.text.DateFormat.getDateTimeInstance(
19 java.text.DateFormat.LONG,
20 java.text.DateFormat.LONG, locale );
21
22 %> <%-- end script --%>
23
24 <%-- output date --%>
25 <%= dateFormat.format( new java.util.Date() ) %>
26 </p>
27 </td>
28 </tr>
29 </table>
Use Locale to
format Date
with specified
DateFormat
32. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
32
include.jsp
Lines 38-39
Use JSP action to
include
banner.html.
Line 48
Use JSP action to
include toc.html.
26 <body>
27 <table>
28 <tr>
29 <td style = "width: 160px; text-align: center">
30 <img src = "images/logotiny.png"
31 width = "140" height = "93"
32 alt = "Deitel & Associates, Inc. Logo" />
33 </td>
34
35 <td>
36
37 <%-- include banner.html in this JSP --%>
38 <jsp:include page = "banner.html"
39 flush = "true" />
40
41 </td>
42 </tr>
43
44 <tr>
45 <td style = "width: 160px">
46
47 <%-- include toc.html in this JSP --%>
48 <jsp:include page = "toc.html" flush = "true" />
49
50 </td>
51
Use JSP action to
include banner.html
Use JSP action to
include toc.html
33. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
33
include.jsp
Lines 55-56
Use JSP action to
include
clock2.jsp.
52 <td style = "vertical-align: top">
53
54 <%-- include clock2.jsp in this JSP --%>
55 <jsp:include page = "clock2.jsp"
56 flush = "true" />
57
58 </td>
59 </tr>
60 </table>
61 </body>
62 </html>
Use JSP action to
include clock2.jsp
34. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
34
include.jsp
35. 2003 Prentice Hall, Inc. All rights reserved.
35
25.6.2 <jsp:forward> Action
• <jsp:forward> action
– Enables JSP to forward request to different resources
• Can forward requests only to resources in same context
• Original JSP terminates
• <jsp:param> action
– Specifies name/value pairs of information
• Name/Value pairs are passed to other actions
36. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
36
forward1.jsp
Lines 22-25
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 25.11: forward1.jsp -->
6
7 <html xmlns = "http://www.w3.org/1999/xhtml">
8
9 <head>
10 <title>Forward request to another JSP</title>
11 </head>
12
13 <body>
14 <% // begin scriptlet
15
16 String name = request.getParameter( "firstName" );
17
18 if ( name != null ) {
19
20 %> <%-- end scriptlet to insert fixed template data --%>
21
22 <jsp:forward page = "forward2.jsp">
23 <jsp:param name = "date"
24 value = "<%= new java.util.Date() %>" />
25 </jsp:forward>
26
Forward request to
forward2.jsp
37. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
37
forward1.jsp
27 <% // continue scriptlet
28
29 } // end if
30 else {
31
32 %> <%-- end scriptlet to insert fixed template data --%>
33
34 <form action = "forward1.jsp" method = "get">
35 <p>Type your first name and press Submit</p>
36
37 <p><input type = "text" name = "firstName" />
38 <input type = "submit" value = "Submit" />
39 </p>
40 </form>
41
42 <% // continue scriptlet
43
44 } // end else
45
46 %> <%-- end scriptlet --%>
47 </body>
48
49 </html> <!-- end XHTML document -->
38. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
38
forward2.jsp
Lines 23-24
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- forward2.jsp -->
6
7 <html xmlns = "http://www.w3.org/1999/xhtml"v
8
9 <head>
10 <title>Processing a forwarded request</title>
11
12 <style type = "text/css">
13 .big {
14 font-family: tahoma, helvetica, arial, sans-serif;
15 font-weight: bold;
16 font-size: 2em;
17 }
18 </style>
19 </head>
20
21 <body>
22 <p class = "big">
23 Hello <%= request.getParameter( "firstName" ) %>, <br />
24 Your request was received <br /> and forwarded at
25 </p>
26
Receive request from
forward1.jsp, then
get firstName
parameter from request
39. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
39
forward2.jsp
Line 31
27 <table style = "border: 6px outset;">
28 <tr>
29 <td style = "background-color: black;">
30 <p class = "big" style = "color: cyan;">
31 <%= request.getParameter( "date" ) %>
32 </p>
33 </td>
34 </tr>
35 </table>
36 </body>
37
38 </html>
Get date parameter
from request
40. 2003 Prentice Hall, Inc. All rights reserved.
40
25.6.3 <jsp:useBean> Action
• <jsp:useBean> action
– Enables JSP to manipulate Java object
• Creates Java object or locates an existing object for use in JSP
– <jsp:getProperty name = "rotator"
property = "link“ /> same as
– <%= rotator.getLink() %>
42. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
42
Rotator.java
Lines 25-28
Lines 31-34
Lines 38-41
24 // returns image file name for current ad
25 public String getImage()
26 {
27 return images[ selectedIndex ];
28 }
29
30 // returns the URL for ad's corresponding Web site
31 public String getLink()
32 {
33 return links[ selectedIndex ];
34 }
35
36 // update selectedIndex so next calls to getImage and
37 // getLink return a different advertisement
38 public void nextAd()
39 {
40 selectedIndex = ( selectedIndex + 1 ) % images.length;
41 }
42 }
Update Rotator so
subsequent calls to
getImage and getLink
return information for
different advertisements
Return image file name
for book cover image
Return hyperlink to
book at Amazon.com
43. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
43
adrotator.jsp
Lines 7-8
Line 22
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 25.15: adrotator.jsp -->
6
7 <jsp:useBean id = "rotator" scope = "application"
8 class = "com.deitel.jhtp5.jsp.Rotator" />
9
10 <html xmlns = "http://www.w3.org/1999/xhtml">
11
12 <head>
13 <title>AdRotator Example</title>
14
15 <style type = "text/css">
16 .big { font-family: helvetica, arial, sans-serif;
17 font-weight: bold;
18 font-size: 2em }
19 </style>
20
21 <%-- update advertisement --%>
22 <% rotator.nextAd(); %>
23 </head>
24
Use jsp:useBean
action to obtain reference
to Rotator object
Invoke Rotator’s
nextAd method
44. 2003 Prentice Hall, Inc.
All rights reserved.
Outline
44
adrotator.jsp
Lines 29-33
25 <body>
26 <p class = "big">AdRotator Example</p>
27
28 <p>
29 <a href = "<jsp:getProperty name = "rotator"
30 property = "link" />">
31
32 <img src = "<jsp:getProperty name = "rotator"
33 property = "image" />" alt = "advertisement" />
34 </a>
35 </p>
36 </body>
37 </html>
Define hyperlink to
Amazon.com site