Re: Logging Mechanism

2001-04-13 Thread Craig R. McClanahan



On Fri, 13 Apr 2001, Natra, Uday wrote:

 Hi All,
 The Logging Mechanism provided in the Struts framework is accessible to the
 Java Components that have access to ActionServlet instance. Struts does not
 define the Logging mechanism for the Components that are Isolated from the
 Struts framework but are part of the application being developed using
 struts framework. Can anybody tell me how they solved this problem or how
 they implemented the Logging Mechanism ??
 
 Thanks,
 Uday.
 

One approach to this you should investigate is the Log4J framework, which
is also available at the Jakarta web site
(http://jakarta.apache.org/log4j).

I'm a little hesitant to mandate a particular logging technology in the
framework itself (at least until the upcoming Java standard for logging
APIs is completed -- religious wars are nothing compared to the emotions
that logging technologies can raise :-).

Craig





RE: Logging Mechanism

2001-04-13 Thread Abraham Kang
le by adding the following:

  servlet
servlet-namelog4j/servlet-name

servlet-classcom.infogain.DOG.logging.servlet.Log4jServlet/servlet-class
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namelog4j_conf/param-name
  param-value/WEB-INF/log4j_conf.properties/param-value
/init-param
init-param
  param-namebase_category/param-name
!-- You will need to change this for your base Category --
  param-valuecom.infogain.DOG/param-value
/init-param
init-param
  param-namebase_priority/param-name
  param-valuedebug/param-value
/init-param
  load-on-startup1/load-on-startup
  /servlet

Enjoy log4j,
Abraham

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 13, 2001 9:17 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Logging Mechanism




 On Fri, 13 Apr 2001, Natra, Uday wrote:

  Hi All,
  The Logging Mechanism provided in the Struts framework is
 accessible to the
  Java Components that have access to ActionServlet instance.
 Struts does not
  define the Logging mechanism for the Components that are
 Isolated from the
  Struts framework but are part of the application being developed using
  struts framework. Can anybody tell me how they solved this
 problem or how
  they implemented the Logging Mechanism ??
 
  Thanks,
  Uday.
 

 One approach to this you should investigate is the Log4J framework, which
 is also available at the Jakarta web site
 (http://jakarta.apache.org/log4j).

 I'm a little hesitant to mandate a particular logging technology in the
 framework itself (at least until the upcoming Java standard for logging
 APIs is completed -- religious wars are nothing compared to the emotions
 that logging technologies can raise :-).

 Craig




 log4j_conf.properties
 Log4jServlet.java
 Keys.java

?xml version="1.0" encoding="ISO-8859-1"?

!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"

web-app

  context-param
param-nameweblogic.jsp.keepgenerated/param-name
param-valuetrue/param-value
  /context-param

  servlet
servlet-namelog4j/servlet-name
servlet-classcom.infogain.DOG.logging.servlet.Log4jServlet/servlet-class
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namewlpi_log4j_conf/param-name
  param-value/WEB-INF/wlpi_log4j_conf.properties/param-value
/init-param
init-param
  param-namebase_category/param-name
  param-valuecom.infogain.DOG/param-value
/init-param
init-param
  param-namebase_priority/param-name
  param-valueinfo/param-value
/init-param
  load-on-startup1/load-on-startup
  /servlet

  !-- Standard Action Servlet Configuration (with debugging) --
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valueApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet


  !-- Standard Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping


  !-- The Usual Welcome File List --
  welcome-file-list
welcome-fileSnoopServlet.jsp, index.html/welcome-file
  /welcome-file-list

  !-- Example Application Tag Library Descriptor
  taglib
taglib-uri/WEB-INF/app.tld/taglib-uri
taglib-location/WEB-INF/app.tld/taglib-location
  /taglib
  --

  !-- Struts Tag Library Descriptors --
  taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib

  security-constraint
web-resource-collection
   web-resource-name
 wlpiTest 
   /web-resource-name
   url-pattern
  /*
   /url-pattern 
   http-methodPOST/http-method
   http-methodGET/http-method
/web-resource-collection
 	 auth-constraint
 
		 role-name
  wlpiUsers
   /role-name
		 role-name
  wlpiAdministrators
   /role-name
/auth-constraint
	 user-data-constraint
descriptionSSL not