Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

in linea

Domestico Codici sorgente E-Libri Trasferimenti dal sistema centrale verso i satelliti Metterseli in contatto con Circa noi

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


Applicazione di sviluppo con le mattonelle dei Struts
Previous Next




Che cosa è mattonelle dei Struts?

  • All'interfaccia di utente di sviluppo, la struttura delle mattonelle è usata. Montando le mattonelle riutilizzabili (jsp, HTML, ecc…), le mattonelle sono permettono agli sviluppatori di sviluppare le applicazioni di fotoricettore.


  • Copre di tegoli i nables gli sviluppatori per definire una mascherina per il Web site ed usa il concetto di riutilizzazione ed allora usano questa disposizione per popolare il contenuto del Web site.





Punti per generare applicazione delle mattonelle

Per svilupparsi dell'applicazione di fotoricettore, la struttura delle mattonelle è usata. Seguire questi punti per la aggiunta delle mattonelle alle vostre applicazioni dei Struts:

  1. Inizialmente, aggiungere la lima di descrittore della biblioteca della modifica delle mattonelle (TLD) a web.xml.
  2. Allora generare la disposizione JSPs.
  3. Dopo quello sviluppa i Web pagi usando le disposizioni.
  4. Allora riorganizzare, fare funzionare e verificare l'applicazione.




Aggiungere le mattonelle TLD alla lima di web.xml

Le mattonelle inscatolano possono essere usate senza o con i Struts. Prima che possiate utilizzare le mattonelle etichettiate nella vostra applicazione, seguente l'entrata siate richiesti nella lima di web.xml.

<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>



Generare la disposizione JSPs
Supporre che la nostra disposizione di applicazione di fotoricettore è divisa nelle quattro parti denominate Top Banner, barra di sinistra di navigazione, zona soddisfatta e parte inferiore della pagina per le informazioni di destra della copia. La seguente lima è il codice di 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>

Potete usare il HTML adatto per definire la struttura per l'applicazione di fotoricettore ed avete fatto le seguenti cose:

Lima riferita di /WEB-INF/struts-tiles.tld TLD. Per visualizzare il titolo per mezzo delle mattonelle: getAsString la modifica, usare i parametri della stringa. Ignorare il parametro mancante, se le mattonelle " allineare " del ignore= di attributo allora. Se questo è allineare nel caso il parametro manca allora la volontà della struttura delle mattonelle con l'eccezione. Le mattonelle: la modifica dell'inserto è usata per inserire il soddisfare JSP, che inserisce tutta la pagina o risorse di fotoricettore a che la struttura si riferisce come titolo. Per esempio <tiles: il attribute= " l'intestazione "/> dell'inserto inserisce il Web page dell'intestazione.




Sviluppare i Web pagi usando le disposizioni

Nella nostra applicazione, useremo la disposizione delle mattonelle generiamo una pagina per visualizzare la pagina soddisfatta. Ci è lima supplementare del jsp per l'inserimento del soddisfare nella disposizione per ogni pagina soddisfatta. Così dobbiamo generare due lime una per la visualizzazione del soddisfare ed un altro del jsp per il soddisfare. Nel nostro esempio abbiamo usato due lime example.jsp e content.jsp. Il seguente esempio è il codice per le lime di example.jsp e di contents.jsp:

<p align="left"><font color="#000080" size="5">Welcome to the Title Tutorial</font></p>
<p align="left"><font color="#000080" size="5">This is the content page</font></p>

Il content.jsp è usato per definire il contenuto della pagina. Il soddisfare può essere statico o dinamico secondo i requisiti.

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

The code <tiles:insert page="/tiles/template.jsp" flush="true"> specify the tiles layout page to be used. We have set the flush attribute to true, this makes tile file to be written to browser before the rest of the page. To specify the title of page <tiles:put name="title" type="string" value="Welcome" /> is used. The following code is used to insert actual pages in the template.:

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

Il wil di content.jsp è inserito nella regione del corpo della disposizione e il bottom.jsp sarà inserito nella regione inferiore. Il top.jsp sarà inserito nell'intestazione della disposizione della regione. Il left.jsp sarà inserito nella regione del menu della disposizione.




Riorganizzare, fare funzionare e verificare l'applicazione

Per verificare questo esempio delle mattonelle, aggiungere il seguente codice nel index.jsp:

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




Previous Next

Keywords: struts tiles,struts tiles tutorial,struts tiles example,struts tiles definition,struts tiles examples,using struts tiles,struts tiles tld,struts tiles controller,struts tile,apache struts tiles,struts and tiles,tiles in struts,org apache struts tiles,org apache struts taglib tiles inserttag,org apache struts tiles tilesplugin,tiles taglib


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.