facebook

JSTL tags, function and other taglibs [Closed]

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

    mendrinos
    Member

    Hi,

    I have noticed that there is only support for c,fmt,sql and x tags…

    Is the tag functions available? how could I install it and use it in my web app?

    I have tried also to install Mailer Tag library from jakarta project but got lost!
    in the configuration details it’s says that we have to edit /WEB-INF/web.xml and add:

    
    <taglib>
      <taglib-uri>http://jakarta.apache.org/taglibs/mailer-1.1</taglib-uri>
      <taglib-location>/WEB-INF/mailer.tld</taglib-location>
    </taglib>
    

    I am receiving errors regarding taglib…

    Is there any tutorial/guide that explains exactly the way of manipulating or adding Tag Libraries in myeclipseide?

    Thank you

    #217877 Reply

    Riyad Kalla
    Member

    Working with taglibs in ME is the same as working with them if you were just using straight Notepad.exe to create your JSP pages. As long as your have your taglib JAR in your classpath, the TLD files somewhere under the WEB-INF directory, valid web.xml mappings (if necessary) pointing to the TLD File, then autocomplete in your JSP pages will be fine as long as you don’t forget to add the @taglib entries correctly.

    If you explain in more detail where you are, what files you are using, the problems you are having, etc… I”d be happy to help.

    #217916 Reply

    mendrinos
    Member

    Thanks for your reply,

    What I have done exactly until now is:

    1) I have added taglibs-mailer.jar in /WEB-INF/lib

    2) I have added taglibs-mailer.tld in /WEB-INF

    3) I have configured (following the info found on apache.org) the web.xml:

    
    <?xml version="1.0" encoding="UTF-8"?>
    
    <web-app version="2.4" 
    
        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 
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    
    <taglib>
      <taglib-uri>http://jakarta.apache.org/taglibs/mailer-1.1</taglib-uri>
      <taglib-location>/WEB-INF/mailer.tld</taglib-location>
    </taglib>
    
    </web-app>
    

    Where I am receiving error related to the tag: taglib…

    next I had to add the following line in the top of a jsp file in order to be able to use the mailer tag:

    
    <%@ taglib uri="http://jakarta.apache.org/taglibs/mailer-1.1" prefix="mt" %>

    Thank you for your assistance.

    #217921 Reply

    Riyad Kalla
    Member

    mendrinos,
    You did everything perfect, nice job.

    #217922 Reply

    mendrinos
    Member

    The problem is that I am receiving errors in the web.xml file.

    It seems that cannot parse the tag: <taglib> inside the <web-app></web-app>

    #217924 Reply

    Riyad Kalla
    Member

    Ahh, the format you are using is for Web 2.3 spec, the new 2.4 spec requires you wrap the taglib tags in jsp-config tags like so:

    
    <?xml version="1.0" encoding="UTF-8"?>
    
    <web-app version="2.4"
    
       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
       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    
    <jsp-config>
      <taglib>
        <taglib-uri>http://jakarta.apache.org/taglibs/mailer-1.1</taglib-uri>
        <taglib-location>/WEB-INF/mailer.tld</taglib-location>
      </taglib>
    </jsp-config>
    </web-app>
    
    #217945 Reply

    mendrinos
    Member

    Great! thank you,

    Everything is working fine now.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSTL tags, function and other taglibs [Closed]

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