For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 3 replies, 2 voices, and was last updated 21 years, 9 months ago by
Riyad Kalla.
-
AuthorPosts
-
spytek_98MemberHi there,
I’m migrating from JBuilder to MyEclipse.
I’m sure that this question has been asked before, sorry… I just want verify it. 🙂
The existing project structure looks something like this:
/Parent
—–+src
——–+java
—–+lib
—–+WEB-INF
——–+classesVery close to the WAR structure, just with the _lib_ in the parent.
Problem:
———-
I want to use the existing jars (this is including struts, common-logging etc) found in the /parent +lib folder, rather than the ones created in WEB-INF\lib when adding Struts Capabilities?Scenario
———-
I have created a Web Project with Struts Capabilities (include struts jars), and added the external jars from the /parent +lib folder into the java build path. Then I deleted the MyEclipse struts jars out of WEB-INF\lib, thinking that MyEclipse would use the ones found in /parent +lib. Unfortunately the Web project didnt run in Tomcat.The only way I can get the project to run successfully in Tomcat is to copy the MyEclipse Struts jars back into WEB-INF/lib folder?
Is there a way to get MyEclipse to reference the ones in the /parent +lib rather than using MyEclipse struts jars in WEB-INF/lib?
Thanks
S98
November 23, 2004 at 9:40 am #219877
Riyad KallaMemberS98,
Is there a way to get MyEclipse to reference the ones in the /parent +lib rather than using MyEclipse struts jars in WEB-INF/lib?
The problem isn’t MyEclipse, its Tomcat, and its not really a problem but a specification requirement. The web app spec denotes the following structure (mandatory)
/webroot /WEB-INF /classes /libIf your web application requires libraries at run time, they MUST be in a directory called ‘lib’ under your WEB-INF directory. MyEclipse doesn’t do any translation at deployment time (currently, but we will offer it in the future) so its a direct copy of your project from MyEclipse to your app server… in your case you are not following the web app spec so when MyEclipse copies out your project to the app server, and the app server tries to run your application its like “What the heck is this? Where are all the libs?” and dies.
So when you were asking above if you can get ME to use your libs instead of its default lib location, the answer is that “MyEclipse uses whatever libraries you put into your Java Build Path, the issue here is when it gets deployed your libs are in an illegal location, so Tomcat can’t pick them up”.
Did that help?
November 24, 2004 at 1:20 am #219934
spytek_98MemberSorry I didnt make myself clear… I understand that lib’s need to be in folder under WEB-INF… when deployed ie to Tomcat. But they don’t be need stored that way in your myeclipse project ie jars that maybe shared among other projects would be placed in a shared folder and these jars referenced within your myeclipse web project (add external jars).
I have worked it out, Select the MyEclipse-Web page, make sure “Always jar referenced Java projects and place in the ‘lib’ directory when deploying” and “Always deploy external libraries and place in the ‘lib’ directory when deploying” are selected.
Thus no need to have the libs under MyEclipse Web Project and keeping to the original project structure.
Sound correct?
S98
November 24, 2004 at 7:33 am #219944
Riyad KallaMemberS98,
Yes this does sound exactly right… also in 3.8.3 you will be able to make these libraries User Libraries and MyEclipse will be able to deploy them as well, so that is another way for you to work with this situation as well. -
AuthorPosts
