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.
I have a web application ( struts, Tomcat if that helps ) that starts a Tomcat session. Two tabs appear in the output window ( <Name of App>(Run) and <Name of App> ). The second window displays stack traces when exceptions are thrown, which its suppose to do. When I right click the window and select "Clear" the pane clears, which I expect. Now when I end my application run ( close the browser, and even make sure the embedded Tomcat is stopped ) and then re-run the app, the output window has all the previous error messages, etc as if I never selected "clear" from the menu. Shouldn't the clear menu option clear the text for good and not retain previous sessions' output? If this is expected, I apologize, but I am new to NetBeans and am still learning its features.
Which tab do you call clear on? The content definitely shouldn't remain there - I wonder if the web module is somehow caching old content and rewriting it to the new output pane. Note that if the output stream for the process is still open when it is cleared, the tab's content will be replaced, but the contents of the old stream could reappear if the web module tries to re-show that tab. Could you reproduce this while running NetBeans with -J-Dnb.output.log=true and attach the resulting file $TMP/outlog.txt That would help find out exactly what is going on.
Created attachment 18365 [details] Netbean output log
Just as a test, I clear all tabs in the output window ( There are 3 tabs, Bundled Tomcat, <Project Name>(Run), <Project Name>. The <Project Name> tab is the tab that writes the runtime exceptions that I throw. I clear that tab and it does clear, but when I stop the run, make some code changes and re-run the tab opens and still contains the previous run's exception output. I have reproduced this issue with the flags set as you indicated. I have attached the file as well. Here are the steps I performed when I had the flags turned on: First off, I intentionlly added runtime exceptions just to get straight to the error 1) Cleaned and built project 2) Started project ( this starts Tomcat and then opens a web browser ) 3) I click on a link to run an action ( the action throws a hibernate exception ) 4) The output is sent to the browser and the output tab in Netbeans. 5) Close the browser, right-click on the HTTP Server node and stop the server, and then right click on the output pane with the exceptions and select "clear" from the popup menu. I also actually closed the tabs by pressing the "X" on the panes just to really make sure the tabs close. 6) Redo steps 1,2,3. The output pane still has the previous run's exceptions in it ( I know this because of the timestamps of the exceptions. The new exceptions are just appended to the end.
I'll try to investigate it, since I'm working on some output tab issues.
This is a remainder to you, the owner of this bug, that this issue has P3, is reported against 4.0 and its target milestone has not yet been set. Please set the milestone, fix the issue or change its priority by tomorrow. Thank you for helping NetBeans to get ready for code freeze.
It seems that tomcat module repopulate output tab with the logfile(s) everytime you open it. I don't know the tomcat module, so don't know if it is a feature or bug. I just followed the stacktrace and came to o.n.modules.tomcat5.util.LogViewer.run() method where the populating is happening. So I'm reassingning them the issues. If I'm wrong throw it back guys :)
Changing to ENHANCEMENT. Showing the full context log is a feature which has been "implemented" when the context log was not yet being opened automatically. It is too late to change this in the 4.0 release. In the next release "open context log" action will show only newly added log messages and some other action will offer displaying of the old content. Please note that we do not plan to clear the log files physically, since it would be quite risky to do so, however the effect should be quite the same.