Apache Tiles.

Slides:



Advertisements
Similar presentations
Tridion 5.3 Templates.
Advertisements

May 13th, Lucek Consulting Basic Java Servlet/JSP Web Development David Lucek Lucek Consulting
DEPARTMENT OF INFORMATION STUDIES Andy Dawson LIS1510 Library and Archives Automation Issues Basics of XHTML Andy Dawson Department of Information Studies,
Pure Struts web-application header.jsp footer.jsp menu.jsp body … + mybody.jsp layout.jsp struts-config.xml tiles-def.xml classical include in servlet.
Struts Portlet Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Struts Portlet Adding an Action Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without.
Main Title Here Additional copy here, additional copy here, additional copy here, additional copy here, additional copy here. ADD YOUR WEB ADDRESS HERE.
Apache Struts Technology
A Blackboard Building Block™ Crash Course for Web Developers
UNIT 12 LO4 BE ABLE TO CREATE WEBSITES Cambridge Technicals.
Servlets Enterprise Systems Programming. Servlets  Servlets: server-side Java programs that enable dynamic processing of web-based requests  Web-based.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
AppFuse Architecture Directory Structure, Build/Test/Deploy Processes.
Introducing new web content management tools for Priority...
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Apache Struts Technology A MVC Framework for Java Web Applications.
JavaServer Pages TM Introduce by
Session-01. Layers Struts 2 Framework The struts 2 framework is used to develop MVC-based web application. Struts 1.0 was released in June The.
Struts 2.0 an Overview ( )
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Web Development Methodologies Yuan Wang(yw2326). Basic Concepts Browser/Server (B/S) Structure Keywords: Browser, Server Examples: Websites Client/Server.
Spring Roo CS476 Aleksey Bukin Peter Lew. What is Roo? Productivity tool Allows for easy creation of Enterprise Java applications Runs alongside existing.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
1 Advanced Frame Options Using NORESIZE  By default, users may resize frames unless you specify the NORESIZE attribute in the tag  Examples:
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
Dreamweaver Learning to be a web design master! By: Mr. Brunton.
Creating A Simple Web Page. Step 1- Open Dreamweaver & Create A New Page (File New) and blank.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Java for the WWW November 2012Slide Tag Libraries What are they? –Custom libraries Custom tags – see examples in following slides.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
LATTICE TECHNOLOGY, INC. For Version 10.0 and later XVL Web Master Advanced Tutorial For Version 10.0 and later.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
SDPL 2002Notes 7: Apache Cocoon1 7 XML Web Site Architecture Example: Apache Cocoon, a Web publishing architecture based on XML technology
The DSpace Course Module - Look & Feel Customisation.
Microsoft FrontPage 2003 Illustrated Complete Using a Dynamic Web Template.
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
1 Copyright(c) Dave Krupinski. All rights reserved. Webgenz and Content Management An introduction to using Webgenz to develop and maintain.
METS Dissemination METS Opening Day Corey Keith
Guide for Mahara My Views PY1 team 3 - Yihong Huo, Jian Ren, Poonam Kala 1Guide of My Views - Team 3.
Struts 2 - The modern web application framework By Nalin De Zoysa
RUBRIC IP1 Ruben Botero Web Design III. The different approaches to accessing data in a database through client-side scripting languages. – On the client.
Solutions using Microsoft Content Management Server 2002 Connector for SharePoint Technologies Sue Corke Mark Harrison Microsoft UK.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Web Design Part I. Click Menu Site to create a new site root.
Main Title Here Additional copy here, additional copy here, additional copy here, additional copy here, additional copy here. ADD YOUR WEB ADDRESS HERE.
CSCI 6962: Server-side Design and Programming Facelets and User Interface Design.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Basic Portlet Copyright © 2000 – 2007 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
INTRODUCTION TO HTML5 New HTML5 User Interface and Attributes.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
DT228/3 Web Development JSP: Actions elements and JSTL.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
2 Copyright © 2004, Oracle. All rights reserved. ADF Development Process.
Apache Struts Technology A MVC Framework for Java Web Applications.
DYNAMIC FAQ AND DOCUMENTATION PAGES IN SHAREPOINT A modern, reusable, and easy-to-use model.
17 Copyright © 2006, Oracle. All rights reserved. Information Publisher.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
How to Apply PDF in Flipbook on Website. Description If you are finding solution for applying PDF in flipbook mode on website, and adding multimedia items.
John D. McGregor Eclipse Process Framework Module 2 Session 4
Managing the content of web pages
Unit 6-Chapter 2 Struts.
Introduction to Struts
SiteBuilder 2 Introduction.
JavaServer Faces: The Fundamentals
Main Title Here ADD YOUR WEB ADDRESS HERE
The need for server pages
Presentation transcript:

