- This topic has 5 replies, 2 voices, and was last updated 18 years, 11 months ago by cusdx.
-
AuthorPosts
-
cusdxMemberHi,
Would appreciate help with this problem I’m having with WebRoot.
I have a Netbeans project which I have imported into myEclipse. I want WebRoot to be the same as the project directory, ie everything is directly under the project and there is no WebRoot. I think I made a mistake when I created the project in myEclipse, which was that I forgot to delete “WebRoot” from one of the screens (not sure which.)
The reason for thinking this is that when I go into “Project Properties” and choose “MyEclipse-Web”, Web-root folder is shown as WebRoot – but I have no WebRoot (I probably deleted it).
My project builds OK (using the existing ant scripts) so I’m reluctant to start again, but the problems are that I get this warning:
Missing web.xml deployment descriptor in WEB-INF folder
and that the project won’t deploy via myEclipse – I have to manually drop the war into the Tomcat directory.
Zoe
Scott AndersonParticipantZoe,
I think I made a mistake when I created the project in myEclipse, which was that I forgot to delete “WebRoot” from one of the screens (not sure which.)
When the wizard runs you have the opportunity to set the web root to the project location, but if you miss this opportunity there’s not a way to modify it later through the UI. The only option is to either manually edit the .mymetadata file in the project or take the recommended approach of creating a new project with the correct webroot setting and moving your files over from your existing project. Either should work fine.
cusdxMemberHave manually edited the .mymetadata file and all is now well, thanks.
(New line reads like this, copied from another project:
<attribute name=”webrootdir” value=”/prjroot” />
)
cusdxMemberI notice that when I use myEclipse to do the deployment a lot of unwanted gubbins is deployed (the build dir, build.xml, the etc dir), presumably because the project folder is the WebRoot. Is there a way round this other than to rebuild the project and use a WebRoot dir?
I’ve created a new copy of the project using a WebRoot dir, but I’m running into problems with my JDO set-up. How can I configure myEclipse to put the necessary license files and property files in WEB-INF/classes when it deploys?
Scott AndersonParticipantIs there a way round this other than to rebuild the project and use a WebRoot dir?
You can right-click on the folders / files in the package explorer and set the ‘derived’ property to have the deployer ignore them, but using a webroot dir is more straightforward.
How can I configure myEclipse to put the necessary license files and property files in WEB-INF/classes when it deploys?
I covered that one in detail here: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10642-highlight-java+builder+classes+webinf.html
So, it should get you on the right track. 🙂
cusdxMemberPutting the config files in the source dir successfully got them deployed in WEB-INF/classes, thanks.
No joy with excluding unwanted directories from the deployment though – I clicked “derived”, did Project -> Clean, undeployed and redeployed the project (checking that the files were gone in the OS in between). Also tried restarting myEclipse but the files/dirs are stubbornly remaining.
-
AuthorPosts