This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137395 - Multi web folders support
Summary: Multi web folders support
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 8.0.2
Hardware: PC Windows XP
: P3 blocker with 2 votes (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-17 09:17 UTC by nicolo
Modified: 2015-02-27 07:48 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nicolo 2008-06-17 09:17:41 UTC
I have to create a web application - project with the content of the web part (jsp, js ...) spreaded in different
folders (because of different CVS modules). It would be veeery smart if i could specify more than one web page folder
(like i do for the java sources) when i create the project. Or add other web page folders in the project properties dialog
Comment 1 nicolo 2008-06-25 10:34:46 UTC
I think it wouldn't be an enhancement but a big feature (this is the reason why most of my collegues use Eclipse)
Comment 2 David Konecny 2008-06-25 22:11:16 UTC
How do you do this in Eclipse? In Eclipse Europe nor Ganymede I could not find any option for settings up multiple web
content folders.

In theory this feature make sense. To implement it though we first need to make sure that there is lot of users with
this scenario and that it would be clearly beneficial. Our resources are quite tight. I mean if it is
three-users-problem than it is not worth to implement. Perhaps just customization of build script (and note in HOWTO
knowledge base) could be adequate solution in such a case. And vice versa - if it is way how people frequently develop
their web applications then it should get higher priority. As you said it is not a small enhancement - would have impact
on lots of UI/wizards etc.
Comment 3 nicolo 2008-06-26 07:30:14 UTC
I think it would have impact on the web-project cration dialog and in the properties one.
This feature would be very useful for all the people who have to work on well-structured web applications, where
frequently web pages are in different CVS folders.
For the moment also eclipse doesn't have this feature in his GUI, but you can achieve this result by manually editing
org.eclipse.wst.common.component in ".settings" folder of your project, adding web-folder-root lines. Eclipse then
merges the different lines in only a root in your project folder tree.
I looked for a similar file in netbeans but it didn't work (for example i tried to edit the private.property adding
different file.reference.module_contents-webapp rows)

With this feature NB would achieve a need that also Eclipse have, but before it!
Comment 4 David Konecny 2008-06-26 20:48:41 UTC
Re. "well-structured web applications" - could you give me please some concrete examples from your project why you keep
web content for one web app in different folders? I've done web development for couple of years and never seen setup
like that. It is possible it was because tools we  used did not allow it though. On the other hand the fact that eclipse
does not support it in UI as well and this is first time I heard such a request makes me feel like it is corner case and
not "well-structured web app" as you say. Do you keep in different folders files which you share between different web
applications? Or is it because of legacy setup of your project structure? Or is it because of web technology you are using?

Sorry for asking too many questions but understanding real usecase behind this request and its benefit is essential for
me to decide on priority of it. Thanks, -David.
Comment 5 nicolo 2008-06-27 07:20:55 UTC
The webapp we develope is made of more than 600 jsps, 8000 java classes, 50 properties file for localization and so on.
With so many jsps we need to separate them depending on their function (some for administration, some for user
interface, some common for other applications we develope and so on) I don't know if you worked on so big web
applications, but when there are so many elements we need to use different folders also because we release 4 releases a
year, so our CVS structure is quite complex.
We use some ant to "manually" merge the different folders of the web application, but it would be very less expensive
and very easier if the IDE support in this setup
Comment 6 David Konecny 2008-06-30 05:04:53 UTC
I worked on a project like that. We did not have the problem you are describing because we split the application into
several "sub-applications", at least twenty of them which may communicate between each other and which to a user (in
terms of look and feel and workflow) look like one application. I cannot comment on you project as I do not know details
but I would argue that it is best practise to split big monolithic application into managable/independent chunks which
can be developed by different teams, can have different deployment cycles, etc.

In order to support hand written customization (like Eclipse does) a new version of project.xml would be needed. It
cannot be just a property in project.properties because Ant build-impl.xml script needs to be regenerated as well to
copy content of additional source roots to build directory. Creating a new version of project.xml has its consequences -
eg. after project upgrade older versions of IDE cannot be used anymore) - and so we try to do upgrade only when it is
really necessary which is not this case. I will see whether there is some other workaround.
Comment 7 Rahul.khandelwal 2015-01-02 09:46:10 UTC
Hi, is there any new development regarding this enhancement?
The project I am working on in my company has a structure like this:
    -module_1
         --src
         --web
    -module_2
         --src
         --web
    -module_3
         --src
         --web
    -------------so on

So I am having issue with adding these multiple web folders in netbeans, I had to add these folders as java source folders, So I had to switch on eclipse because in eclipse we can link external web page folders just like external source folders. But I would really like to see this feature in netbeans.
Comment 8 Rahul.khandelwal 2015-01-02 09:50:03 UTC
To add multiple web page folders in eclipse:
1. create new dynamic web project.
2. After creating project, expand project node and right click on 'WebContent'.
3. Select new -> folder and then click on 'advanced', Here we can link to alternate location.
Comment 9 Geertjan Wielenga 2015-02-27 07:48:05 UTC
It is best practise to split big monolithic application into managable/independent chunks which can be developed by different teams, can have different deployment cycles, etc.

Why don't you do that? Create a separate web application for each of the modules and then put them on the classpath of the main project? Also, why don't you use Maven?