File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JForum and the fly likes JForum in Eclipse/Tomcat - gotchas2, the localhost{date} log Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "JForum in Eclipse/Tomcat - gotchas2, the localhost{date} log" Watch "JForum in Eclipse/Tomcat - gotchas2, the localhost{date} log" New topic

JForum in Eclipse/Tomcat - gotchas2, the localhost{date} log

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
Eclipse reduces it's log monitoring to following stdout. This is not at all helpful for debugging a webapp like JForum, as template errors will not show. In a browser, template errors look like this,

An error has occurred.

For detailed error information, please see the HTML source code, and contact the forum Administrator.


This webpage is derived from the (hard to back-trace) exception.htm. The errors in templates are very important, as code is summoned from them.

The log which is really helpful is,

localhost_access_log.{the currentdate}.txt

Haplessly, unless someone posts a neater solution, a plugin, or some similar help, I currently keep a filebrowser open on the internals of Eclipse.

Where is this set of dated log files? Well, Eclipse constructs a virtual/clone of the deployed Tomcat, so it's not where you think you deployed it. Only way I found is to,

double click on servers in the lower panel

this opens a panel called "overview",

"Open launch configuration" > Arguments > VMArguments

Look for the argument "catalina.base". It looks like,

-Dcatalina.base="{path to Eclipse_workspace}/.metadata/.plugins/org.eclipse.wst.server.core/tmp0

Cut and paste the path into a filebrowser, and the folders of the Virtual Machine will be visible. One of the folders is called "logs", and the host log files are in there.

Not good instructions for me, but maybe I'm missing something,

If anyone has a better way, e.g. knows better than me how to to configure Eclipse for a special view, for example, please post.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

When launching through Eclipse, the Tomcat std out is in the Eclipse console view. And yes, template errors do show up there.

Not showing details of errors in the browser is actually a security feature. The idea is not to give hackers to much information about the implementation of the code and how close they are getting to an attack.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
My description is too loose. "Much JForum code is triggered by templates, errors in that code will return the template 'exception.htm'".

As described above, there is good reason for this public action. Eclipse is not geared to help developers here, though (in an odd twist, my deployment environment has better coverage of Tomcat logs).
I agree. Here's the link:
subject: JForum in Eclipse/Tomcat - gotchas2, the localhost{date} log
It's not a secret anymore!