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 96977 - New browser tab is open on each application run
Summary: New browser tab is open on each application run
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@serverplugins
URL:
Keywords:
Depends on:
Blocks: 108801
  Show dependency tree
 
Reported: 2007-03-01 17:25 UTC by Petr Jiricka
Modified: 2008-12-17 01:06 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2007-03-01 17:25:28 UTC
NetBeans 6.0 dev build, Win XP, Firefox 2.0.0.2.

1. Create a web application
2. Run it, a browser tab with index.jsp will be open
3. Modify index.jsp in the IDE
4. Rerun the application
=> Another browser tab is open, which is undesirable. The expected behavior is
that the same tab is reused.

I am filing this as P2, because IMO this is a huge usability issue.

In Firefox, my setting in the Options dialog under Tabbed Browsing (Links tab) is:
Load Web browser links into a: New Tab
Load external links into a: New Tab

The behavior is the same in Internet Explorer 7 - new tab is open for each run.
Comment 1 Martin Grebac 2007-03-01 17:41:27 UTC
Just my 0.02$, but with the Firefox preferences set to what you have
"Load Web browser links into a: New Tab, Load external links into a: New Tab",
I'd consider this to be a P2 bug in Firefox if it still opens links in the same
page.
Comment 2 _ rkubacki 2007-03-01 21:01:31 UTC
I agree with Martin. I am not sure about Windows but on Linux the bahaviour is
fine because it is defined by browser and you can customize it here (my personal
preference is to open new tabs).
Comment 3 Petr Jiricka 2007-03-02 06:38:37 UTC
So from what I've heard, most people prefer to open new tabs for external links
open in Firefox. But does it mean that you consider the behavior described in
this issue correct? Is it what you want - to open new tabs everytime you hit the
Run button?
Comment 4 Andrei Badea 2007-03-02 09:57:27 UTC
What I usually want is to be able to deploy (not run) the application using a
shortcut, go back to the browser window and hit F5 (Refresh). Since there is no
way to assign a shortcut to the Deploy action, I uncheck "Display Browser on
Run" in the project properties, so that actually no new browser window or tab is
displayed when I run the application.

The default behavior for a new project should be the browser default, e.g., open
a new tab if that's what the browser preferences say. Of course, we'll be able
to customize the browser behavior more if/when we integrate JDIC and display the
browser in a tab in NetBeans.
Comment 5 Petr Jiricka 2007-03-02 10:09:23 UTC
> I uncheck "Display Browser on Run" in the project properties

If you need to do this, then this means that the default behavior we have is not
good. What should be the right behavior so it works well out of the box?
Comment 6 Andrei Badea 2007-03-02 10:59:00 UTC
By default I should be able to (re)deploy the application using a keyboard
shortcut. I think that our expectation that the user's workflow is:

1. open project
2. make changes
3. hit Run, browser opens with application's home page
4. dig deep down in the application's structure, test the change from step 2,
see a bug
5. make more changes to fix the bug
6. hit Run, browser opens with application's home page (no matter if in the same
or other tab)
7. dig deep down in the application's structure, test the change
(repeat steps 5 to 7 as necessary)

is plainly wrong. When I worked as a .NET web app developer, I used to:

1. open project
2. make changes
3. hit Run, browser opens with application's home page
4. dig deep down in the application's structure, test the change from step 2,
see a bug
5. make more changes to fix the bug
6. rebuild
7. go back to the browser window, test the change
(repeat steps 5 to 7 as necessary)

With respect to this, whether the home page opens in the same or another tab
when the application is run is irrelevant. I don't expect real world users to
use the Run action that often if they could just redeploy. That's a biased
opinion based on my habits, of course.
Comment 7 Petr Jiricka 2007-03-02 12:18:29 UTC
> I don't expect real world users to use the Run action that often if they could 
> just redeploy.

What do you mean by "redeploy" - is that a specific action? I did not see it in
your expected work flow - I only see "rebuild". Are you saying that "redeploy"
would happen automatically as a part of the rebuild step?

