facebook

JSP Editor/Validator – problem detecting beans

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #212207 Reply

    maslovsky
    Member

    JSP validator does not detect beans created using struts <bean:define> and similar tags. It reports them as “cannot be resolved”. Beans defined using standard <jsp:useBean> tag are found properly.

    #212212 Reply

    henrikpdk
    Member

    Hi

    We are seeing the same thing on 2 different machines.

    One machine had 3.8.0-beta2 that was uninstalled and then installed with a fresh copy of eclipse 3.0 and myeclipse 3.0.8 GA.

    The other machine had 3.8.0-beta1 and myeclipse 3.0.8 GA was installed ontop of this. Same result.

    best regards
    Henrik Pedersen

    #212230 Reply

    support-michael
    Keymaster

    Thanks for the problem report. I have entered your comments into the MyEclipse issue tracking system for further research. We hope to respond very shortly to this issue.

    Regards

    #212248 Reply

    Scott Anderson
    Participant

    All,

    I’m trying to isolate this so here’s what I did. I have a struts JSP file and added the taglib declaration to the top as shown:

    
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
    
    
    
    And added a bean like below
    
    
    
    <bean:define id="nothingBean" type="com.genuitec.examples.bean.NothingBean"/>
    

    Validation works properly and finds the bean. If I change the type name to one that doesn't exist it is no longer found. From this, I'm going to guess that you're referencing beans in a dependent project. If that's the case, there is a bug that has already been entered related to building the classpath used for validation. The following thread documents the issue and provides a workaround for it. Please let us know if this resolves the issue for both of you.
    https://www.genuitec.com/forums/topic/jsp-validation-dependent-projects-closed/

    #212516 Reply

    maslovsky
    Member

    Try this:

    <%@ page language="java" import="java.util.Vector"%>
    <bean:define id="vector" name="vector" type="Vector" />
    <%
        int i = vector.size();
    %>

    The “vector” variable will be undefined. However this code works:

    <%@ page language="java" import="java.util.Vector"%>
    <jsp:useBean id="vector" type="Vector"/>
    <%
        int i = vector.size();
    %>

    I hope this hepls to find the source of the problem.

    PS: In both cases the import declaration is marked with a warning “java.util.Vector is never used”.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JSP Editor/Validator – problem detecting beans

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