JSP Tag Libraries based Framework for Wireless Application Development. Hitesh Kr. Seth Chief Technology Evangelist SeraNova, Inc hitesh.seth@seranova.com O’Reilly Conference on Enterprise Java, 2001. Agenda. Overview Servlets Java Server Pages JSP Tag Libraries
01 / 57JSP Tag Libraries based Framework for Wireless Application Development
1 / 17
Télécharger la présentation
JSP Tag Libraries based Framework for Wireless Application Development
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Servlets • Java based web server extension mechanism • Based on HTTP request-response Paradigm • Multi threaded, Session Management • Versions • J2EE v1.2 – Servlets 2.2 • J2EE v1.3 - 2.3 (Draft) • Usage Scenarios • Creating dynamic web applications • Finer control than JSP
Features • Extend Web Server Functionality • Similar to CGI-BIN, NSAPI/ISAPI extensions, apache Modules • Portable • Multiple Servlet implementations on various platforms • Rich • Can call any Java API, such as JDBC, EJB, JNDI etc. • High Performance • Loaded into memory once and called • Uses threads for concurrency • Can maintain connection pools
Features • Converts HTTP Form parameters into a Hashtable • Customizable Session Management capabilities • Using cookies and URL rewriting • Application Servers implement session management Mechanisms • Memory, File System, Relational Database; Web farm compatible • Leverage other java capabilities such as localization
JSP • Embedded dynamic Java scriptlets • Similar to ASP and Server Side JavaScript • Implemented as a “Self-Managed” Servlet • “Compiled” into Servlets and kept in Memory • Separates presentation from business logic • Tag Extension mechanism • Versions • J2EE v1.2 – JSP 1.1 • J2EE v1.3 – JSP 1.2 (Draft) • Usage Scenarios • Dynamic/flexible presentation layer
JSP Elements • Static Templates • HTML/XML/WML/... • Standard Directives • Include Directive • Page Directive • Taglib Directive • Scripting Elements • Declaration • Expression • Comments • Standard Actions • forward, get/set Property, include, plugin, useBean, param • Custom Tags • Tag Libraries
Upload HTML <form method="post" action="Upload.jsp" enctype="multipart/form-data"> <input type="file" name="FILE1" SIZE="50"><br/> <input type="submit" value="Upload"> </form> JSP Using Third Party Beans
JSP/Servlet Implementations • Reference Implementation • Apache Tomcat@Jakarata • Third Party Implementations • Allaire JRun Application Server • ATG Dynamo Application Server • BEA Weblogic Application Server • Gemstone/J Application Server • IBM WebSphere Application Server • iPlanet Application Server • Orion Application Server • SilverStream Application Server • etc.
JSP Tag Libraries • Create application/vertical specific tags • Rich • Encapsulation of functionality • Simplified Code • Less presentation code to manage • Easier to author • Ease of Use • Ease of Use within WYSIWYG authoring tools • Portability • Reusability • Less Java “Scriptlets” • Cleaner separation of presentation format & presentation logic
JSP Taglib Examples • Examples • Logging <x:log message=“database #13 connection opened”/> • XSLT Transformation <xslt:transform stylesheet=“Product.xsl”>xml content </xslt:transform> • Iteration <x:Iterate …/>…</x:Iterate> • Send an Email <x:email from="hitesh.seth@seranova.com" to=“hitesh.seth@seranova.com">Message... </x:email> • JSR #000052 • A Standard Tag Library for Java Server Pages
Taglib So far • Implemented • <page> Tag • <link> Tag • <form> Tag • <field> Tag • Common Elements • <p>, <br/>, <b>, simplified <table> • Basic Simple Constructs for creating an complete multi-modal application
Benefits • Similar to HTML tags • Ease of authoring/learning • Use existing XML Compliant HTML tags • <p>, <br/> etc. • Simplicity • Just <page>, <link>, <form>, <field> tags can be used to create full featured applications • Use all JSP features with the application • Session Management • Request/Response handling • Call any Java API
Enhancements • Implement other delivery formats • HDML, i-Mode, etc. • More functionality (more tags/attributes) • Use “body” tags • Code optimization • Use XSLT for “templated” delivery • Provide capability to implement device/network specific functionality
Connexion au compte
Connectez-vous pour publier votre contenu sur SlideServe.