facebook

Tag files auto-completion

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #252512 Reply

    szafir
    Member

    Is there a way to make MyEclipse recognize and compile tag files into usable custom tags with auto-completion and validation in the current or shortcomming version ?

    #252543

    szafir
    Member

    I found a way to fix the validation and have the auto-completion partially work (for the tag file names, not the attributes) by declaring a tld for each tag file and then refering to the it using the uri instead of referring to the tagdir directly. Its a bit more work but its worth it.

    Before:

    <%@ taglib prefix="custom" tagdir="/WEB-INF/tags" %>

    After:

     <%@ taglib prefix="custom" uri="http://myCompany/myProduct/jsp/tags/custom" %>

    Together with the custom.tld file:

    <?xml version="1.0" encoding="UTF-8" ?>
    <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>A custom tag library.</description>
        <display-name>custom</display-name>
        <tlib-version>1.0</tlib-version>
        <short-name>custom</short-name>
        <uri>http://myCompany/myProduct/jsp/tags/custom</uri>
        <tag-file>
            <name>error</name>
            <path>/WEB-INF/tags/error.tag</path>
        </tag-file>
    </taglib>
    #253273

    Thanks for your solution szafir !!

    I’ve tested it and that’s working !!!

    That’s a very strange “feature” of MyEclipse 😕

    Are your custom tags also considered as “unknown” by the MyEclipse JSP Editor ?? Or did you find a solution for that too ❓

    #253275

    @avintis wrote:

    Are your custom tags also considered as “unknown” by the MyEclipse JSP Editor ?? Or did you find a solution for that too ❓

    Your solution also fixe the “unknown” in the editor… I just have to “refresh” my project !!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Tag files auto-completion

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