- This topic has 4 replies, 4 voices, and was last updated 20 years, 3 months ago by maslovsky.
-
AuthorPosts
-
maslovskyMemberJSP 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.
henrikpdkMemberHi
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
support-michaelKeymasterThanks 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
Scott AndersonParticipantAll,
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/
maslovskyMemberTry 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”.
-
AuthorPosts