- This topic has 11 replies, 4 voices, and was last updated 11 years, 11 months ago by zipc.
-
AuthorPosts
-
Scott HamiltonMemberNOTE: this worked in Tomcat 6.0.x but in 7.x they have desupported this (per the JSP 2.x specification). I’ve got a tomcat users thread started on that end to see if we can find a Tomcat-specific solution, but wanted to post here to make sure I wasn’t ignoring a possible MyEclipse solution.
We have several Java projects that contribute to a Web project – all are in active development. Some of the Java projects contribute TLD files by putting the TLD in the classpath in the /META-INF folder.
When these projects are built for production, the Java projects are JAR’ed up and placed in the web application’s WEB-INF/lib, and the TLDs are picked up just fine.
However, for development, we’re using the exploded deployment with Smart Deployment so that the Java projects are getting exploded as well under WEB-INF/classes. We’re doing this because we want minimal overhead with hot-swapping classes in the live JVM during development.
This means, however, that the TLD files are also being put (while we’re developing with MyEclipse) under WEB-INF/classes, which as I said is not supported.
SO: within MyEclipse, what are my options here? Is there a way we can have a taglib project that contains its own TLD that gets contributed to the web application in a way that still will allow seamless hot-swap of java classes to the deployed image and the JVM? Other options?
What I most definitely do NOT want to do is copy the TLD into other projects – that would be code duplication and subject to all the ills and pitfalls thereof…
Thanks in advance,
Scott
support-joyMemberScott,
Can you share a sample project to help me investigate this issue. Please send a mail to support@genuitec.com with your sample project, add this weblink as a reference and add ATTN:Joy in the subject.
MalteBMemberHi,
i run into the same issue. Is there already a working solution around?
Regards
Malte
support-joyMemberMalte,
I am afraid, I don’t have a project to investigate this issue. Could you please send a mail to support@genuitec.com with a sample project referring to the issue you are facing including the steps to replicate. Please include your installation details. Here is the FAQ to retrieve installation details – https://www.genuitec.com/forums/topic/troubleshooting-how-to-view-the-installation-details/&highlight= . Please add a reference of this weblink and include ATTN:Joy in the subject.
MalteBMemberHi Joy,
it is quite easy to get the issue, you just need 2 projects. 1 web project and one standard java project for instance. The Java project contains Tag classes in a source directory and a tld file in a META-INF directory (alike jar structure). Both directories are added under Project Properties/Java-Build-Path/Source. So that they get compiled/moved into a…classes directory which has the exploded structure of a jar file containing Tag classes with tld file in META-INF directory.
Now if you include this project into the web project (exploded not jared) and let it get deployed into a tomcat the exploded structure is under WEB-INF/classes/<compiled classses> and WEB-INF/classes/META-INF/<tld files>. And with tomcat 6 the tomcat treated this structure as a jar as it was in the lib directory and was able to resolve the tld. With tomcat 7 the tomcat is not able to find the tld out of the box anymore.
So it seems for Tomcat 7 some virtual META-INF directory configuration is needed.I hope this helps you to understand the problem.
Regards
Malte
support-joyMemberMalte,
I shall investigate and get back to you on this. Thanks for the steps to reproduce.
Best
support-joyMemberMalte,
Sorry for the late reply. I have investigated and I am afraid, I cannot replicate this issue. Please see the attached screenshot.
Best.
Attachments:
You must be logged in to view attached files.
MalteBMemberHi Joy,
yes the deployment itself is not the problem. When starting Tomcat 7 now the tld is not loaded into hte web container and so JSP referencing Tags from that tld do not work. With Tomcat 6 it works.
Regards
Malte
support-joyMemberMalte,
I could go on trying but without the actual script it would be lot of trial and error and would be time consuming too. Would you be kind enough to send a sample project along with the steps to reproduce to support@genuitec.com , please include a reference of this post and add ATTN:Joy in the subject for quick tracing.
MalteBMemberJoy,
thanks for your help. Unfortunately i do not have the time to create a sample project.
So my team has to live with this drawback until we have found a better solution for us.Kind regards
Malte
zipcMemberscotthamilton77, I’m having the exact same problem you describe with Tomcat 7 & MyEclipse in dealing with TLDs not being found under the META-INF folder. Did you every find a solution?
zipcMemberI ran into this exact same issue. My solution was to move my tld files to a tld folder under my WEB-INF. Tomcat was able to find it there.
-
AuthorPosts