2. Using the Tutorial Examples 3. Getting Started with Web Applications 5. JavaServer Pages Technology Immediate and Deferred Evaluation Syntax Deactivating Expression Evaluation Process of Expression Evaluation JavaBeans Component Design Conventions Creating and Using a JavaBeans Component Setting JavaBeans Component Properties Retrieving JavaBeans Component Properties Including the Tag Library Implementation Transferring Control to Another Web Component Setting Properties for Groups of JSP Pages Deactivating EL Expression Evaluation Further Information about JavaServer Pages Technology 7. JavaServer Pages Standard Tag Library 10. JavaServer Faces Technology 11. Using JavaServer Faces Technology in JSP Pages 12. Developing with JavaServer Faces Technology 13. Creating Custom UI Components 14. Configuring JavaServer Faces Applications 15. Internationalizing and Localizing Web Applications 16. Building Web Services with JAX-WS 17. Binding between XML Schema and Java Classes 19. SOAP with Attachments API for Java 21. Getting Started with Enterprise Beans 23. A Message-Driven Bean Example 24. Introduction to the Java Persistence API 25. Persistence in the Web Tier 26. Persistence in the EJB Tier 27. The Java Persistence Query Language 28. Introduction to Security in the Java EE Platform 29. Securing Java EE Applications 31. The Java Message Service API 32. Java EE Examples Using the JMS API 36. The Coffee Break Application | Creating Dynamic ContentYou create dynamic content by accessing Java programming language object properties. Using Objects within JSP PagesYou can access a variety of objects, including enterprise beans and JavaBeans components,within a JSP page. JSP technology automatically makes some objects available, and youcan also create and access application-specific objects. Using Implicit ObjectsImplicit objects are created by the web container and contain information related to aparticular request, page, session, or application. Many of the objects are defined bythe Java servlet technology underlying JSP technology and are discussed at length inChapter 4, Java Servlet Technology. The sectionImplicit Objects explains how you access implicit objects using the JSPexpression language. Using Application-Specific ObjectsWhen possible, application behavior should be encapsulated in objects so that page designerscan focus on presentation issues. Objects can be created by developers who areproficient in the Java programming language and in accessing databases and other services.The main way to create and use application-specific objects within a JSP pageis to use JSP standard tags (discussed inJavaBeans Components) to create JavaBeans componentsand set their properties, and EL expressions to access their properties. You canalso access JavaBeans components and other objects in scripting elements, which are describedinChapter 9, Scripting in JSP Pages. Using Shared ObjectsThe conditions affecting concurrent access to shared objects (described inControlling Concurrent Access to Shared Resources) apply to objectsaccessed from JSP pages that run as multithreaded servlets. You can use thefollowingpage directive to indicate how a web container should dispatch multiple clientrequests: <%@ page isThreadSafe="true|false" %> When theisThreadSafe attribute is set totrue, the web container canchoose to dispatch multiple concurrent client requests to the JSP page. This isthedefault setting. If usingtrue, you must ensure that you properly synchronize accessto any shared objects defined at the page level. This includes objects createdwithin declarations, JavaBeans components with page scope, and attributes of the page contextobject (seeImplicit Objects). IfisThreadSafe is set tofalse, requests are dispatched one at a timein the order they were received, and access to page-level objects does nothave to be controlled. However, you still must ensure that access is properlysynchronized to attributes of theapplication orsession scope objects and toJavaBeans components with application or session scope. Furthermore, it is not recommended to setisThreadSafe tofalse. The JSP page’s generated servlet will implement thejavax.servlet.SingleThreadModel interface,and because the Servlet 2.4 specification deprecatesSingleThreadModel, the generated servlet willcontain deprecated code. Copyright © 2010, Oracle and/or its affiliates. All rights reserved.Legal Notices |