Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 73352 - WebProjectUtilities.createProject should have API for handling the Welcome page
WebProjectUtilities.createProject should have API for handling the Welcome page
Status: RESOLVED DUPLICATE of bug 99555
Product: javaee
Classification: Unclassified
Component: Web Project
5.x
All All
: P2 (vote)
: TBD
Assigned To: Radko Najman
issues@javaee
OSLO
:
Depends on:
Blocks: 93470
  Show dependency treegraph
 
Reported: 2006-03-07 19:26 UTC by _ potingwu
Modified: 2007-04-05 23:20 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ potingwu 2006-03-07 19:26:45 UTC
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.
Comment 1 _ potingwu 2006-03-09 00:40:24 UTC
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.
Comment 2 _ potingwu 2007-04-05 23:20:59 UTC

*** This issue has been marked as a duplicate of 99555 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo