📄 mylib.tld
字号:
<?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "web-jsptaglib_1_1.dtd"><!-- a tab library descriptor --><taglib> <!-- after this the default space is "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd" --> <tlibversion>1.0</tlibversion> <jspversion>1.1</jspversion> <shortname>simple</shortname> <info> A simple tab library for the examples </info> <!-- A simple Tag --> <!-- foo tag --> <tag> <name>foo</name> <tagclass>examples.FooTag</tagclass> <bodycontent>empty</bodycontent> <info> Perform a server side action; uses 3 mandatory attributes </info> <attribute> <name>att1</name> <required>true</required> </attribute> <attribute> <name>att2</name> <required>true</required> </attribute> <attribute> <name>att3</name> <required>true</required> </attribute> </tag> <!-- Tags defining a connection/userid/password/query collection --> <!-- connection tag --> <tag> <name>connection</name> <tagclass>examples.ConnectionTag</tagclass> <!-- TODO: possibly provide this class as part of the spec --> <teiclass>examples.DefaultTEI</teiclass> <info> A connection must have a password and a userid subelements somewhere. A connection action must have a ref attribute providing some information on the connection. A connecton action may have an id in which case the connection object will be made available under that name A connection can also be used without an id, just nest the query within it! </info> <attribute> <name>id</name> <required>false</required> </attribute> <attribute> <name>ref</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <!-- password tag --> <tag> <name>password</name> <tagclass>examples.PasswordTag</tagclass> <bodycontent>JSP</bodycontent> <info> Define the password In this example we use the body rather than an attribute to pass the information. It would be even easier to code if we used an attribute; we would just mark it as a request-time value. </info> </tag> <!-- userid tag --> <tag> <name>userId</name> <tagclass>examples.UserIdTag</tagclass> <bodycontent>JSP</bodycontent> <info> Define the userId In this example we use the body rather than an attribute to pass the information. It would be even easier to code if we used an attribute; we would just mark it as a request-time value. </info> </tag> <!-- query tag --> <tag> <name>query</name> <tagclass>examples.QueryTag</tagclass> <teiclass>examples.DefaultTEI</teiclass> <bodycontent>tagdependent</bodycontent> <info> This tag provides an abstraction over SQL queries. There is one required id attribute, and one optional connection attribute, which, when provided, must be the id for some connection tag. The body should, when evaluated, correspond to an SQL query. </info> <attribute> <name>id</name> <required>true</required> </attribute> <attribute> <name>connection</name> <required>false</required> </attribute> </tag> <!-- A simple iteration tag --> <!-- foreach tag --> <tag> <name>forEach</name> <tagclass>examples.ForEachTag</tagclass> <teiclass>examples.ForEachTEI</teiclass> <bodycontent>JSP</bodycontent> <info> A simple iteration tag. There are two required attributes: row and in The value of the "in" attribute is the ID of a query that has been defined in the JSP page prior to this tag. The value of the "row" attribute the name of a scripting variable that will be defined within the scope of the foreach tag. This scripting variable will receive successive row values of the query result provided through the "in" attribute. The body of the tag is evaluated as many times as there are rows in the query result object. The evaluation is passed through to the enclosing out JspWriter. </info> <attribute> <name>row</name> <required>true</required> </attribute> <attribute> <name>in</name> <required>true</required> </attribute> </tag></taglib>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -