Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to enable logging when running Tomcat 5.5 under Eclipse 3.5?
How to enable logging when running Tomcat 5.5 under Eclipse 3.5? [message #515548] Fri, 19 February 2010 10:50 Go to next message
Dave Griffiths is currently offline Dave GriffithsFriend
Messages: 7
Registered: February 2010
Junior Member
Hi, I'm running Tomcat 5.5 under Eclipse 3.5. I want to see some access logging because for instance it silently ignores imported style sheets it can't find. I saw a reference somewhere to org.apache.catalina.valves.AccessLogValve so I tried uncommenting that in server.xml but it makes no difference. Nothing extra to the console, nothing to any log file in the workspace.

This is all I get in the console window:

    Created MBeanServer with ID: 635da44f:126e1e2f13c:-8000:Dylan:1
    18-Feb-2010 16:22:13 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [deleted]
    18-Feb-2010 16:22:13 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    18-Feb-2010 16:22:13 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1046 ms
    18-Feb-2010 16:22:13 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    18-Feb-2010 16:22:13 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.28
    18-Feb-2010 16:22:13 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    18-Feb-2010 16:22:18 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    18-Feb-2010 16:22:18 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    18-Feb-2010 16:22:18 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/156  config=null
    18-Feb-2010 16:22:18 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    18-Feb-2010 16:22:18 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 5094 ms

Thanks!

Dave
Re: How to enable logging when running Tomcat 5.5 under Eclipse 3.5? [message #515614 is a reply to message #515548] Fri, 19 February 2010 14:22 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
As a quick test, I tried uncommenting the AccessLogValve with Tomcat
5.5.28 and it worked for me. Note that the server.xml you need to
modify is the one under the appropriate subfolder of the Servers project
in your workspace. Even though the comment in server.xml says the
"logs" directory is relative to CATALINA_HOME, it is really relative to
CATALINA_BASE, which is how it should work. The CATALINA_BASE (actually
the catalina.base system property in the launch configuration) defaults
to
"<your_workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp? "
when a new Tomcat server is created. Make sure you that is where you
are looking for the "logs" directory if you haven't changed the server
configuration from the default.

Though unrelated to seeing the AccessLogValve output, to configure JULI
logging, see:

http://wiki.eclipse.org/WTP_Tomcat_FAQ#How_do_I_enable_the_J ULI_logging_in_a_Tomcat_5.5_Server_instance.3F

Cheers,
Larry

Dave Griffiths wrote:
> Hi, I'm running Tomcat 5.5 under Eclipse 3.5. I want to see some access
> logging because for instance it silently ignores imported style sheets
> it can't find. I saw a reference somewhere to
> org.apache.catalina.valves.AccessLogValve so I tried uncommenting that
> in server.xml but it makes no difference. Nothing extra to the console,
> nothing to any log file in the workspace.
>
> This is all I get in the console window:
>
> Created MBeanServer with ID: 635da44f:126e1e2f13c:-8000:Dylan:1
> 18-Feb-2010 16:22:13 org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path: [deleted]
> 18-Feb-2010 16:22:13 org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 18-Feb-2010 16:22:13 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1046 ms
> 18-Feb-2010 16:22:13 org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> 18-Feb-2010 16:22:13 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.28
> 18-Feb-2010 16:22:13 org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> 18-Feb-2010 16:22:18 org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> 18-Feb-2010 16:22:18 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 18-Feb-2010 16:22:18 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/156 config=null
> 18-Feb-2010 16:22:18 org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> 18-Feb-2010 16:22:18 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 5094 ms
>
> Thanks!
>
> Dave
Re: How to enable logging when running Tomcat 5.5 under Eclipse 3.5? [message #515665 is a reply to message #515614] Fri, 19 February 2010 17:04 Go to previous messageGo to next message
Dave Griffiths is currently offline Dave GriffithsFriend
Messages: 7
Registered: February 2010
Junior Member
Hi, thanks. I figured it out in the end. Like you say for a fresh project that works. What I did though was make the server.xml change after a few server start/restart iterations. What I had to do to fix it - which I think I found on the web somewhere - was right click on the server in the bottom pane and then do "Clean...". Odd really because you make a change to a servlet and it Just Works but make a change to server.xml and it's very obscure...
Re: How to enable logging when running Tomcat 5.5 under Eclipse 3.5? [message #515672 is a reply to message #515665] Fri, 19 February 2010 17:30 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Dave Griffiths wrote:
> Hi, thanks. I figured it out in the end. Like you say for a fresh
> project that works. What I did though was make the server.xml change
> after a few server start/restart iterations. What I had to do to fix it
> - which I think I found on the web somewhere - was right click on the
> server in the bottom pane and then do "Clean...". Odd really because you
> make a change to a servlet and it Just Works but make a change to
> server.xml and it's very obscure...

If it helps in the future, for "Clean..." to fix the behavior suggests
that something went wrong with the "delta" publishing. The "delta"
publishing that the Tomcat support uses relies on a cache of data
storing the files and their dates for what has been included in past
publishes. If during publishing, the project file to be published is
found in the cache and it's date hasn't changed, then that file is not
published again. If that file, for some unknown reason, is no longer
present in the published webapp, "delta" publishing won't make it
reappear. Using "Clean..." deletes this cache and forces a full
publish, fixing any such disappearances. So far, I haven't identified
any usage scenario, other than deliberately deleting the webapp's file,
that would account for the mysterious disappearance of published files.
Let us know if you happen to find one.

Cheers,
Larry
Previous Topic:Memory Profile Tool for Tomcat
Next Topic:JSP editor tool tips options
Goto Forum:
  


Current Time: Fri Mar 29 10:28:17 GMT 2024

Powered by FUDForum. Page generated in 0.04840 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top