facebook

Allow webroot to be part of directory structure

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #252100 Reply

    jeffhoran
    Member

    When trying to use ME on a project that is using another ide, the dir that ME would consider as the webroot is not included in the war file as part of the path, whereas other ides allow it.

    Please add a checkbox next to the webroot input field to allow me to include it in the tree stucture of the war file.

    That way a project tree structure can be independent of the ide used. And more specifically, I can use ME interchangeably with Jdeveloper and lomboz.

    #252136 Reply

    Riyad Kalla
    Member

    Jeff can you better describe your project layout? Your “WebRoot” folder is intended to be the root of your web application when it’s deployed. NetBeans, Sun Studio, JBuilder, WTP and many other IDEs all share this same concept. It’s possible you could just be using this in a manner we didn’t think of or misusing it with the other two plugins you are using?

    #252154 Reply

    jeffhoran
    Member

    I’ve joined a project that is not using me, and of course I would like to use me. the dir structure looks like:

    
    ProjectName
        src
        web
            css
            img
            js
            jsps
            WEB-INF
                lib
                ...
    

    When I load the project from cvs and designate the web root folder as “web”, then all of the references to css, js, img files are no longer valid,

    
     ie. <TD align="left" valign="top"><IMG src="/web/img/clear_dot.gif" alt="" width="1" height="3" border="0">
    
    

    therefore I can’t integrate with an existing project with this kind of dir structure. Or else I am not setting the webroot right.

    #252160 Reply

    Riyad Kalla
    Member

    Jeff your project and your assessment that “web” is your webroot are actually all exactly right. The reason your paths like your IMG example above don’t work is because of how you are deploying your app and how the browser resolves the path, this isn’t a problem with you or your project setup.

    Let’s say your domain is http://www.jeff.com, from your example above of “/web/img/clear_dot.gif” for your image, that means you have to have an image at http://www.jeff.com/web/img/clear_dot.gif

    however, when you setup your project as a web project, chances are when you were asked for a web context root you had something like /myapp in there. So this actually gets deployed to the “myapp” dir under your Tomcat webapps directory.

    So your GIF will be here: http://www.jeff.com:8080/myapp/web/img/clear_dot.gif

    If you change your web context root to just /, MyEclipse will deploy it as the root app, so it will be here:
    http://www.jeff.com:8080/web/img/clear_dot.gif

    and if you want to run your server on port 80, then your path will look like this:
    http://www.jeff.com/web/img/clear_dot.gif

    hope that helps clarify things.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Allow webroot to be part of directory structure

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