Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

Online

À la maison Codes sources E-Livres Téléchargements Nous contacter Au sujet de nous

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
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
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting


JSP Tags

Previous Next





Using JSP tags

  • Declaration tag
  • Expression tag
  • Directive tag
  • Scriptlet tag
  • Action tag



Étiquette de déclaration

Étiquette de déclaration (<% ! %>)
  • Il permet au lotisseur de déclarer des variables ou des méthodes.
  • Commencer par <% ! et extrémité avec %>
  • Le code placé à l'intérieur de cette étiquette doit finir dans un point-virgule (; ).
Les déclarations ne produisent pas du rendement ainsi sont employées avec des expressions ou des scriptlets de JSP.
Par exemple,


<%!
private int counter = 0 ;
private String get Account ( int accountNo) ;
%>




Étiquette d'expression
Étiquette d'expression (<%= %>)

L'étiquette d'expression permettent au lotisseur d'inclure n'importe quelle expression de Java et sont abréviation out.println ().
 
Un point-virgule (; ) n'apparaît pas à la fin du code à l'intérieur de l'étiquette.
 
exposition d'e.g.to la date du jour et l'heure.


Date : <%= new java.util.Date() %>



Étiquette directive
Étiquette de Direcitve (directive de <%@… >)

Une directive de JSP fournit des informations spéciales sur la page au moteur de JSP.

Trois types principaux de directives sont :
 
1) page - traitement de l'information pour cette page.
2) Inclure - les dossiers à inclure.
3) Bibliothèque d'étiquette - étiqueter la bibliothèque à employer en cette page.
 

Les directives ne produisent aucun rendement évident quand la page est demandée mais changer la manière que le moteur de JSP traite la page.
 

par exemple, vous pouvez rendre des données de session indisponibles à une page en plaçant une page directive (session) à faux.




1. Directive de page

Cette directive a 11 attributs facultatifs qui fournissent au moteur de JSP l'information de traitement spéciale. Les 11 attributs différents avec une courte description est decribe dans la table donnée ci-dessous :


Language Which language the file uses. <%@ page language = "java" %>
Extends

Superclass used by the JSP engine for the translated Servlet.

<%@ page extends = "com.taglib... %>
import

Import all the classes in a java package into the current JSP page. This allows the JSP page to use other java classes.

<%@ page import = "java.util.*" %>
session

oes the page make use of sessions. By default all JSP pages have session data available. There are performance benefits to switching session to false.

Default is set to true.
buffer

Controls the use of buffered output for a JSP page. Default is 8kb

<%@ page buffer = "none" %>
autoFlush Flush output buffer when full. <%@ page autoFlush = "true" %>
isThreadSafe

Can the generated Servlet deal with multiple requests? If true a new thread is started so requests are handled simultaneously.

 
info

Developer uses info attribute to add information/document for a page. Typically used to add author,version,copyright and date info.   

<%@ page info = "visualbuilder.com test
page,copyright 2001. " %>
errorPage

Different page to deal with errors. Must be URL to error page.

<%@ page errorPage = "/error/error.jsp" %>
IsErrorPage

This flag is set to true to make a JSP page a special Error Page. This page has access to the implicit object exception (see later).

 
contentType Set the mime type and character set of
the JSP.
 



2. Inclure la directive

Elle permet à un lotisseur de JSP d'inclure le contenu d'un dossier à l'intérieur des autres. Inclure typiquement les dossiers sont employés pour la navigation, les en-têtes, les tables et les titres de bas de page qui sont communs aux pages multiples.
 
Deux exemples d'employer incluent des dossiers :

Ceci inclut le HTML de privacy.html trouvé dans l'annuaire d'inclure dans la page courante de jsp.


<%@ incluent le dossier = « incluent/privacy.html » %>

ou pour inclure un menu de naviagation (dossier de jsp) a trouvé dans l'annuaire courant.

<%@ incluent le dossier = « navigation.jsp » %>



3. Directive de bibliothèque d'étiquette
Une bibliothèque d'étiquette est une collection d'étiquette faite sur commande qui peut être employée par la page.

uri de taglib de <%@ = préfixe « d'URI de bibliothèque d'étiquette » = préfixe » %> « d'étiquette

L'étiquette faite sur commande ont été présentées dans JSP 1.1 et permettent au lotisseur de JSP de cacher le code complexe de côté de serveur des concepteurs de Web




Étiquette de Scriptlet
Étiquette de Scriptlet (<%… %>)

Entre <% et étiquettes de %>, n'importe quel code valide de Java s'appelle un Scriptlet. Ce code peut accéder à n'importe quelle variable ou haricot avoué. Par exemple, pour imprimer une variable.

<%
Corde username = « visualbuilder » ;
out.println (username) ;
%>



Étiquette d'action
Il y a trois rôles principaux d'étiquette d'action :
1) Elle permettent l'utilisation du côté Javabeans de serveur
2) Elle transfèrent la commande entre les pages
3) Soutien indépendant de navigateur des applet.



Javabeans

Un Javabeans est un type spécial de classe qui a un certain nombre de méthodes. La page de JSP peut appeler ces derniers méthode ainsi peut laisser à la majeure partie du code dans les ces Javabeans. Par exemple, si vous vouliez faire une forme de rétroaction qui envoie automatiquement un email. En ayant une page de JSP avec une forme, quand le visiteur appuie sur le bouton de soumission ceci envoyer les détails à un Javabean qui envoie l'email. Cette manière là ne serait aucun code dans la page de JSP traitant envoyer des email (JavaMail api) et votre Javabeans pourrait être employé en une autre page (favorisant la réutilisation).
 
Pour employer un Javabeans dans une page de JSP employer la syntaxe suivante :

<jsp : usebean identification = « …. » portée = « classe d'application » = « COM… » />

Ce qui suit est une liste de portées de Javabean :

page - valide jusqu'à la page accomplit.
demande - l'exemple d'haricot dure la demande de client
session - l'haricot dure la session de client.
application - l'exemple d'haricot a créé et des bouts jusqu'aux extrémités d'application.





Previous Next

Keywords: JSP Tags, jsp custom tags, jsp action tags, jstl tags, jsp tag, tags in jsp, custom tags in jsp, jsp tag library, jsp custom tag, jsp tag libraries, jstl tag, custom tag in jsp, tag libraries in jsp, include tag in jsp, jsp include tag, tag library in jsp, jsp forward tag, jstl tag library, forward tag in jsp, jsp tag lib, jsp usebean tag, tags jsp, javax servlet jsp tagext tag, div tag in jsp, display tag in jsp, jsp custom tags tutorial, jsp tags in ibm websphere, usebean tag in jsp, select tag in jsp, jsp tag library tutorial, using jstl tags, action tags in jsp, jsp standard tag library, jsp custom tag library, jsp import tag, tag lib in jsp, jsp custom tag libraries, tag in jsp, servlet tag, taglib tag, using jsp custom tag, web xml tags, using jstl tag, request getparameter jsp, jsp source code


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML 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
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU 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
Database Quizes
Oracle Quiz
MySQL Quiz
Operating System Quizes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizes
Testing Quiz
Firewalls Quiz
SAP Module Quizes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizes
Corba Quiz
Networking Quiz
Microsoft Office Quizes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizes
Financial Accounting Quiz
Managerial Accounting Quiz

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