- This topic has 19 replies, 5 voices, and was last updated 19 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
myoungstromMemberI just downloaded and installed 3.8 and it appears the new .jsp editor gives me an error when attempting to access a class loacated in a different project.
I have my web project referencing the dependent project and the desired classes appear in my code assistent but the post save compiler can’t seem to find them.
Mike
Scott AndersonParticipantMike,
You’re right. I’ve reproduced this problem and entered a bug report. It appears the JSP validation is not properly adding dependent projects to the classpath before compiling. We’ll get it in 3.8.1 or a quickfix. In the meantime, you can either ignore the error or turn off JSP validation for the project in question and then manually invoke it when you want to test a file or a directory. Sorry for the inconvenience and thank you for pointing out the problem to us.
Scott AndersonParticipantMike,
I did find a workaround to this. In your web project, you can add the “bin” folder of your dependent project to the classpath by right-clicking and selecting Properties > Java Build Path > Libraries > Add Class Folder…
This will allow the validator to find the java classes you’re referencing in your JSP just like the deployer does
myoungstromMemberok, I’ll do that.
Thanks,
Mike
myoungstromMemberOn a similar note. The taglibs don’t seem to be recognized if they are:
* in the Build Path Libraries.
* in a referring project with the taglib in the /META-INF of the src folder
* added as a class folder of a referring project with the taglibs in the META-INF of the src folder.It seems the main case that works for me is if the taglib project is jared and placed in the /WEB-INF/lib of the Web Project. It would probably work (though I have not tired it) if I placed the .tld in the WEB-INF directory.
The middle case didn’t work very well with the old .jsp editor either but now it continues to not work on a more consistent basis. 🙂 Any ideas?
Mike
Scott AndersonParticipantMike,
The first case, in the build path libraries, is the default for all our struts projects and that works fine in my build. Can you be more specific as to exactly how the library is configured that you’re seeing problems with?
Cases 2 & 3 are not surprising, as they’re definately not supported, yet. In order to properly characterize these cases, do you have a couple small example projects that you could zip and send to me so I can post it as an attachement to the bug report? If you can, just send it to [email protected] and include a reference to this thread and I’ll be sure it gets into the next release.
myoungstromMemberJust a side note. I tried it with my .tld in the WEB-INF and accessing it using <%@ taglib uri=”” %> and adding a classpath folder for the project that contains the classes for the taglib. Although the error goes away when I do this the .jsp won’t auto complete the taglib for me and if I manually type in a tag from the tag lib then it has a yellow underline.
Mike
myoungstromMemberMade my second post before I saw you’re prompt reply. 🙂 I’ll create a few cases for you and sent them you’re way.
Mike
Scott AndersonParticipantMike,
That will be great. When we put in dependent project support, I don’t think anyone envisioned that someone would put their taglibs in it. The main thought was for frameworks, libs, utilities, common junk, etc — not web-related stuff. A good set of test cases can help us grow that functionality a bit.
myoungstromMemberI just retested case 1. And I’m quite sure it does not work. I believe the difference between case 1 and the way you’re doing struts and jsf support is that when I add struts to my web project then it adds the struts jars to the WEB-INF/lib directory and those libs get put in your build path if you have J2EE set to automaticly add all libs in your WEB-INF/lib directory to your build path.
The case where the first case I listed above doesn’t work is when only adding a .jar to your build path and not to your WEB-INF/lib directory.
Mike
myoungstromMemberScott,
This is just a quick post to see if you got my test cases and were able to verify the first case above?
Mike
Riyad KallaMemberMike,
I confirmed that we got them and the team says “Thank you they are very helpful!”We really appreciate the help.
Scott AndersonParticipantThe issues discussed in this thread were addressed in MyEclipse 3.8.1
Armen YampolskyMember@support-scott wrote:
The issues discussed in this thread were addressed in MyEclipse 3.8.1
In 3.8.1, JSP’s do not see packages or classes in EJB projects on which they depend. The workaround described above is still required, and this issue should not be considered closed.
Riyad KallaMemberDuely noted.
-
AuthorPosts