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.
Currently org.netbeans.modules.web.project.api.WebProjectUtilities.createProject creates a Welcome page 'index.jsp' by default and put the link into the 'web/WEB-INF/web.xml'. This is not suitable for, 1. Creator has some schemes that need to use 'Page1.jsp', 'Page2.jsp', ... instead, and 2. Wicket framework should not create any page. I think the WebProjectUtilities.createProject should not create any page by default, but supply API to create the Welcome page that will only be called by the framework. The API will accept a customized name, and put the link into the web.xml file (optional). The API should also include a 'Set As Start Page' call that will update the web.xml to link the Welcome page to the framework's customized page. These APIs are just RFE for developing framework, i.e., currently framework can already modify the web.xml and link it to other page. But "don't create 'index.jsp' by default" is still needed.
Mark Dey wrote: > Petr Pisl wrote: > >> Mark Dey wrote: >> >>> Petr Pisl wrote: >>> >>>>> BTW, does Web project has the concept of 'Set As Start Page'? I can't find this either in the GUI or API. Since Web project opens the "index.jsp" by default, where is the code that assumes this is the 'Start Page'? >>>> >>>> >>>> Basically, there are two ways, how user can change the start page. The first one is editing welcome files. Because the ide includes in the url of browser the context path of the web project then the servlet container start the welcome page. The second way is changing starting point in project customizer -> Run -> Relative URL and then the in the browser is included url that is constructed from context path + this relative URL. User can start every page through the Run File action as well. >>> >>> >>> We found that these techniques were too complex for users who were not familiar with welcome-files, context paths, and relative URLs. Instead, Creator introduced an action to set the start page directly in the project explorer. I would recommend that the NetBeans web project also adopt this mechanism since it is quite intuitive and less error prone than the other methods. >> >> >> I agree. This is what should be in Netbeans as well. But for this action, we don't have to have any API. This is just action that writes selected node (nodes) in to the web.xml as welcome files. No dialog, no UI. I'm right? > > > The node for the current start page is decorated with a badge (so it needs to listen for any welcome-file changes in the web.xml). In Creator 1 (for some reason it does not appear in Creator 2) we had a dialog that prompted for a new start page in the case where the user deletes the current one. It presented a list of all eligible start pages in a drop down. The dialog is not needed if there is exactly one eligible start page left in the project or if the start page is simply renamed. The idea is that the project should never be left without a named start page. Yes, the action can be found from the node, or from the UI Mark mentioned. But Framework developer like Creator may still want this API to implement its own DataLoader, or change the UI behavior.
*** This issue has been marked as a duplicate of 99555 ***