A JSP page is converted into a servlet at runtime. The servlet handles requests and responses, and incorporates the HTML, scriptlets, expressions, and other elements from the JSP page. The JSP lifecycle involves the container using directives to create an HttpServlet subclass, import statements, declaration statements, and build a _jspService() method that combines all the elements and runs the page. Elements like scriptlets and expressions are executed within the servlet and output is sent to the response.
This document contains notes from a lecture on web technologies. It discusses procedural items like asking some students to speak after class and notifying about assignment grades and deadlines. It also covers technical topics around installing LAMP and Tomcat, using servlets, web application deployment descriptors, context listeners, and ensuring thread safety.
This document discusses JSPs (JavaServer Pages) and how they work. It explains that a JSP is a type of servlet that generates servlet code. It outlines the different elements used in JSPs like scriptlets, directives, and expressions. It also summarizes the JSP lifecycle where directives are looked at first, an HttpServlet subclass is created, and the JSP service method is built, combining all the elements. Finally, it notes that JSPs provide an easier way for designers to work with Java code on web pages compared to only using servlets.
This document discusses JavaBeans and the Expression Language (EL) in Java Server Pages (JSP). It describes how JavaBeans are reusable Java components that follow conventions for properties and methods. The EL allows easier access to JavaBeans properties without scripting code. It provides implicit objects to access attributes, request parameters, cookies and context initialization parameters. The EL supports operators and functions for conditions and evaluations.
Tomcat is a container that handles requests and provides services to web applications. It extends the Apache web server and acts as a simple standalone server for applications using HTML, servlets, and JSPs. Alternative containers include JBoss, which provides additional Java EE features but may be more difficult to install than Tomcat. Containers help concentrate on business logic rather than programming details by handling communication, lifecycles, multithreading, security, and other services for applications.
A JSP page is converted into a servlet at runtime. The servlet handles requests and responses, and incorporates the HTML, scriptlets, expressions, and other elements from the JSP page. The JSP lifecycle involves the container using directives to create an HttpServlet subclass, import statements, declaration statements, and build a _jspService() method that combines all the elements and runs the page. Elements like scriptlets and expressions are executed within the servlet and output is sent to the response.
This document contains notes from a lecture on web technologies. It discusses procedural items like asking some students to speak after class and notifying about assignment grades and deadlines. It also covers technical topics around installing LAMP and Tomcat, using servlets, web application deployment descriptors, context listeners, and ensuring thread safety.
This document discusses JSPs (JavaServer Pages) and how they work. It explains that a JSP is a type of servlet that generates servlet code. It outlines the different elements used in JSPs like scriptlets, directives, and expressions. It also summarizes the JSP lifecycle where directives are looked at first, an HttpServlet subclass is created, and the JSP service method is built, combining all the elements. Finally, it notes that JSPs provide an easier way for designers to work with Java code on web pages compared to only using servlets.
This document discusses JavaBeans and the Expression Language (EL) in Java Server Pages (JSP). It describes how JavaBeans are reusable Java components that follow conventions for properties and methods. The EL allows easier access to JavaBeans properties without scripting code. It provides implicit objects to access attributes, request parameters, cookies and context initialization parameters. The EL supports operators and functions for conditions and evaluations.
Tomcat is a container that handles requests and provides services to web applications. It extends the Apache web server and acts as a simple standalone server for applications using HTML, servlets, and JSPs. Alternative containers include JBoss, which provides additional Java EE features but may be more difficult to install than Tomcat. Containers help concentrate on business logic rather than programming details by handling communication, lifecycles, multithreading, security, and other services for applications.
The document discusses web performance and identifies several factors that can cause delays, including issues with client hardware/software, server hardware/software, and network connectivity. It notes that performance issues cost companies money by hurting the user experience, conversion rates, and other metrics. The document then outlines several laws of web performance and provides tips for optimizing performance on both the server-side and client-side of web applications and websites.
This document discusses security topics related to application programming interfaces (APIs), including authentication, authorization, and protecting data. It covers basic types of authentication like declarative, programmatic, and informative authentication. It also discusses defining roles and resource constraints for authentication and authorization. The document stresses the importance of securing code and concentrating on authentication. It provides examples of container-specific authentication and discusses protecting requested data by using HTTPS.
This document discusses the JSTL (JSP Standard Tag Library) which provides tags for common tasks like looping and flow control. It introduces several core JSTL tags like <c:forEach> for looping, <c:if> for conditional logic, and <c:url> for generating URLs. The document also covers how to define custom tags through a Tag Library Descriptor (TLD) that specifies the tag name, library URI, and other metadata. It questions how custom tags are handled and where TLD files are located.
This document discusses filters in Java web applications. Filters can intercept requests and responses and perform common functions like authentication, logging, image conversion, and localization. Filters are implemented using the Filter, FilterChain, and FilterConfig interfaces. Filters can be applied to servlets and JSP pages and are declared in deployment descriptors to define the order in which they execute. Examples of filters include security checks, response compression, and request tracking. Filters provide modular and reconfigurable functionality in web applications.
This document discusses custom tag development in JSP, including using the <jsp:include> and <c:import> tags, passing parameters to tags, using attribute directives, handling long tag attributes, locating tags, creating a tag handler, and the tag API.
This document discusses where to place different file types when deploying a web application, including static resources, JSP pages, servlet class files, tag files, listener classes, and more. It covers deploying via a WAR file, protecting deployment via configuration, the actual and virtual directory structures, and configuration options for welcome pages, error pages, servlet initialization, and mime types in the web deployment descriptor.
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
We asked LinkedIn members worldwide about their levels of interest in the latest wave of technology: whether they’re using wearables, and whether they intend to buy self-driving cars and VR headsets as they become available. We asked them too about their attitudes to technology and to the growing role of Artificial Intelligence (AI) in the devices that they use. The answers were fascinating – and in many cases, surprising.
This SlideShare explores the full results of this study, including detailed market-by-market breakdowns of intention levels for each technology – and how attitudes change with age, location and seniority level. If you’re marketing a tech brand – or planning to use VR and wearables to reach a professional audience – then these are insights you won’t want to miss.
The document discusses web performance and identifies several factors that can cause delays, including issues with client hardware/software, server hardware/software, and network connectivity. It notes that performance issues cost companies money by hurting the user experience, conversion rates, and other metrics. The document then outlines several laws of web performance and provides tips for optimizing performance on both the server-side and client-side of web applications and websites.
This document discusses security topics related to application programming interfaces (APIs), including authentication, authorization, and protecting data. It covers basic types of authentication like declarative, programmatic, and informative authentication. It also discusses defining roles and resource constraints for authentication and authorization. The document stresses the importance of securing code and concentrating on authentication. It provides examples of container-specific authentication and discusses protecting requested data by using HTTPS.
This document discusses the JSTL (JSP Standard Tag Library) which provides tags for common tasks like looping and flow control. It introduces several core JSTL tags like <c:forEach> for looping, <c:if> for conditional logic, and <c:url> for generating URLs. The document also covers how to define custom tags through a Tag Library Descriptor (TLD) that specifies the tag name, library URI, and other metadata. It questions how custom tags are handled and where TLD files are located.
This document discusses filters in Java web applications. Filters can intercept requests and responses and perform common functions like authentication, logging, image conversion, and localization. Filters are implemented using the Filter, FilterChain, and FilterConfig interfaces. Filters can be applied to servlets and JSP pages and are declared in deployment descriptors to define the order in which they execute. Examples of filters include security checks, response compression, and request tracking. Filters provide modular and reconfigurable functionality in web applications.
This document discusses custom tag development in JSP, including using the <jsp:include> and <c:import> tags, passing parameters to tags, using attribute directives, handling long tag attributes, locating tags, creating a tag handler, and the tag API.
This document discusses where to place different file types when deploying a web application, including static resources, JSP pages, servlet class files, tag files, listener classes, and more. It covers deploying via a WAR file, protecting deployment via configuration, the actual and virtual directory structures, and configuration options for welcome pages, error pages, servlet initialization, and mime types in the web deployment descriptor.
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
We asked LinkedIn members worldwide about their levels of interest in the latest wave of technology: whether they’re using wearables, and whether they intend to buy self-driving cars and VR headsets as they become available. We asked them too about their attitudes to technology and to the growing role of Artificial Intelligence (AI) in the devices that they use. The answers were fascinating – and in many cases, surprising.
This SlideShare explores the full results of this study, including detailed market-by-market breakdowns of intention levels for each technology – and how attitudes change with age, location and seniority level. If you’re marketing a tech brand – or planning to use VR and wearables to reach a professional audience – then these are insights you won’t want to miss.
1. Εξέταση 2ης εργασίας
• Παρακαλώ οι παρακάτω να παραμείνουν την 2η ώρα για να
συζητήσουμε την εργασία τους
546(alkis), 593 (antonis), 917(thodoros), 935, 941,
959(sotiri), 989, 996(alexandros), 1502(evi), 1557
2. 3η εργασία
Μελετήστε το 5ο κεφάλαιο του βιβλίου Head First Servlets & JSP,
Second Edition, και προσπαθήστε τις ερωτήσεις της εξέτασης.
Χρησιμοποιήστε τον σύνδεσμο http://www.datadisk.co.uk/html_docs/
jsp/jsp_mvc_tutorial.htm για να υλοποιήσετε μια web application η
οποία θα μας βοηθάει να επιλέξουμε το είδος του καφέ που
επιθυμούμε.
Καταθέστε την εργασία σας πριν τις 08.00 της Δευτέρας 27
Οκτωβρίου συμπληρώνοντας την παρακάτω φόρμα.
5. Conversational state
• Web servers have no short-term memory. As soon as they close
connection to your session they forget you.
• Most of the time this is what you need
• Sometimes you do need to keep the conversation with the container
alive for awhile.
• Keep client specific state across multiple requests
6. Implement
• Use a stateful session enterprise javabean
• Use a database
• Use an HttpSession
16. Summary for get.Session()
I want a session for THIS client
A session that matches the session ID sent or
A new session
The session is with the client associated with the request