facebook

JSP Tags not recognized in 3.8.1 [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 16 total)
  • Author
    Posts
  • #213154 Reply

    Erez
    Member

    The tag completion does not work for tags that are imported in an commonly included JSP file.

    To demonstrate the problem:

    a.jsp:
    ========

    <@ include file="../common/commontags.jsp">
    
    <c:forEach...>
    => Completion will not work here for <c:..> tags.
    ...

    commontags.jsp
    ============

    <%@ taglib uri="/tags/jstl/core" prefix="c" %>

    Thanks,

    Erez

    #213204

    Scott Anderson
    Participant

    Erez,

    I believe you’ll find that this issue was addressed by the 3.8.1 quickfix available here:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-3517.html

    #213229

    Erez
    Member

    great, nice work!

    Erez

    #213660

    hbtaylor
    Member

    @support-scott wrote:

    Erez,

    I believe you’ll find that this issue was addressed by the 3.8.1 quickfix available here:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-3517.html

    I have deployed this QuickFix, and I still get a whole bunch of “unknown tag” messages. I have the following line in the JSP:

    
    <%@ taglib uri="/WEB-INF/tlds/dmform_1_0.tld" prefix="dmf" %>
    

    All of the “dmf:” tags are underlines with an “unknown tag” message. I can verify that the Version Number in Window->Preferences->MyEcplise is “3.8.1+QF20040824”, so I know the QuickFix is there.

    H.B.

    #213672

    Scott Anderson
    Participant

    H.B.

    Did you rebuild or revalidate the project?

    #213678

    Riyad Kalla
    Member

    H.B.,
    The taglib URI is not a URL, it is an identifier that it matched against the URIs you have in your web.xml file OR against the default URIs that the taglib defines itself (if it is stored in a JAR file). In the code snippet above you are using it like a URL in that you are providing a literal path to it. That is the purpose of the <taglib-location> entry in your web.xml file, the idea being that map an identifier to a location in your web.xml file and then in your pages you use the identifier to get at the taglib.

    So you may want to do something like this:

    web.xml:

    
    <taglib>
      <taglib-uri>/tags/dmform-1.0</taglib-uri>
      <taglib-location>/WEB-INF/tlds/dmform_1_0.tld</taglib-location>
    </taglib>
    

    somepage.jsp:

    
    <%@ taglib uri="/tags/dmform-1.0" prefix="dmf" %> 
    

    Actually you could probably copy-paste what I gave you above assuming I typed it all correctly and it should work.

    #213682

    hbtaylor
    Member

    @support-scott wrote:

    H.B.

    Did you rebuild or revalidate the project?

    It was set to build automatically, so I set it to manual. Building (or Cleaning) had no effect. I applied the 0825 QF, and it also had no effect.

    H.B.

    #213697

    Riyad Kalla
    Member

    Did you make the changes I suggested? If so or if not, what are your taglib entries in your web.xml file? Where are your TLDs located? Where are the classes for those TLDs located?

    #213726

    hbtaylor
    Member

    @support-rkalla wrote:

    Did you make the changes I suggested? If so or if not, what are your taglib entries in your web.xml file? Where are your TLDs located? Where are the classes for those TLDs located?

    I’ll take a look tomorrow, when I’m using that machine, but one thing I think I should point out is that only in the Editor does it think it can’t find the tag libraries. When I run the application, the tags and their classes are found just fine. This is a Documentum Webtop-based application, and it is just when I open the files in MyEclipse that I get any unexpected results. I can use the application without any problems, but the Editor stil lshows that it doesn’t know about the tags. If that points me toward some other configuration within Eclipse/MyEclipse, that is great, but the application configuration itself is correct (IMHO).

    But, as I said, I’ll take a look for anything unexpected, but since we’re just adding configuration/customization to the existing framework, I’m not really that inclined to dig that deeply into any changes to code that is a part of their product.

    Thanks,

    H.B.

    #213748

    Riyad Kalla
    Member

    When I run the application, the tags and their classes are found just fine.

    This is a “spec vs real-life” thing. All we can do is follow the spec, in real life you might find that 1/2 of the app servers resolve the URI fine and the other 1/2 don’t.

    If that points me toward some other configuration within Eclipse/MyEclipse, that is great, but the application configuration itself is correct (IMHO).

    Actually you could just add <taglib> entries to your web.xml file that map the URI and location to the same value (/WEB-INF/tlds/dmform_1_0.tld), so you don’t need to change your JSPs at all. So your URI just happens to be the same string as the actual location (URL) of the taglib, that should work. If you do that and it STILL dosen’t work, then yes its a bug and I will file it and we will get it fixed ASAP.

    I’m not really that inclined to dig that deeply into any changes to code that is a part of their product.

    I definately understand that, try the little trick above, it should be the quickest way to ‘make things right with the world’ technically and mentally.

    #213755

    hbtaylor
    Member

    @support-rkalla wrote:

    Did you make the changes I suggested? If so or if not, what are your taglib entries in your web.xml file? Where are your TLDs located? Where are the classes for those TLDs located?

    I tried it this morning. I put your suggestions into a sample page, but it had no effect. After I pasted the appropriate information into the web.xml and changed the taglib uri in the sample JSP, I closed and reopened the JSP as well as cleaned and rebuilt the project, and the tags in the taglib were still flagged as not found.

    As I said in a previous message, the weird thing is that the tags ARE working correctly when I run the application, but are flagged as unknown in the editor.

    I’m willing to ignore it, since the pages are functioning correctly, but the editor “crying wolf” on the gutter of the editor frame will make it had to find ACTUAL problems in the code. The nature of my work on this particular app doesn’t make this a huge issue, but I wanted to raise the issue as I saw it.

    Thanks,

    H.B.

    #213762

    Riyad Kalla
    Member

    Thank you for trying this is a sample app, the next thing to figure out is where are the classes that implement those taglibs? Are they in your classes dir or are they in a JAR in the project somewhere?

    Are the JARs downloadable publically? I’d like to play around with them to see whats going on. I’d rather give you a concrete working example instead of suggestions 😉

    #213791

    hbtaylor
    Member

    @support-rkalla wrote:

    Thank you for trying this is a sample app, the next thing to figure out is where are the classes that implement those taglibs? Are they in your classes dir or are they in a JAR in the project somewhere?

    Are the JARs downloadable publically? I’d like to play around with them to see whats going on. I’d rather give you a concrete working example instead of suggestions 😉

    The classes referenced by the TLDs are in the WEB-INF/classes tree, exploded (not in a JAR). I don’t believe that the JARs are publicly downloadable. What I may do this weekend is create a new Project which isn’t based on this particular application, and see if I get the same behavior with a tag library I create for it. I’ll pass along the results after I do that.

    H.B.

    #213793

    Riyad Kalla
    Member

    Cool, thanks H.B.

    #213815

    hbtaylor
    Member

    It is time for me to feel stupid. I created a new Web Project and looked at it. It worked just fine, so I started looking for reasons WHY it would be different. I noticed that in the Project Properties, there were extra Builders associated with the new project. I looked around a bit and asked myself, “Did you ever add Web Project Capabilities to this project?”. Since the answer was No, I did so, and the taglibs are “miraculously” recognized now, both in the gutter and for Value Assistance. I wish I would have looked at that sooner.

    Therefore, I didn’t have to modify the taglib URI’s or the Web XML. I just had to let MYEclipse have the tools it needs to do its job.

    I think it is time for a weekend!

    Thanks,

    H.B.

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: JSP Tags not recognized in 3.8.1 [Closed]

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