facebook

Error when two .tld files with the same name in project

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #203084 Reply

    inksystems
    Member

    Hi Folks!

    I’m using JSTL for one of the projects along with third party tag library. Both of them has file sql.tld. The problem is that JSP editor uses wrong .tld file.
    The following error shows up in the task list:

    unknown user tag <sql:rs … check http://www.inksystems.net/tags/sql

    despite the fact that correct tld file is specified in the web.xml for http://www.inksystems.net/tags/sql library. And also it works fine on the application server as well.

    – System Setup ——————————-
    Operating System and version: Fedora Core 1 Linux version 2.4.22-1.2149.nptl (Red Hat Linux 3.2.3-6)) #1 Wed Jan 7 13:08:26 EST 2004 also tried it on Windows
    Eclipse version: 2.1.2
    Eclipse build id: 200311030802
    Fresh Eclipse install (y/n): n
    If not, was it upgraded to its current version using the update manager? y
    Other installed external plugins: EMF, GEF, XSD, Visual Editor
    Number of plugins in the <eclipse>/plugins directory:
    MyEclipse version: > 10
    Eclipse JDK version: 1.4.2_03
    Application Server JDK version: 1.4.2_03
    Are there any exceptions in the Eclipse log file? No

    – Message Body ——————————-

    Best regards,
    Igor.
    undefined

    #203094 Reply

    Riyad Kalla
    Member

    Ignor,
    it would help if yoiu provide us the taglib entries in your web.xml file as well as the taglib entries at the top of the page you are trying to use the <sql tag on.

    #203099 Reply

    inksystems
    Member

    Here they are:

    — web.xml
    Skipped….
    <taglib>
    <taglib-uri>http://www.inksystems.net/tags/form</taglib-uri&gt;
    <taglib-location>form.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://www.inksystems.net/tags/sql</taglib-uri&gt;
    <taglib-location>sql.tld</taglib-location>
    </taglib>
    Skipped….

    — jsp page
    Skipped….
    <%@ taglib uri=”http://www.inksystems.net/tags/sql&#8221; prefix=”sql” %>
    <%@ taglib uri=”http://java.sun.com/jstl/fmt&#8221; prefix=”fmt” %>
    <%@ taglib uri=”http://www.inksystems.net/tags/form&#8221; prefix=”frm” %>
    Skipped….

    As you can see sql part of the JSTL is not used in the jsp file but MyEclipse somehow manages to pick JSTL related sql.tld.

    Best regards,
    Igor.

    #203102 Reply

    Riyad Kalla
    Member

    Igor,
    Is the form.tld and sql.tld really in your webroot directory? They should be in your WEB-INF directories at least (and optionally in a subdir called “tld”).

    What happens when you change the prefix for the sql library to “sqlTest”, can you use it? Or does MyEclipse still try and complete the JSTL library params?

    #203104 Reply

    inksystems
    Member

    Riyad,

    jstl.jar and standard.jar are in the WEB-INF/lib directory. And my sql.tld and form.tld files are both in WEB-INF. It does not seem to be a problem for JBoss to use correct tld file.
    I also tried to change prefix and uri for sql taglib and MyEclipse still used the wrong one.

    Best regards,
    Igor.

    #203106 Reply

    Riyad Kalla
    Member

    Hmm very strange, can you try two more things:
    change your taglib entries to look like

    
    <taglib> 
     <taglib-uri>http://www.inksystems.net/tags/form</taglib-uri> 
     <taglib-location>/WEB-INF/form.tld</taglib-location> 
     </taglib> 
     <taglib> 
     <taglib-uri>http://www.inksystems.net/tags/sql</taglib-uri> 
     <taglib-location>/WEB-INF/sql.tld</taglib-location> 
     </taglib> 
    

    and if that doesn’t work, remove all your taglib entries from your web.xml file and close/reopen the project and see if that works. The reason I say that is I saw some posts on Sun’s forums about people not getting their JSTL taglibs working when they HAD entries in their web.xml file for them… very strange.

    #203109 Reply

    inksystems
    Member

    Riyad,

    apparently replacing relative path with absolute one (sql.tld -> /WEB-INF/sql.tld) solved the problem. But i’m wondering shouldn’t it understand relative path as well, should it? As far as i remember JSP specification claims that it can be either one or another, absolute is relative to the context or relative means relative to the current page or current file. Am i right?

    Best regards,
    Igor.

    #203111 Reply

    Riyad Kalla
    Member

    Igor,
    I’m sorry I don’t know the answer to that one. I’ve only ever seen people fully qualify the tld locations. I’m glad it worked but will send your question back to Scott/Michael and see if they know… this is really a NOP-question IMO 🙂

    #203112 Reply

    inksystems
    Member

    Riyad,

    thanks a million for your help anyways!

    Best regards,
    Igor.

    #203119 Reply

    Riyad Kalla
    Member

    No problem, that’s what I’m here for 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Error when two .tld files with the same name in project

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