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 70332 - Swing HTML browser reguests URL three times
Summary: Swing HTML browser reguests URL three times
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Simonek
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2005-12-13 13:55 UTC by Martin Schovanek
Modified: 2008-12-22 11:18 UTC (History)
2 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 Martin Schovanek 2005-12-13 13:55:11 UTC
[#200512122030, jdk1.5.0]

to reproduce:
-------------
1) set 'Swing HTML Browser' as default web browser in the 'Options > General'
2) open a Web project
3) invoke Run File on a .jsp
ERROR: the Swing HTML browser reguests URL three times, see 'Current Records' in
the HTTP Monitor.

It causes some strange behaviour in Web atomated tests which is hard to
workaround => P2.
Comment 1 David Simonek 2005-12-13 14:09:22 UTC
Is it regression or not? Also, which strange behaviour in tests?

I can understand that error may affect performance or so, but any test that
relies on count of calls of some method is poorly written IMHO and should be
rewritten.
Comment 2 Martin Schovanek 2005-12-13 15:20:52 UTC
It is reproducible in 4.1 too, the problem is e.g. during JSP Debugging, if you
use the Swing HTML Browser, debugger (sometimes) stops on breakpoint several
times. Depends on CPU speed and timing. But any idea how to workaround it is
highly appreciate.
Comment 3 David Simonek 2005-12-13 15:39:03 UTC
mschovanek I must tell you a secret, psst: I know nothing about whole browser
support nor jsp support in NB, so don't rely on me giving you advices or ideas :-)
Comment 4 _ rkubacki 2005-12-13 16:54:34 UTC
Part of reason is probably in org.openide.awt.SwingBrowserImpl

It reads the begining of the stream to find encoding - see #53207
The Swing can also try to read the header to find if the request is not
redirected. So perhaps it is OK. AFAIK it is not a regression so I'd object
against P2 priority
Comment 5 David Simonek 2005-12-13 17:20:13 UTC
Thanks for support, I also don't see P2 as correct priority. I'll debug piece of
code you mentioned to find exactly what is going on.
Comment 6 Martin Schovanek 2005-12-13 18:11:44 UTC
For me it is critical feature and no workaround exists => P2, but time to fix is
more important for me than priority. ;-)
Comment 7 _ rkubacki 2005-12-14 07:55:37 UTC
It is a user bug or not? 
Is your test critical feature of IDE? 
What are you testing? Run action? Would it be enough to test deploy and then
open URL connection (that way you can also ensure that there is expected content). 
Comment 8 Martin Schovanek 2005-12-14 12:58:19 UTC
Yes we are testing 'Run File/Project', 'Debug File/Project' and other. Deploy
and then open URL connection, as you suggest, is *not* Run action test, it is
deploy test. Even if it was, we cant rewrite all test whenever discover a issue
in core.

Besides, it is simply reproducible manually, so stop talking about test necessity.

to reproduce:
-------------
0) at 'Options > General' set 'Swing HTML Browser' as default browser
1) create new Web Project
2) create a .tld document
3) add NewTagHandler.java
4) type on NewTagHandler.java:35 line:
   out.println("TagOutput");
5) set breakpoint on this line
6) use the tag handler in index.jsp
7) invoke Debug File action on the index.jsp
8) when IDE stops on the breakpoint chose contionue
ERROR: IDE stops on it three times

With external browser it works well.
Comment 9 Martin Schovanek 2005-12-14 14:22:15 UTC
After dicussion with rkubacki downgrading to P3.
Comment 10 Lukas Hasik 2008-04-10 21:22:30 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 11 Petr Chytil 2008-11-20 08:17:36 UTC
Swing HTML browser can't be set as IDE's default browser anymore -> closing as WONTFIX. Please, feel free to reopen if
you still use it...