facebook

taglib completion no work with wrong URIs [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    CNM
    Member

    since updating to eclipse 3.0.1 and myeclipse 3.8.2 code completion has stopped working for jsp taglibs. if I reference the taglib directly in the page it works fine but when taglibs are included via a jsp include they dont get reconised.

    i.e with the following code completion works

    
    <%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld"  %>
    

    but when same line as above declared in a seperate jsp and loaded into the page with a jsp include code completion does’nt find the tag

    
    <%@ include file="/common/taglibs.jsp"%>
    

    any ideas ??

    #216359

    Scott Anderson
    Participant

    Can you right-click on the project in the Project Explorer view and select ‘MyEclipse > Run Validation’ then reopen the editor.

    #216361

    CNM
    Member

    Yes. validation ran without any errors. but the same problems exists when i reopen the editor

    #216362

    Scott Anderson
    Participant

    Can you restart Eclipse specifying the -clean commandline option?
    Also, how did you upgrade MyEclipse – the update site or an uninstall / reinstall?
    And, is this a MyEclipse web project? Does it have a webroot dir or is the project used as the web root?
    Do you notice this issue with other projects in your workspace, or just this one?

    And, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #216365

    CNM
    Member

    I have tried the -clean option but it had no effect
    I upgraded eclipse and myeclipse using the lastest downloadable packages and starting from scratch eclipse 3.0.1 myeclipse 3.8.2
    It is a myeclipse web project with a webapp root of src/webapp and webapp src of src/java
    I orginally imported this project from my old workspace once i had upgraded (as a test i have just removed webproject capabilities and readded them as well as re-adding struts capabilities. also no effect)
    I have also started a new webproject from stratch added struts capabilities and still get the same issue.
    as yet no messages have shown up in the .log file

    Im trying all this on a fedora core-1 (gcc 3.3.2) install with sun-sdk 1.4.2_05.

    thanks

    #216367

    Scott Anderson
    Participant

    If you have a small test project that exhibits the problem, can you jar it and mail it to us at support@genuitec.com. This will quickly allow us to test it internally and see if the problem is miscommunication, configuration, or other. In your email, please include the full URL of this thread so that we can match the project to the problem. Thanks!

    #216389

    Riyad Kalla
    Member

    NOTE: Previous reply erased after more testing, new reply below.

    CNM,
    I took a look at your sample project, and it works as a Java Project AND as a Web Module Project just fine with autocomplete, the problem is that you entered in invalid URIs for your taglibs, please see this FAQ entry to better understand what a URI is in the @taglib tag:
    http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251

    Also note that if you want to use custom URIs, that means you need to add valid mappings in your web.xml file, and will need to use a Web Module Project so ME can pickup those changes.

    Once I changed your common/taglibs.jsp file to use the correct default URIs to this:

    
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
    

    Everything worked fine.

    #216483

    CNM
    Member

    thanks for your efforts but this has not solved the problem.
    some things i have noticed.

    yes the uri’s were wrong (but even with the wrong ones declared directly in the page code completion starts to work)

    i changed the taglibs in commons/taglibs.jsp to have the correct uri’s but this had no effect. in the app im am working on (not the tester i sent you) i also use jstl,sitemesh,displaytag and strutsmenu taglibs i can not get completion to work for any of these unless
    i put the taglib directly in the page

    when i have the line

    
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    

    in common/taglibs.jsp and then also declare it with a different uri in MyJsp.jsp validation detects that it has already been defined. so im confident that the validation side of things are working fine it’s just the code completion only resolves the tags if they have been declared directly in the page i am currently editing.

    #216498

    Riyad Kalla
    Member

    Can you try closing and reopening the file? Is this a Java project or Web project?

    Is there a way you can send either that project, or a subset of that project that recreates the problem to us? I”m confident that this is a simple configuration error, but am grasping at straws since I can’t be sure… if it is a bug, we absolutely want to get it fixed, which again would require a test case from you for this.

    I’m sorry this process is so “hands on”, its really an issue of recreation. When we fixed a lot of the WTP bugs in the JSP editor, the include resolution was one of the most important ones and we consider *a lot* of different situations, that is why I believe this is a configuration issue.

    You might also want to make sure that you are using the correct URIs for the libraries that you have in your project. You can always open your JAR files (struts.jar for Struts, standard.jar for JSTL) and then open the TLD files and look for the <uri> section to make sure you rae using the correct URIs… sometimes the URIs change between versions.

    #216505

    CNM
    Member

    I have tried open/closing/restarting/restarting with –clean /removing and adding web project capabilities all of which had no effect. im confident that the uri’s im using are OK because when i include them in the page im editing directly, code completion works. i aggree that it is a configuration problem or i would have expected a few more users to be having trouble. if i get time this evening / tonight i will try it out with a clean install and new workspace and let you know how i get on.

    #216506

    Riyad Kalla
    Member

    CNM,
    Besides just trying out a clean workspace (which is a good idea) try a new project and slowly move each resource, page by page into the project and see when it stops working, then try and isolate what it was that caused the autocomplete to get dumb…

    #216540

    I am having nearly the same issue.
    Eclipse: Version: 3.0.1 Build id: 200409161125
    MyEclipse: 3.8.2 (from EnterpriseWorkbenchInstaller_030802.exe)
    JDK: j2sdk1.4.2_03
    OS: Win XP Pro SP2

    Two days ago I was on Eclipse 3.0 and the previous release of MyEclipse. None of the projects I worked on had issues in the JSPs. I could get code assist on every taglib that was defined in the project. I upgraded Eclipse using the internal updater, then unistalled MyEclipse and installed the newest release.

    My JSP pages now have warnings for every tag that is not JSTL (the warings are like: Unknown tag html:html). I can no longer get code assist for any tags except JSP tags and JSTL.

    We too have all the taglib imports in a seperate file that is included on each page as:

    <%@ include file="WEB-INF/jspf/taglibs.jspf" %>

    The JSPF is this:

    <%-- 
    $Id: taglibs.jspf,v 1.4 2004/04/19 15:40:15 chasegaw Exp $
    --%>
    <%@ taglib uri="/app" prefix="app" %>
    <%@ taglib uri="/app-logic" prefix="app-logic" %>
    <%@ taglib uri="/struts-bean" prefix="bean" %>
    <%@ taglib uri="/struts-html" prefix="html" %>
    <%@ taglib uri="/struts-logic" prefix="logic" %>
    <%@ taglib uri="/struts-nested" prefix="nested" %>
    <%@ taglib uri="/struts-template" prefix="template" %>
    <%@ taglib uri="/struts-tiles" prefix="tiles" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
    <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
    <%@ taglib uri="http://java.sun.com/jstl/fmt-rt" prefix="fmt-rt" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql-rt" prefix="sql-rt" %>
    <%@ taglib uri="http://java.sun.com/jstl/x" prefix="x" %>
    <%@ taglib uri="http://java.sun.com/jstl/x-rt" prefix="x-rt" %>

    As those are non-standard URI mappings, they are mapped properly in the web.xml file (snipet):

      <taglib>
        <taglib-uri>/struts-template</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-template.tld</taglib-location>
      </taglib>  
      <taglib>
        <taglib-uri>/struts-tiles</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-tiles.tld</taglib-location>
      </taglib>
      <!-- JSTL 1.0 -->
      <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>

    The project is a Java Project. I tried checking the project out as a new Web Project, and the results are the same. I launched with -clean. Same

    #216543

    Riyad Kalla
    Member

    Since the include statements are relative to the project root, try changing your include statment to look like this:
    “<%@ include file=”/WEB-INF/jspf/taglibs.jspf” %>”

    note the preceeding slash.

    #216548

    CNM
    Member

    i have done a bit more testing. heres the results

    1: reinstalled eclipse
    cd /opt
    mv eclipse eclipse-old
    unzip /tmp/eclipse-SDK-3.0.1-linux-gtk.zip

    2: installed ME
    sh /tmp/EnterpriseWorkbenchInstaller_030802.bin

    3. created new web project
    (webroot = src/webapp)
    4. added struts support

    5. created WEBROOT/common/taglibs.jsp containg the following.
    <%@ taglib uri=”http://jakarta.apache.org/struts/tags-html&#8221; prefix=”html” %>

    6. created WEBROOT/MyJsp.jsp (from dialog template) and added
    <%@ include file=”/common/taglibs.jsp” %>

    content assist for the added tag library still dosnt work. i then repeated the above but changed step 2 and installed ME 3.8.1
    sh /tmp/EnterpriseWorkbenchInstaller_030801.bin
    and content assist works fine. in my desperation i tried upgradeing via the update site. the update worked fine but once eclipse had restarted content assist stopped working

    i hope this helps

    #216550

    @support-rkalla wrote:

    Since the include statements are relative to the project root, try changing your include statment to look like this:
    “<%@ include file=”/WEB-INF/jspf/taglibs.jspf” %>”

    note the preceeding slash.

    Does not change anything.

Viewing 15 posts - 1 through 15 (of 19 total)
Reply To: taglib completion no work with wrong URIs [Closed]

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