facebook

JSP editor not recognizing custom (JSTL) tags. [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #197053 Reply

    The editor isn’t recognizing the tags (ie no code assist) for me.
    I’m using both JSTL as well as some struts-tags, and I get no code assist these tag libs. The tags all end up showing in red (error).

    For the custom tag libs we have created, I have no problems.

    The pages all work fine once I war up and deploy everything on Tomcat 4.1 and JRun 3 (**note, I am using ANT to war and deploy, not the new feature in MyEclipse)

    I thought this might be because the libraries for the JSTL are not in the web/WEB-INF/lib directory (we move them in when we war), but I moved them with no change (even after rebuilding the project).

    #197060 Reply

    Scott Anderson
    Participant

    The libraries do need to be in the WEB-INF/lib directory. However, did you also modify web.xml to map your taglib uri’s to a location? People often forget this step, since ‘default’ behavior works in some servers.

    –Scott
    MyEclipse Support

    #197107 Reply

    Good point, though I thought that with Tomcat 4.1 that any tld file not in the web.xml would not be discovered.

    At any rate, yes the taglibs are mapped in the web.xml file properly.
    Here is an example of my web.xml for the tag libs:

    
      <taglib>
        <taglib-uri>/struts-logic</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/ufm</taglib-uri>
        <taglib-location>/WEB-INF/tlds/ufm.tld</taglib-location>
      </taglib>
    <taglib>
      <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
      <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
    </taglib>
    <taglib>
      <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
      <taglib-location>/WEB-INF/tlds/c-rt.tld</taglib-location>
    </taglib>

    UFM is a custom tag, and is recognized fine, however the JSTL and struts ones are not (again, the page is correct in that everything works and compiles when deployed).

    #197141 Reply

    support-michael
    Keymaster

    We have a JSTL test-case similar to your configuration less the Struts tags that works well. Is your platform Windows or Linux?

    Michael
    MyEclipse Support

    #197239 Reply

    😳

    Sorry, I added the jars to my lib directory, and then never added them to the Eclipse project. Since I use ANT, it of course compiles and run just fine. I “refreshed” my project jar list and everything works fine.

    Sorry to have bothered you.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JSP editor not recognizing custom (JSTL) tags. [Closed]

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