Comment 8 Andrei Badea 2007-03-02 12:37:57 UTC
I was describing the .NET workflow, which did not require (at least for me) an
explicit deploy action. The server was able to track the changes to the
filesystem and reload the application's dll when it changed as the project was
rebuilt.

In Java, since the support for automatically reloading changed classes is
limited even for an in-place deployed application, I'm not sure we could do away
with the explicit deploy action. Of course, the project has to be build as part
of the deploy action, but we're already doing that.
Comment 9 Andrei Badea 2007-03-02 16:38:16 UTC
So to recap, we should either do an incremental deploy or a full undeploy and
deploy when the user invokes the Deploy action. By default there should be a
shortcut for this action.
Comment 10 Pavel Buzek 2007-03-02 18:33:43 UTC
I.e. (if I understand) you (Andrei) would prefer to only open the browser window
once and then do one action in NetBeans (build, deploy, whatever it is called)
and hit refresh (F5) in browser. And of course the action in IDE would ideally
be completely eliminated, all you should need to do is Save and the IDE should
figure out if it needs to build, deploy or whatever. You do not like Run which
does the two (build/deploy + open browser). And this means that "open in new
tab" is a non issues.
If that's it then I tend to agree.
Comment 11 Andrei Badea 2007-03-05 09:51:33 UTC
Yes, that's what I'm saying. With the remark that we currently do need an
explicit action for deploying the changes to the server (i.e., Deploy). I don't
think we have enough time left in 6.0 to implement the ideal behavior you
described (deploying automatically on save). For 6.0 doing what I suggested in
desc10 should be enough IMHO.
Comment 12 Sherold Dev 2007-06-18 15:11:09 UTC
Not sure how we can fix this.

One possible solution would be to add a new action "Deploy" which would do the same as the "Run" action except opening
the project in a browser. If we do this we should probably remove the "display browser on run" option, since it would
become redundant. It might probably not be possible to assign a shortcut to the new action and thus it is questionable
whether this fix is really worthy.

Reassigning the issue to Radko
Comment 13 Petr Jiricka 2007-06-19 08:04:39 UTC
Why add a new "Deploy" action? Could not the "Build" action (which already has a keyboard shortcut) just redeploy the
project to the server (if the server is running)? That would accomplish what Andrei and Pavel are requesting.

BTW, this is one area we should discuss with Jerome (GlassFish v3 architect) when he comes to Prague in a few weeks.
Comment 14 Sherold Dev 2007-06-19 14:52:31 UTC
I think we should leave the "Build" action alone. There are cases when you want to only build the project without
deploying it.

What about making the Run action do just deploy without opening a browser. We could add a new action which would do what
the current Run action does, i.e. deploy and open a browser. I have no idea how it could be called, however. 
Comment 15 _ rkubacki 2007-06-19 14:55:09 UTC
Issue #75915 can help  a bit - at least we can better follow browser settings. Unfortunately I'd guess that most people
like to use 'open new window or tab' for new requests.
Comment 16 Sherold Dev 2007-06-19 15:59:46 UTC
I agree with you, but only as long as there is a chance to incrementally redeploy the application without opening a
browser. I would not want NetBeans to open a new tab after each change a make.
Comment 17 Petr Jiricka 2007-06-20 11:11:18 UTC
I think we have some data now, thanks everyone for your input. Petr Pisl now has the authority to make the final decision.
Comment 18 Petr Jiricka 2007-07-03 11:55:20 UTC
Assigning to Petr Pisl as he owns the decision. We also agree to change the priority: -> P3.
Comment 19 Petr Jiricka 2008-11-26 13:04:06 UTC
Since the Deploy on Save functionality was implemented, sounds like things are working pretty much as they should be,
right? So can this be closed as FIXED?

Still there are other scenarios when opening multiple tabs is undesirable, such as when debugging a PHP application. I
filed a separate issue 153932 for that.
Comment 20 Vince Kraemer 2008-12-02 20:12:56 UTC
none of these TM values are valid at this point
Comment 21 Jayashri Visvanathan 2008-12-17 01:06:09 UTC
From the earlier comments, the issue can be closed now that the deploy on save functionality has been implemented.