tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albretch Mueller" <lbrt...@gmail.com>
Subject Still trying to log using org.apache.juli.FileHandler ...
Date Wed, 21 Nov 2007 17:16:50 GMT
~
 I have a webapp outside of the $CATALINA_HOME directory branch (I
don't think this relates to my problem since I see how all clases are
loaded and web.xml there is read without any apparent problems)
~
 But I am not able to log via the occassional System.out.println and
System.err.println even though I set swallowOutput="true" in the web
apps WEB-INF/context.xml file
~
<Context path="/fileupload"
         docBase="E:\prjx\java\GWB\webappsDir_tc-6.0.14\webapps04\fileupload"
         debug="99"
         reloadable="true"
         crossContext="true"
         swallowOutput="true">

         <Realm  className="org.apache.catalina.realm.JDBCRealm"
                 debug="99"
                 driverName="org.postgresql.Driver"
                 connectionURL="jdbc:postgresql://127.0.0.1:5432/ROLEZ"
                 connectionName="postgres"
                 connectionPassword="pgpw"
                 userTable="usrz"  userNameCol="unm"  userCredCol="upw"
                 userRoleTable="usrz_rolz" roleNameCol="rnm" />
</Context>
~
 Here is WEB-INF/logging.properties:
~
handlers = UploadServlet04.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

.handlers = UploadServlet04.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

UploadServlet04.org.apache.juli.FileHandler.level = FINEST
UploadServlet04.org.apache.juli.FileHandler.directory =
C:/cmllpz/prjx/java/GWB/logs
UploadServlet04.org.apache.juli.FileHandler.prefix = tc-6.0.14_UploadServlet04.

java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINEST
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers
= UploadServlet04.org.apache.juli.FileHandler
~
 Here is WEB-INF/web.xml:
~
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
   version="2.5">

    <description>Upload Servlet for GWB</description>
    <display-name>Upload Servlet for GWB</display-name>

    <!-- FileCleanerCleanup filter -->

    <listener>
     <listener-class>org.apache.commons.fileupload.servlet.FileCleanerCleanup</listener-class>
    </listener>

    <!-- Define servlets that are included in the example application -->

    <servlet>
      <servlet-name>fileupload</servlet-name>
      <servlet-class>UploadServlet04</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>fileupload</servlet-name>
        <url-pattern>/fileupload/*</url-pattern>
    </servlet-mapping>

<security-constraint>
        <web-resource-collection>
                <web-resource-name>SecurityFilter Test</web-resource-name>
                <url-pattern>/fileupload/*</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
                <http-method>PUT</http-method>
                <http-method>DELETE</http-method>
        </web-resource-collection>
        <auth-constraint>
                <description>These roles are allowed access</description>
                <role-name>GWBAdmin</role-name>
        </auth-constraint>
</security-constraint>

<login-config>
        <auth-method>FORM</auth-method>
        <realm-name>Upload Realm</realm-name>
        <form-login-config>
                <form-login-page>/html00_login.jsp</form-login-page>
                <form-error-page>/html02_autherr.jsp</form-error-page>
        </form-login-config>
</login-config>

<security-role>
        <description>Only 'GWBAdmin' role is allowed to access this
web application</description>
        <role-name>GWBAdmin</role-name>
 </security-role>

 <welcome-file-list>
  <welcome-file>html04_upload.jsp</welcome-file>
 </welcome-file-list>


</web-app>
~
 How could I log messages from within the webapp?
~
 thanks
 lbrtchx

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message