facebook

Code assists in JSP for taglibs [Closed]

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

    Hi,

    We are using Eclipse 2.1.3 with ME 2.7.1 on an struts-enabled project. This is one great tool! 😀

    However, we are using struts-el and jstl tag libs and are have intermittent problems with command completion. On some of our JSPs, it works and sometimes not. Our taglibs are defined in the web.xml (under WebRoot) as follows

    
        <taglib>
            <taglib-uri>struts-html-el</taglib-uri>
            <taglib-location>/WEB-INF/tlds/struts-html-el.tld</taglib-location>
        </taglib>
    
    

    Our jsp looks like this:

    
    <%@ page language="Java" %>
    <%@ taglib uri="struts-html-el" prefix="html-el"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    
        <snip>
    
    <html-el:hidden property="category" value="abc"/>
    

    However, when we put our cursor to the left of the “html-el:” or “c:”, we do not get command completion 😥 . Any ideas?

    Thanks,

    James
    System Setup ——————————-
    Operating System and version: Windowsxp
    Eclipse version: 2.1.3
    Eclipse build id: 200403101828
    Fresh Eclipse install (y/n): n
    If not, was it upgraded to its current version using the update manager? y
    Other installed external plugins: n
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 9
    MyEclipse version: 2.71
    Eclipse JDK version: 1.4
    Application Server JDK version: 1.4
    Are there any exceptions in the Eclipse log file? n

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

    #206763 Reply

    Riyad Kalla
    Member

    James,
    The autocomplete is currently fairly sensative to incomplete JSP pages and errors in the JSP page… for example, trying to get autocomplete in an open scriplet like <% |, will not work, but closing the scriplet and trying again will work.

    However, I usually have not seen this behavior w.r.t. to taglibs. Do you have any errors in your JSP page as you are editing? Can you narrow down the completion problems to just the html-el tags or the JSTL tags?

    #206784 Reply

    I got it working, but i am not sure what changed. I went back to the page and deleted all of the lines except for the

    
    <%@ taglib uri="struts-html-el" prefix="html-el"%>
    

    and was not command completion did not work. I then created a new page (File) in the same package named “a.jsp” and copied the previously mentioned line and magically, command completion worked! I then went back to the previous page and tried it again — and it command completion worked. OK, so somehow I “stimulated” ❗ the command completion into working.

    Any ideas?

    Signed happier, but still confused!

    #206793 Reply

    Scott Anderson
    Participant

    Just a thought, but there is some delay the first time completion is needed in a project because all the taglibs etc have to be parsed in the background to make the completions available. Perhaps while you “looked away” and created a new JSP the background process completed. You’ll have to determine based on what you saw and the delays if this suffices to explain it or not.

    #206797 Reply

    Riyad Kalla
    Member

    GSX,
    Scott is much too technical sometimes… we have added an AI to the code completion that sometimes just gets pissed off. Its possible you tried to use it while it was having a bad day. If this happens again, try complementing it and telling it how nicely it completes for you 😀

    (naturally this is meant as a joke)

    #207230 Reply

    You’re right! All I had to do was to tell the editor that it was the bomb and how well formed it was and then – bang it started to work. Talk about using cutting edge technology!!

    You guys 😛 just crack me up.

    Thanks for the laugh!

    #207234 Reply

    Riyad Kalla
    Member

    LOL, I hope its working now.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Code assists in JSP for taglibs [Closed]

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