facebook

JSXP, TAGX and EL function support

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #220556 Reply

    erayl
    Member

    Could 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&#8221;
    xmlns:jsp=”http://java.sun.com/JSP/Page&#8221;
    xmlns:c=”http://java.sun.com/jstl/core&#8221;
    xmlns:tools=”http://edwardrayl.com/taglibs/tools&#8221;
    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&#8221;
    xmlns:c=”http://java.sun.com/jstl/core&#8221;
    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();
    }
    }

    #220557 Reply

    erayl
    Member

    I forgot the entry in web.xml and the tools.tld file:

    web.xml fragment:

    <taglib>
    <taglib-uri>http://edwardrayl.com/taglibs/tools</taglib-uri&gt;
    <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&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    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&gt;

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

    #231934 Reply

    erayl
    Member

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

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: JSXP, TAGX and EL function support

You must be logged in to post in the forum log in