facebook

how to change WebRoot?

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #243420 Reply

    cusdx
    Member

    Hi,

    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

    #243433 Reply

    Scott Anderson
    Participant

    Zoe,

    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.

    #243513 Reply

    cusdx
    Member

    Have 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” />
    )

    #243522 Reply

    cusdx
    Member

    I 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?

    #243561 Reply

    Scott Anderson
    Participant

    Is 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. 🙂

    #243587 Reply

    cusdx
    Member

    Putting 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.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: how to change WebRoot?

You must be logged in to post in the forum log in