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 24509 - starting the server shouldn't pop open a browser
Summary: starting the server shouldn't pop open a browser
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: _ rkubacki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-07 02:32 UTC by Rich Unger
Modified: 2003-04-03 08:43 UTC (History)
0 users

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 Rich Unger 2002-06-07 02:32:51 UTC
Not all of us are developing webapps for visual display, 
you know :)

Tomcat40DataObject.start() seems to always pop open a 
browser after it starts.  This is html-specific, which 
doesn't fly if I'm trying to test a VoiceXML app.  The 
post-startup code should be configurable, or at the very 
least, disable-able.
Comment 1 Damian Frach 2002-06-07 08:46:26 UTC
you can set up your current browser, which will be used

tools/options/ide configuration/system/system settings/web 
browser
Comment 2 Rich Unger 2002-06-08 02:41:59 UTC
...which will break viewing of help files and other IDE 
modules that need an html browser, as my VoiceXML browser 
attempts to load my help sets.

The servers in netbeans have this concept of a separation 
between actions for testing developer code and actions for 
internal IDE services.  The httpserver module is used for 
serving up FileObjects out of the repository, and other 
IDE-specific functions, while the tomcatint module is 
specifically for testing the user's code in a simulated 
deploy environment.

The web clients should work the same way.  The web client 
used for testing user code in a simulated environment 
should be a separate setting from the client used to 
access internal IDE functions, like javahelp pages.

The easiest way to accomplish this would be to have an 
additional setting identical to the current "web client" 
setting.  Call one of them "help browser" and the 
other "testing browser" (or something).

Ideally, I think the notion that tomcatint would launch a 
browser to some hard-coded URL every time it launches is a 
bad idea.  What if the entry point of the webapp you're 
developing isn't http://localhost:port/index.html?  In my 
case, it's http://localhost:port/warname/dialogs/main.vxml 
(or whatever the user overrides the default as).  So, I'm 
stuck writing a NullBrowserFactory, and my help menu turns 
into a no-op.

It's a simple thing for a SystemAction to open up a 
browser window, so I don't see the big win in hard-coding 
it into Tomcat40DataObject.start().
Comment 3 Damian Frach 2002-06-14 12:41:12 UTC
> What if the entry point of the webapp you're 
> developing isn't http://localhost:port/index.html?  In my 
> case, it's ttp://localhost:port/warname/dialogs/main.vxml 

You can create special exec performer for your special data 
object (*.vxml) and register this performer.

Your performer will start any or no browser, as you wish.

> It's a simple thing for a SystemAction to open up a 
> browser window, so I don't see the big win in hard-coding 
> it into Tomcat40DataObject.start().
I can implement, no browser will be opened during the 
tomcat start/restart action.

But I want to discuss this issue with my HIE guy.

Comment 4 Damian Frach 2002-06-18 12:59:31 UTC
can you try this:

Create a new web browser instance under Tools > Options > 
IDE
Configuration > Server & External Tool Settings > Web 
Browsers, and
point this new instance at whatever kind of executable he 
wants.  Then
go to Tools > Options > Debugging and Executing > JSP & 
Servlets
Settings, and choose this browser for the Web Browser 
property.  This
should only apply to running/debugging web apps and 
shouldn't change the
browser for other IDE functions.
Comment 5 Rich Unger 2002-06-18 18:43:44 UTC
This would work, but for a weird problem:

I added a new browser under Web Browsers, so now there's 4: External
Browser (Windows), External Browser (Command Line), Swing HTML
Browser, and MyBrowser.

When I go to JSP & Servlets Settings, and try to select MyBrowser, I
can't do it.  Whenever I select it in the combo box, the selection
becomes "External Browser (Windows)".  Whenever I select "External
Browser (Command Line)", the selection becomes "External Browser
(Windows)".  When I select the swing browser, the selection correctly
shows up as "Swing HTML Browser".

So, I can only get the combo box to select 2 of the 4 possible browsers.

I can, however, have the help menu use one of those 2 and the
deployment server use the other.  So, I guess this is a new bug.
Comment 6 _ rkubacki 2002-06-19 08:37:45 UTC
Looks like bug in browser selecting. I will try to address this. If
you want to create a separate issue it can be good idea (you can
assign to rkubacki@netbeans.org directly).
Comment 7 Marek Grummich 2002-07-22 11:40:33 UTC
Set target milestone to TBD
Comment 8 _ rkubacki 2003-02-07 10:33:54 UTC
Now the browser is not started when server is started from server
registry.

http://tomcatint.netbeans.org/source/browse/tomcatint/tomcat40/src/org/netbeans/modules/tomcat/tomcat40/Tomcat40ExecPerformer.java.diff?r1=1.3&r2=1.4
Comment 9 Jason Rush 2003-04-03 08:43:09 UTC
Verified in Nevada build 030401.