facebook

Bogus red X in JSP file

💡
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. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #242302 Reply

    fermataintl
    Member

    In a web project that I have, there is an error indicated in one of the JSP files, which shows up as:
    cannot access fi.els.tags.SpacerTag: bad class file : C:\Documents and Settings\Dean\My Documents\EclipseWorkspace\workspace\banfordsports\WebRoot\WEB-INF\classes\fi\els\tags\SpacerTag.class

    The tag class has compiled without errors. It is located in the path shown in the jsp error. I deployed to tomcat 5 and
    it works.

    I am using Eclipse SDK 3.1.0, MyEclipse 4.0.3GA Build 20051025, Java JDK 1.5.0_05 on windows XP.

    Here’s my tld file (els.tld):

    <?xml version="1.0" encoding="UTF-8"?> 
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> 
    <taglib> 
    <tlibversion>1.0</tlibversion> 
    <jspversion>1.1</jspversion> 
    <shortname>els</shortname> 
    <tag> 
    <name>spacer</name> 
    <tagclass>fi.els.tags.SpacerTag</tagclass> 
    <attribute> 
    <name>width</name> 
    </attribute> 
    <attribute> 
    <name>height</name> 
    </attribute> 
    </tag> 
    </taglib> 

    the jsp file looks like this (abbreviated):

    <?xml version="1.0" encoding="UTF-8"?> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> 
    <%@ page isELIgnored="false" %> 
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> 
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> 
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> 
    <%@ taglib uri="/WEB-INF/els.tld" prefix="els" %> 
    ... 
    <td><els:spacer width="220"/></td> 
    ... 

    If the resolution to this problem has been discussed elsewhere, I apologize, I did not find it. Thanks for any help you can provide.

    Dean

    #242321

    Riyad Kalla
    Member

    Dean,
    First try cleaning/rebuilding your project. If that doesn’t work, try restarting MyEclipse and cleaning it. Sometimes the TLD cache will become stale and not update correctly so it’s possible to get erroneous TLD errors while developing a taglib.

    #242330

    fermataintl
    Member

    I did the clean/rebuild, did not work. Restarted and its still there.

    Dean

    #242332

    Riyad Kalla
    Member

    Is this project somethign you can share so I can take a look at it and see what might be happening? If so, please export it to a ZIP and email it to support@genuitec.com ATTN Riyad with a link to this forum so I know why I’m getting the file.

    #242345

    Riyad Kalla
    Member

    I got your file, imported it into MyEclipse and noticed a broken dependency on the Common Java project. I removed that, then commented out all references to Text in the Tooltip tag class, after that the project was fine, no errors. I opened the Home.jsp file and got autocomplete with the <els> tag just fine, the file also validates without any problems.

    Try creating a new web project, and copying all your resources from your banfordsports project into it into the appropriate locations, does everything work? Validation error go away?

    Also try restarting Eclipse using the -clean command line argument.

    NOTE: When I Mentioned cleaning your project, you need to make sure that Window > Prefs > General > Workspace > Build automatically is turned on for it to rebuild.

    #242358

    fermataintl
    Member

    If I understand your directions, I did all that and it is still broken. I totally removed the original project. I created a new MyEclipse web project. I went to the folder that I had exported to send to you and dropped in resources (including the dot files). Back to square one.

    Dean

    #242370

    Riyad Kalla
    Member

    I know this is going to turn out to be something silly, I can already tell.

    Tell me everything you have in your Java Build Path on your Libraries Tab please.

    #242386

    fermataintl
    Member

    This is really strange. I turned off JSP validation at the menu level. The red X went away. Then I turned it back on and it did not come back. How is validation kicked off?

    Dean

    #242388

    Riyad Kalla
    Member

    Dean,
    The clean cycle i had you run through should have removed any stale markers, I guess it didn’t. But doing what you did likely removed the stale marker which was harmless, all should be right with the world again.

    VAlidation is part of the build cycle.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Bogus red X in JSP file

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