Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

on-line

Haupt Quellenprogramme E-Bücher Downloads Mit uns in Verbindung treten Über uns

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


Verwenden von tiles-defs.xml in der Fliese-Anwendung
Previous Next




  • T O erzeugen den Ausgang in den Fliesen, die wir die Definition in tiles-defs.xml definieren können, das die unterschiedlichen Bestandteile „steckbar“ spezifiziert.


  • Wir können beseitigen die Notwendigkeit, Extrajsp Akte für die jede zufriedene Akte zu definieren, indem wir tiles-defs.xml verwenden.


  • Z.B. haben wir example.jsp definiert, um den Inhalt der content.jsp Akte im letzten Abschnitt anzuzeigen.


  • In diesem Abschnitt zeige ich dich die tiles-defs.xml Akte verwendend, wie man die Notwendigkeit der Extrajsp Akte beseitigt.



Schritte, zum des tiles-defs.xml zu verwenden
Die Fliesen gründen, die in der struts-config.xml Akte steckbar sind.

In struts-config.xml den folgenden Code hinzufügen. Wir benutzen die /WEB-INF/tiles-defs.xml Akte, um TilesPlugin zu ermöglichen

<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

In this file we are defining different components to the "plugin" tag. The following is th code for the same:

<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>

The page attribute define the template file to be used and the put tag specifies the different components to "plugin".The name of the definition is Tiles.Example,we will use this in the struts-config.xml (While creating forwards in struts-config.xml file) file Your tiles-defs.xml should looks like:

<?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>



Die strut -Tätigkeit zusammenbauen, um Fliese-Definition zu verwenden

Folgenden Code im struts-config.xml hinzufügen:

<action path="/Tiles/Example"
forward="Tiles.Example"/>

Im oben genannten Code mit Fliesen, verwenden die Druckpunkte zu den Fliesen definition.we Tiles.Example in dieser Codedefinition, die wir in der tiles-defs.xml Akte definiert haben. Ohne Fliesen nachschicken und Tätigkeit Definitionen zeigen direkt auf das JSPs. Mit Fliesen zeigen sie auf die Definition der Seite in der Fliesekonfiguration Akte.

Prüfung der Anwendung
Um das Beispiel zu benennen, eine Verbindung im index.jsp herstellen. Der addierte Code sind, wie folgt:

<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>




Previous Next

Keywords: struts tiles application,struts web xml,jsp tiles,struts tiles tutorial,struts tiles example,tiles java,struts tutorial,struts jakarta,java struts,struts tiles examples,struts apache,struts examples,struts framework,struts tutorials


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.