facebook

Multiple Web Root for the same project

💡
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 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #207705 Reply

    chadmuco
    Member

    I need to know if you can specify multiple web root directories. I
    have some jsp’s that are generated and some that have to be hand
    coded. I need to put the generated ones in another directory so that
    I can make CVS ignore them.

    Can this be done?

    #207714

    Riyad Kalla
    Member

    chadmuco,
    Not currently. but depending on what your problem is right now, there may be multiple ways to solve your problem with the current and future beta releases. For example, if your problem is that MyEclipse marks JSPs outside of the webroot as errors, then Beta 2 of 2.8 should take care of this for you.

    If you would better describe your situation, we can see if MyEclipse can be organized to work for you. Some people, with more elaborate setups, have had a lot of success using sym links (Supported on NTFS as well) to get around some current limitations.

    #207725

    chadmuco
    Member

    Thank you for your response. I did not think about sym links on Windows. I always get it stuck in my head that I can only do useful stuff like sym links with a real operating system. 🙂

    The root of my situation is generated code. In my project I have the follwing directories

    src
    src-gen
    test
    web
    ….

    Putting the generated java code into the src-gen is easy. I just have to add it to the Eclipse class path and put src-gen into the cvsignore. Both src and scr-gen have the same package structrue, so to the class path they look the same.

    Ignoring jsp’s is another story. I would like to create something like web-gen and have my generator put all the jsp’s in that directory. Like the src-gen directory it would have the same package structure as the web directory. I would then tell Eclipse that the web root directory is web and web-gen, and tell cvs to ignore web-gen.

    Another issue is that I want to use the app-server deployment functionality in MyEclipse, and I want it to deploy both web and web-gen.

    Thanks again,
    Chad

    #207729

    Riyad Kalla
    Member

    Thank you for your response. I did not think about sym links on Windows. I always get it stuck in my head that I can only do useful stuff like sym links with a real operating system.

    Check out this article on how to do it in NTFS: http://gethelp.devx.com/techtips/nt_pro/10_minute_solutions/10minNT0401-2.asp

    Ok, based on what you said I figure we are shooting for something like this:

    
    src <-- Java source
    src-gen <-- Java source, generated
    test
    web <-- Webroot
    web-gen <-- Webroot, generated
    

    Is this correct?

    I would then tell Eclipse that the web root directory is web and web-gen,

    Hrrmm… I don’t know what to say here. AFAIK we don’t support this, and didn’t have plans to support multiple webroots, but I’ll ask someone else to look at this just incase there is some solution I’m missing.

    Another issue is that I want to use the app-server deployment functionality in MyEclipse, and I want it to deploy both web and web-gen.

    Ahh jeez, you just have to have it all don’t you? :D, ok we definately don’t do this, but I imagine the answer to this one is tied into the answer from the question above it. I’ll see if one of the other support guys knows.

    #207741

    Scott Anderson
    Participant

    The only way I can think of to resolve this would be to make your two ‘web roots’ subdirectories under a top-level web root. Then, tell cvs to ignore one of them. The unfortunate side effect of that is that the url-pathing will be messed up unless you fix it using aliasing like in struts or something.

    #208092

    chadmuco
    Member

    Rkalla and Scott,

    Thank you for your help. I will look into the sym link option. I thought about having one parent web root then a few subs, but like you said did not want to have to alter my deployment with alias stuff.

    Trying to have it all, 😀
    Chad

    #208097

    Riyad Kalla
    Member

    Trying to have it all,

    Hah, no problem, we all are.

    #255597

    Hi there,

    I have have the same requirement – I’d like to have multiple web roots in the same project. NT sym links aren’t really an option, as they aren’t supported well by subversion. And is mentioned here, one web root with two sub-dirs isn’t really ideal either.

    As this topic is a few years old, I just wanted to ask if this is now supported in MyEclipse?

    Cheers,
    Charles

    #255599

    Riyad Kalla
    Member

    Charles,
    This is not supported and most likely won’t be supported and it adds a level of complexity that (I don’t think) is necessary except in custom project layouts.

    What is your requirement such that you *need* to have 2 webroots? Maybe I’m missing a good use case.

    #255605

    Thanks for the speedy response Riyad,

    We have a web application which we customize for each client we bring on board. However there are commonalities between all the web applications as well (some customers request more customisation than others). We would like to create a seperate web project for each customer, but have the ability to pull in jsps, javascript, images, etc from a single “shared” project as well.

    Cheers,
    Charles

    #255627

    Riyad Kalla
    Member

    Charles,
    Ahh, this has been requested a few time over the years. We offer it now with code by way of a “dependent Java Project” but as you and others have pointed out, the need to do it with web-assets as well is important. THis is still filed for enhancement and from time to time we discuss how to “Do it right” so that people aren’t surprised are freaked out when they create two dependent web projects and the end result may be something they weren’t expecting. This also opens a black box of requests: What order do you deploy the projects in? Should filter resources from one and not the other? Which web.xml file do you use? so on and so on. Each time we dig into this problem there are so many questions thrown onto the table that we get nervous and back off of it. I will bring this up again for discussion.

    #260645

    tunverferth
    Member

    I have a similar situation where I have 1 core web project and many custom client web projects. To deploy the application for any client I currently have to use an Ant script to deploy the core web project and then use MyEclipse to deploy the custom client web project on top of the core web project (just check overwrite when deploying). Is there a way to do this without the Ant script or will I just have to wait for a future release?

    Thanks,
    Trish

    #260658

    Riyad Kalla
    Member

    Trish,
    Are you deploying multiple web applications (all to different contexts) or are you deploying multiple applications ontop of eachother, such that files are being overwritten? In the first case, you can handle that now by using an EAR project and making all those web projects modules of it.

    If it’s the second case, I can’t say we would ever support that (just not big enough demand or even a common use case that I’ve seen).

    #266030

    @support-rkalla wrote:

    Charles,
    Ahh, this has been requested a few time over the years. We offer it now with code by way of a “dependent Java Project” but as you and others have pointed out, the need to do it with web-assets as well is important. THis is still filed for enhancement and from time to time we discuss how to “Do it right” so that people aren’t surprised are freaked out when they create two dependent web projects and the end result may be something they weren’t expecting. This also opens a black box of requests: What order do you deploy the projects in? Should filter resources from one and not the other? Which web.xml file do you use? so on and so on. Each time we dig into this problem there are so many questions thrown onto the table that we get nervous and back off of it. I will bring this up again for discussion.

    Hi Riyad,

    Any news on whether this is something that will be tacked or not? This is still important for us.

    Does it really need to be implemented as two separate “dependent web projects”? Couldn’t it be done as a single web project which happens to have multiple web-root folders which are “merged” together during deploy? You could also specify the “order” of the web-root folders to eliminate doubt over which takes precedence if there are conflicts.

    Cheers,
    Charles

    #266220

    Riyad Kalla
    Member

    Charles,
    This feature has not been addressed yet and except for this thread the requirements for alternative project layouts has practically fallen off the map for most folks now that most all IDEs have normalized on the exploded-WAR format that MyEclipse has been using for a while. WTP and all WTP-based products now share similar layouts, NetBeans and to a lesser extent IntelliJ all understand that layout format right out of the box so I think a lot of people have just started using it.

    We realized there are still folks left out in the cold that have legacy layouts they have to work with and at different times we have tried to get solutions in, but it’s such a fundamentally low-level change that it’s deemed too dangerous by management.

    Project layout may be something that gets in enhanced in 6.0, but I don’t have any promises that it would solve a dual-web-root problem for you. I’m sorry I don’t have better/concrete news for you.

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: Multiple Web Root for the same project

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