facebook

defining webroot

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

    jeffhoran
    Member

    I am on an existing project where others are using lomboz and I would like to use ME. However, when I try to define the webroot it strips part of the path. How can I define the paths correctly?

    ProjectName
    src
    <includes>
    deploy
    web
    css
    main.css
    index.jsp
    WEB-INF
    jsp
    login.jsp
    struts-config.xml

    There are alot of references to img, css, javascript files with the path like “/web/css/main.css”, yet ME strips the “web” directory and puts the jsp, css, etc folders at the top level. How can i maintain the correct path with web/ at the top?

    thanks

    #252059 Reply

    jeffhoran
    Member
    
    ProjectName 
      src 
      *.jar 
      deploy 
      web 
        css 
          main.css 
        index.jsp 
        WEB-INF 
          jsp 
            login.jsp 
          struts-config.xml 
    ... 
    
     
    

    Sorry, my spaces didn’t show up. You need them to understand the directory structure.

    #252065 Reply

    Scott Anderson
    Participant

    Jeff,

    The issue is that your web root is the ‘web’ directory since this is the directory that is organized like an exploded WAR. The problem you’re having is that the way it was packaged before included the ‘web’ directory in the packaging structure. That can work, but it isn’t really correct for an exploded war.

    One of two things cat get this working. First, you could do a search / replace for all instances of “/web/” and change them to “/” so that your links are now like “/css/main.css” and specify ‘web’ as your web root for MyEclipse. Another option would be to add an additional folder that is also called ‘web’ above the existing ‘web’ folder and specify this new folder as your web root in MyEclipse. That way, the existing ‘web’ directory will be preserved in the deployment so the current paths will work. Of the two, I like the first selection, personally. To test either one out, I’d suggest you make a copy of your project and experiment on the copy to determine what works best for you.

    #252067 Reply

    jeffhoran
    Member

    The problem with the first is that others are using lomboz and this tree works for them. The problem with the second is again it changes the structure. But if it only changes the .project file then I may be able to ignore it in cvs.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: defining webroot

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