07-Basic-Custom-Tags

07-Basic-Custom-Tags - 2010 Marty Hall Creating Custom JSP...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
© 2010 Marty Hall Creating Custom JSP Tag Creating Custom JSP Tag Libraries: The Basics Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/Course-Materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6. Developed and taught by well-known author and developer. At public venues or onsite at your location. 2 © 2010 Marty Hall For live Java EE training, please see training courses at http://courses.coreservlets.com/. Servlets, JSP, Struts, JSF 1. x , JSF 2.0, Ajax (with jQuery, Dojo, Prototype, Ext-JS, Google Closure, etc.), GWT 2.0 (with GXT), Java 5, Java 6, SOAP-based and RESTful Web Services, Spring, Hibernate/JPA, and customized combinations of topics. Taught by the author of Core Servlets and JSP , More Servlets and JSP , and this tutorial. Available at public venues, or customized versions can be held on-site at your organization. Contact hall@coreservlets.com for details.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Agenda What are tags? Why use them? Java-based tags Components of a tag library Basic tags Tags that use attributes Tags that use body conten Tags that use body content Tags that optionally use body content JSP-based tags (tag files JSP based tags (tag files) Components of a tag library Basic tags Tags that use attributes Tags that use body content 4 © 2010 Marty Hall Intro Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6. Developed and taught by well-known author and developer. At public venues or onsite at your location. 5
Background image of page 2
Uses of JSP Constructs Scripting elements calling servlet code directly Scripting elements calling servlet Simple Application code indirectly (by means of utility classes) Beans Servlet/JSP combo (MVC) MVC with JSP expression language Custom tags Complex Application MVC with beans, custom tags, and a framework like JSF 2.0 6 Tag Examples Blah, blah, blah. <mytags:showDate/> Blah blah blah <mytags:showDate format "short"/> Blah, blah, blah. <mytags:showDate format="short"/> Blah, blah, blah. <mytags:emphasize color="red" blink="true" size="100"> This is a very important message </mytags:emphasize> Blah, blah, blah. <mytags:translate language="spanish"> Hello World </mytags:translate> 7
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
© 2010 Marty Hall Java-Based Tags Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6. Developed and taught by well-known author and developer. At public venues or onsite at your location. 8 Components That Make Up a Tag Library The Tag Handler Class Java code that says what to output Must implement javax.servlet.jsp.tagext.SimpleTag Usually extends SimpleTagSuppor Usually extends SimpleTagSupport Goes in same directories as servlet class files and beans The Tag Library Descriptor File XML file describing tag name, attributes, and implementing tag handler class
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/13/2011 for the course CSE 474 taught by Professor Ömerkorçak during the Spring '11 term at Marmara Üniversitesi.

Page1 / 36

07-Basic-Custom-Tags - 2010 Marty Hall Creating Custom JSP...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online