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 am not sure whether this is a Tomcat problem or a j2eeserver problem. Filing it with j2eeserver for now. 1) The context log is more interesting to the developer than the server log. If we can only show one, then the context log and not the server log should be shown in the output tab. 2) The UI for accessing the context log is unintuitive. First issue: The output tab shows Tomcat's server log. It used to show the log file for the context that the user was executing also. If the user has written the application properly, they use getServletContext.log("Message") and not System.out.... On Tomcat system.out type calls go to the server log (the one that is shown). Any logging messages from the source code (if properly written) go to the context log, and so do any messages from the source itself. So if there is an exception in a tag handler for example, this will be logged to the context log. It is possible to view the context log from the server registration tab, but since it comes up through the editor and hence doesn't scroll to follow the execution, it is not as useful. Hence, accessing the log file this way does *not* provide equivalent functionality to putting it on the output tab. Developers will have to resort to running tail -f externally, since access to this file is pretty crucial. Second issue: When I looked for access to the context logs, I went to the server registry and browsed down to the individual context log I was interested in. There is no such item in the context sensitive menu. Instead, there is a "view context log" item at the server level, which doesn't make much sense from a UI point of view. Tomcat is configurable, and I don't know why we switched from individual context logs to mixed once - perhaps the defaults in Tomcat changed (?) but I don't see how this improves things for the users. Surely, if the user cares about more than one web module at the same time, they're better served if the data is separate? As long as we use the term "context" log I expect it at the level of the context in the UI. Otherwise, the action should be named "log for all contexts" or something like that.
Tomcat plugin now completely control the showing of tomcat server log as well as the subnodes of Tomcat server node in server registry UI. So this is more of Tomcat specific issue.
Another side effect of showing the context output in the source editor is that the user can no longer click on links in the stacktrace to go and fix an issue in an offending file.
Petre, please assign this to somebody, this bug makes things really difficult. I need access to the context log during normal development. Most of the errors from the Tomcat server that pertain to a web application will be logged there - stack traces, everything. The only error that gets logged to the server log is if the application doesn't start! We expect the IDE to show us any errors that happen during execution so this file must go back on the output tab. Raising to a P2 - this is a major usability issue. It's not good enough to have this in the editor window - see above (no links to offending lines). Plus, I want to be able to clear this, and it takes for ever to select and clear in the text editor. Plus, I want to be able to see the error and the source at the same time. The log file does not belong in the text editor.
Context log has been moved from editor to output window. Context log can be displayed for each web module now, supposing a logger is defined for this module (when a new web project is created, it has a default logger defined). Previous "context log" has been renamed to "shared context log", label "context log" is now being used for web module's context log. See attached commit log.
Created attachment 16290 [details] commit_log
Verified