- This topic has 2 replies, 1 voice, and was last updated 19 years, 5 months ago by erayl.
-
AuthorPosts
-
eraylMemberCould you add full support for .jspx, .tagx files and EL functions? An example of all three files is below:
<?xml version=”1.0″ encoding=”iso-8859-1″ ?>
<!–
example.jspx
–>
<html
xmlns=”http://www.w3.org/1999/xhtml”
xmlns:jsp=”http://java.sun.com/JSP/Page”
xmlns:c=”http://java.sun.com/jstl/core”
xmlns:tools=”http://edwardrayl.com/taglibs/tools”
xmlns:toolstag=”urn:jsptagdir:/WEB-INF/tags”
xml:lang=”en” lang=”en”><head>
<title>Document with EL Function and TAGX</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<link href=”/Tools/css/tools.css” media=”screen” rel=”stylesheet” type=”text/css”/>
</head><body>
Creation Time = ${tools:millisToDate(pageContext.session.creationTime)}
<toolstag:footer />
</body>
</html><!–
footer.tagx
located in WEB-INF/tags
–>
<jsp:root
xmlns:jsp=”http://java.sun.com/JSP/Page”
xmlns:c=”http://java.sun.com/jstl/core”
version=”2.0″
>
<jsp:directive.tag language=”java”/>
<br />
<br />
<hr width=”80%” />
<br />
<div class=”footer”>This is a common footer for all documents</div>
</jsp:root>/*
* ToolsFunctions.java
* class file is located in WEB-INF/classes/com/edwardrayl
*/
package com.edwardrayl;
import java.util.Date;public class ToolsFunctions
{
public static java.lang.String millisToDate(long millis) {
return new Date(millis).toString();
}
}
eraylMemberI forgot the entry in web.xml and the tools.tld file:
web.xml fragment:
<taglib>
<taglib-uri>http://edwardrayl.com/taglibs/tools</taglib-uri>
<taglib-location>/WEB-INF/tools.tld</taglib-location>
</taglib>The tools.tld file looks lile this:
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!–
* tools.tld
* copyright (c) 2004 by Edward Rayl. All rights reserved.
–>
<taglib xmlns=”http://java.sun.com/xml/ns/j2ee”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd”
version=”2.0″><description>EL functions for the Tools project</description>
<tlib-version>1.0</tlib-version>
<short-name>tools</short-name>
<uri>http://edwardrayl.com/taglibs/tools</uri><function>
<description>Converts a time in millis to a Date String</description>
<name>millisToDate</name>
<function-class>com.edwardrayl.ToolsFunctions</function-class>
<function-signature>java.lang.String millisToDate(long)</function-signature>
</function></taglib>
eraylMember4.0 is in M2 and there is still no support for JSP 2.0 documents. You’ve stated that you have intended to have support for this since the beginning. Have you given up, or are you waiting for WTP to set this one in your lap?
-
AuthorPosts