facebook

JSP code completion problems

  1. MyEclipse Archived
  2.  > 
  3. Old Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #196338 Reply

    lazarus60
    Member

    I’m having a problem with the JSP code completion. It seems that whenever there’s an include tag in a file the code completion doesn’t work for the whole file. Now maybe I’m doing somethin wrong but I’ve removed the include tag to find that it does work and then put it back to find it’s broken again.

    Any suggestions?

    Also, for some reason I get an error about the JSP compiler not being able to load a class file for my custom tag library. I know it’s in the classpath, I can do code completion to it. It’s causing many many many errors.

    Here’s the actual error

    Error in included file myInclude.jspf (1): cannot load class: com.myDomain.taglib.ListTei

    thanks in advance,

    lazarus60

    #196339 Reply

    Scott Anderson
    Participant

    Lazarus60,

    It seems that whenever there’s an include tag in a file the code completion doesn’t work for the whole file.

    That’s interesting. I’ve entered it into our internal defect tracking system for followup. Our engineers will either fix or refute it. 🙂

    Also, for some reason I get an error about the JSP compiler not being able to load a class file for my custom tag library. I know it’s in the classpath, I can do code completion to it. It’s causing many many many errors.

    Version 2.0.3 of enterprise workbench requires a little bit of special setup for taglibs, which will be fixed in the next release. For a full description of what’s required, please see this thread:
    https://www.genuitec.com/forums/topic/custom-tag-are-not-found/

    If you’re still having problems after reviewing these suggestions, let us know specifically what the layout of your projects is and how they reference your taglib and we’ll see what we can figure out.

    –Scott
    MyEclipse Support

    #196344 Reply

    Scott Anderson
    Participant

    It seems that whenever there’s an include tag in a file the code completion doesn’t work for the whole file.

    That’s interesting. I’ve entered it into our internal defect tracking system for followup. Our engineers will either fix or refute it. 🙂

    We investigated this issue and can explain it as follows:
    All completions work as expected. Tested with
    <%@ include file=”somefile.jsf” %>

    <rule>
    Java code completion will not work if there are errors in the code.
    <exception>
    It may still work, if the error(s) occur after the completion location.
    </exception>
    </rule>

    As mentioned in the thread, the reporter has also compilation errors in the include file. Applying the rule shows, why the completion is not working in this instance.

    –Scott
    MyEclipse Support

    #196367 Reply

    lazarus60
    Member

    Ok, so that explains my code completion problem but what about the class loading problem?

    I have my environment setup as closely as possible to what was in that forum post you linked me to.

    I have web.xml and my *.tld file available to MyEclipse and it successfully find s them. It then try’s to load the classes found int he *.tld file and fails. I get these errors when it does the include (that has the taglib reference in it) and whenver a tag from the taglib is used. The error, again, is

    cannot load class: com.myDomain.taglib.myTag

    I also noticed that it seems it’s having difficulty loading classes used in <jsp:useBean> tags (same error as above). I don’t know why it can’t load all of these classes, I can code complete to every single one within a JSP without the broken include.

    Is there some JSP classpath setting I’ve overlooked or something?

    #196369 Reply

    Scott Anderson
    Participant

    One thing to look into, failure to load a class (A) can be caused by failure to load another class (B) upon which the first class (A) is dependent. Does your tag use any other classes or libraries that aren’t on your project’s classpath?

    –Scott
    MyEclipse Support

    #196428 Reply

    Scott Anderson
    Participant

    All issues documented here were addressed in MyEclipse 2.1.1 EA2.

    –Scott
    MyEclipse Support

    #196441 Reply

    Anonymous
    Member

    it’s been a week and I finally have time to look at this problem again.

    I can’t find any reason why the tag libraries shouldn’t be able to be loaded.

    If I try to reference the taglib from the jsp I get the same error.

    <%@ taglib prefix="myTags" uri="/WEB-INF/tags.tld" %> 

    gives me this error

    cannot load class: com.myDomain.taglib.ListTei

    the class com.myDomain.taglib.ListTei is referenced from the tags.tld and is a part of the <teiclass> tag in there. If I remove that reference I lose that error but whenever I use any of the custom tags I receive it again with a different class it cannot load. The class it can’t load is the one found in the *.tld file that the tag in question uses.

    I have also noted that the <jsp:useBean> fails to load any of my custom bean classes, same error, different class.

    I can do tag completion still though.

    Any other suggestions on how to fix this?

    Oh, I’m using EA2.

    -Laz

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSP code completion problems

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