facebook

What are the rules to add WebProject Capabilities [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #207386 Reply

    HI,

    I have an existing project to which I want to add WebProject Capabilities. This is the structure of my project:

    
    Nitido: is the root
    Nitido/src/java: contains all my java files
    Nitido/src/web/admin: contains my web app. The WEB-INF directory lies here
    Nitido/output/classes: compiled classes go here
    

    For usability purposes, I marked the web/admin directory as a source code directory in the build path. Why? Well, the way Eclipse works, all source code directories appear at the top of the package browser. All others appear way at the end. Since I’m contstantly working with both directories, I put the web-app directory in my build path, just to make it easier to find my files.

    Now, when I try to add WebProject support to my project, I get this error:

    
    !MESSAGE Cannot nest output folder 'Nitido/src/web/admin/WEB-INF/classes' inside 'Nitido/src/web'.
    !ENTRY com.genuitec.eclipse.j2eedt.core 1 1 May 24, 2004 00:15:25.509
    !MESSAGE WebProject Capabilities Error:
    !STACK 1
    Java Model Exception: Java Model Status [Cannot nest output folder 'Nitido/src/web/admin/WEB-INF/classes' inside 'Nitido/src/web'.]
    

    What does this mean and how do I correct my setup in order for it to work?

    BTW, this is a bug in MEI. When I use the dialog to add WebProject capabilities, and I press “Finish”, nothing happens. I don’t get a warning or an error message or anything. I had to look in the .log file to figure out what was happening.

    L

    #207388

    Riyad Kalla
    Member

    lduperval,
    Thank you for the report, *especially* the usability feedback (no error message). We need to be really strong in this area and get lucky that some of our users are savvy enough to check the log file, but we agree, you shouldn’t have needed to.

    Currently the project needs to be in the format of an exploded WAR file, please see this FAQ entry for help with an “optimal” directory structure for your project:
    http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#111

    From the looks of what you have, it should be quite easy to move your project into this strucutre (basically creating the WebRoot folder, and moving probably everything from /src/web and down into it). So you have a /src folder for Java code, and then your /WebRoot folder which is the base of your webapp which contains all the JSP files and resources for your webapp… just like an exploded WAR file.

    There is suppose for more flexible project structures comming, but it will take time for it to get in, so you may want to restructure the app for the time being.

    #207389

    Shoot! Unfortunately, I don’t dictate the project structure. I can move things around in Eclipse but if it affects the physical layout, it won’t do. I have to look at using soft links (on Linux) to see if I can make it match what MEI needs, without breaking our CVS structure.

    Thanks,

    L

    #207390

    Riyad Kalla
    Member

    I know other users have been in your position before and got it working just like you said (sym links) so I think that should work for you. Please let us know if you run into any specific problems and we will do our best to help.

    We are sorry for the inconvenience and will continue to work hard to get the flexible project structure support out the door.

    #207533

    I fixed up my environment to add all the links to support compiling. My eclipse now compiles my JSP’s but I have two things that don’t work as I expect:

    – The annotations don’t appear in the margin

    – I get a lot of errors that say:

    
    /home/laurent/devel/nitido/src/web/admin/en/index.jsp) not in base path (/home/laurent/devel/nitido/webroot/)    
    

    This is how my system is set up (a -> means a symlink):

    
    Project
    Projecr/src/java
    Project/src/web/admin/en
    Project/output/classes
    Project/webroot
    Project/webroot/WEB-INF
    Project/webroot/WEB-INF/web.xml -> Project/src/web/admin/WEB-INF/web.xml
    Project/webroot/WEB-INF/classes -> Project/output/classes
    

    When I added Web capabilities I gave my project root as Project/webroot and the context as /my-admin (which is the name of the war that is deployed on the server).

    What am i doing wrong this time? 🙂

    L

    #207534

    Sorry, didn’t see it was closed. I’ll open a new thread.

    L

    #207538

    Riyad Kalla
    Member

    Sorry, didn’t see it was closed. I’ll open a new thread.

    That was my fault, I was doing some spring cleaning on old threads and got a little overzealous yesterday. I’ve reopened this.

    – I get a lot of errors that say:

    Code:

    /home/laurent/devel/nitido/src/web/admin/en/index.jsp) not in base path (/home/laurent/devel/nitido/webroot/)

    If you made /webroot your webroot, then ALL of your JSPs need to be in it. If this is not a possibility, then you can upgrade to 2.8beta1 which allows JSPs outside of the webroot to be ignored.

    #207542

    Well, it may be doing too much compiling, but since I’m filtering out the “bogus” messages, it doesn’t bother me. Annotations works as well as syntax checking. Cool beans!

    L

    #207554

    Riyad Kalla
    Member

    Well, it may be doing too much compiling, but since I’m filtering out the “bogus” messages, it doesn’t bother me. Annotations works as well as syntax checking. Cool beans!

    Glad to hear it. BTW I was wrong about ignoring JSPs outside of webroot, that isn’t in 2.8 yet.

    Let me know if you want me to reopen this thread in the future.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: What are the rules to add WebProject Capabilities [Closed]

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