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.
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.
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.
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).
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?
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.
> 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?
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.
> 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?
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.
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.
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.
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.
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
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.
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.
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.
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.
I think we have some data now, thanks everyone for your input. Petr Pisl now has the authority to make the final decision.
Assigning to Petr Pisl as he owns the decision. We also agree to change the priority: -> P3.
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.
none of these TM values are valid at this point
From the earlier comments, the issue can be closed now that the deploy on save functionality has been implemented.