Apache Tiles

Tiles Introduction Tiles is a framework for the development user interface Tiles is enables the developers to develop the web applications by assembling the reusable tiles (jsp, html, etc..) Tiles uses the concept of reuse and enables the developers to define a template for the web site and then use this layout to populate the content of the web site

Tiles Introduction For example, if you have to develop a web site having more that 500 page of static content and many dynamically generated pages. The layout of the web site often changes according to the business requirement. In this case you can use the Tiles framework to design the template for the web site and use this template to populate the contents. In future if there is any requirement of site layout change then you have to change the layout in one page. This will change the layout of you whole web site.

Tiles1 and Tiles2 Tiles has been designed to use with the Struts Framework Tiles can be used with or without Struts. Tiles which has been design to use with out Struts is called as Tiles2

Steps To Create Tiles Application Tiles is very useful framework for the development of web applications. Here are the steps necessary for adding Tiles to your Struts application Add the Tiles Tag Library Descriptor (TLD) file to the web.xml. Create layout JSPs. Develop the web pages using layouts. Repackage, run and test application.

Add the Tiles TLD to web.xml file <taglib>      <taglib-uri>/tags/struts-tiles</taglib-uri>       <taglib-location>/WEB-INF/struts-t iles.tld</taglib-location> </taglib>

Create layout JSPs. Our web application layout is divided into four parts: To Banner, Left Navigation Bar, Content Area and Bottom of the page for copy right information. Here is the code for out template (template.jsp):

template.jsp <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <html> <head>     <title><tiles:getAsString name="title" ignore="true"/></title> </head> <body> <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolor="#000000" bgcolor="#E7FDFE"> <tr> <td width="100%" colspan="2" valign="top"><tiles:insert attribute="header"/></td> </tr> <tr> <td width="23%"><tiles:insert attribute="menu"/></td> <td width="77%" valign="top" valign="top"><tiles:insert attribute="body"/></td> </tr> <tr> <td width="100%" colspan="2" valign="top"><tiles:insert attribute="bottom"/></td> </tr> </table> </body> </html>

example.jsp <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <tiles:insert page="/tiles/template.jsp" flush="true">    <tiles:put name="title" type="string" value="Welcome" />    <tiles:put name="header" value="/tiles/top.jsp" />    <tiles:put name="menu" value="/tiles/left.jsp" />    <tiles:put name="body" value="/tiles/content.jsp" />    <tiles:put name="bottom" value="/tiles/bottom.jsp" />  </tiles:insert>

Repackage, run and test application <li> <html:link page="/tiles/example.jsp">Tiles Example</html:link> <br> Example of creating first tile application. </li>

Steps to Use the tiles-defs.xml Add the following code in the struts.xml, This enables the TilesPlugin to use the /WEB-INF/tiles-defs.xml file. <plug-in className="org.apache.struts.tiles.TilesPlugin" >        <!-- Path to XML definition file -->        <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />        <!-- Set Module-awareness to true -->        <set-property property="moduleAware" value="true" /> </plug-in>

Defining the tiles-defs.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd"> <tiles-definitions>      <definition name="Tiles.Example" page="/tiles/template.jsp">           <put name="title" type="string" value="Welcome" />           <put name="header" value="/tiles/top.jsp" />           <put name="menu" value="/tiles/left.jsp" />           <put name="body" value="/tiles/content.jsp" />           <put name="bottom" value="/tiles/bottom.jsp" />       </definition> <definition name="${YOUR_DEFINITION_HERE}"> </definition> </tiles-definitions>

Configure the Struts Action to use Tiles Definition Open the struts.xml file and add the following code: <action path="/Tiles/Example"        forward="Tiles.Example"/>

Testing the Application <li> <html:link page="/Tiles/Example.do">Using tiles-defs.xml</html:link> <br> Example shows you how to use tiles-defs.xml file. </li>

For Your Reference http://tiles.apache.org/tutorial/index.html http://www.laliluna.de/tutorial/first-tiles/first_struts_tiles_tutorial.pdf http://www.roseindia.net/struts/struts_tiles.shtml

Thank You