Using Java Logging with Tomcat

Hi in a previous non Tomcat project I wrote some classes that used the java.util.logging library that comes with java 1.4 quite successfully. I am now trying to use the same classes with Tomcat 5.0 but it doesnt like it. With the logging classes you can provide a configuration class which you define with a property "java.util.logging.config.class", I put the class in my WEB_INF\classes with all the other classes.
When I run with Tomcat i have a servlet that does the following to try and initilse the logging
com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
LogManager.getLogManager().readConfiguration();
it complains it cant find the class, when running readConfiguration(), (The 1st two lines run ok). I think the problem is to do with Tomcat classloader, with a simple Java application the classes would be expected to be on the system classpath, but on Tomcat the system classpath only contains bootstrap.jar.
I realise I could probably get things working using Apaches log4j instead but it seems a bit silly to use that when there is a perfectly adequate logger built into the language now.
Anyone done this ?

OK
Ive changed my code from
com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
LogManager.getLogManager().readConfiguration();to
com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
LogManager.getLogManager().readConfiguration(com.appserver.util.logging.LogProperties.getPropertiesAsStream());Now I dont get any errors and only messages for the LEVEL is set to the value I specify in my LogProperties class are displayed. However I also specify a Formatter to use for console output but Tomcat just seems to ignore it and uses its own default formatter. Any ideas...please !

Similar Messages

  • Using Java Logging with WebLogic 8.1

    Hello,
    I am having problems getting custom Handlers to load using the Java 1.4 Logging
    API. Apparently, the custom Handlers are loaded using the System classpath, not
    the applications classpath. This is not a viable option for us, does anyone know
    of a workaround for this?
    Thank you,
    Josh

    Hello Staffan,
    I've just sent to you the code source for this class. By the way I didn't try changing the swing JVM.
    Dom
    Hi,
    This looks like a bug to me. Does it matter which JVM
    you use for the swing application?
    To be able to find out more about the problem it
    would be great if we could look at the class files
    for
    com.dexia.sofaxis.prestations.business.TypeElementMate
    riel and all it's superclasses and interfaces. Please
    contact me offline at sta_larsen(at)hotmail (yes, I
    work for BEA, but I don't like spam...).
    Regards,
    /Staffan

  • How to use java integrate with ondemand

    Hi All,
    As i'm new to integration, can anyone help me to use java integrate with ondemand that inserts some records in ondemand and deletes some records from ondemand in secheduled interval basis.?
    Thanks in advance..!
    regards
    sowm

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • Using Java UFL with BOE XI

    Post Author: Elvyn
    CA Forum: Migration to XI R2
    We are using CR4E deployed on Linux. Some of our reports use Java UFLs.We are currently migrating to BOE XI and can't find support for Java UFLs.
    1) Is there a way to use Java UFL with BOE XI (on Linux)?2) If it is not supported, is there any alternative?

    Post Author: Elvyn
    CA Forum: Migration to XI R2
    We are using CR4E deployed on Linux. Some of our reports use Java UFLs.We are currently migrating to BOE XI and can't find support for Java UFLs.
    1) Is there a way to use Java UFL with BOE XI (on Linux)?2) If it is not supported, is there any alternative?

  • Using java bean with jsp

    hello friends,
    i'm new to jsp. i want to create an html form that accepts username and a value from four radio buttons and display back the entered name and checked radio button's value using java bean.
    i use the <jsp:setProperty id="" property="*"> method. i don't know how to access the radio buttons value from the html.
    also when i use an additional field other than username the jsp page is showing error.
    Please give me the correct method to use java bean with jsp in this circumstance.
    thank you.

    thank you, but i have a problem left. the case is like this.
    i got the jsp and bean worked fine when i have a sinle input text field.
    but when i added a second text field i recieved the following error.
    javax.servlet.ServletException: basket.newbean.getUserPass()Ljava/lang/String;
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.newform.process_jsp._jspService(process_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    where userPass is the new form element. I have made the subsequent chanes in my bean program and jsp file.
    pls hlp.

  • How to use Java WebStart with EJB ?

    hi forum...
    how to use Java WebStart with EJB ? examples ?
    thanks
    mindu

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • Use Java Logging mechanism

    We have a requirement to log application errors in a local log file in the form of key/value pairs (from a property object) after every transaction, append to the previous transaction and generate one log file for each day.
    Log file example,
    currentTime=xxxx
    message=xxxxx
    userId=xxxx
    etc.
    What would be the best way to do it ? Can I take advantage of the Java Logging API, like file handler , although it does not do exactly what I wanted ?

    Thanks for the reply. But the company standard does
    not allow open source package like log4j.Then the company standard is completely nuts... but they're like that aren't they... I'd still get a copy of the log4j source from the apache site, to use a working example of how to do it well... then maybe write a simplified "write behind" logging service based on it... a single format "log4j-lite"
    Have fun with it.
    Keith.

  • Developing webservices using Java SE6 and Tomcat Webserver

    Hi All,
    I am trying to develop a webservice using Java SE6 Beeta SDK with Tomcat webserver. I read somewhere in the Sun site and it says JAXWS2.0 is fully packaged with JAVA SE 6 SDK? If this is correct then what are all the remining packages(jar files present in JWSDP2.0) required to develop and publish the webservice.
    I does the setup as follows.
    - Install the Java SE6 SDK Beeta available.
    - Install Tomcat 5.17 webserver.
    - Started the webserver by setting java_home as SDK6.
    I am not able to publish the webservice with this setup
    Do i need to place any other package present in JWSDP2.0 in Tomcat_home/common/lib ?
    I used the same example present in JWSDP2.0 package.
    Please guide me regarding this?
    Thanks In Advance,
    Mohan

    Any ideas on how this could be achieved.Have you looked at the Unofficial Web Start FAQ at the Lopica site?
    - Gerald
    PS: You might wonna also consider posting your question to the Java Web Start developers group at Yahoo! See http://groups.yahoo.com/group/webstart

  • How to do Front End Validation for JSP Forms using Java Script with 9iJD...

    How to do Front End validation using 9iJD. Any wizard is there. We need to do the val. using Java Script. If its not available, please include that in the Production Release.

    Thanks a lot. When is the Production Release is scheduled. Please tell us whether itll be available for Free Download. Bec, we couldnt buy. Bec, if its working fine with all the options without any bug only, we can ask our company to buy 9iJD by stating the advantages. Just explain us.

  • How to use java output with other application

    hi ,
    I am using acme.crypto to encrypt data. this is completely written in java. i need to pass input to this using VB6 and return the output to VB6
    how can i achieve the same, is there any readily available dll that can be used in vb?
    I am rigorously searching solution, which i am not finding.
    I need to know how should i place the java code so that it could be used with VB, as i am new to java world. Do i need to create component using java bean or how?
    The code i refered above is nothing but encryption algorithm. I need to pass the input string from vb to java, which will process me the output which inturn should be passed to vb6.
    Kindly guide me through this.

    Why not create a Java ServerSocket in your Java program.
    Connect the VB program to this ServerSocket.
    Send the input to the Java Program over this socket and have the Java Program encrypt the information and pass it back on the same socket.
    Don't know how hard Sockets are in VB6 but a Server Socket in Java is simple.
    No need for new DLLs, JNI, etc.

  • Using Java Mail with lotus notes

    we are using lotus notes as default mail client and lotus notes server , there is no pop3 or smtp server as far as the intranet mailing goes,
    i am developing an application in which i have a form which the users will fill in if they forget their logging in passwords, as soon as they submit the form they will get an autogenerated email which will send them their passwords. considering the above scenario can i use java mail api for this

    No. If you aren't running the pop3 or smtp services then the Java mail API won't help you at all, unless there is a SMTP server somewhere that you can use to deliver mail to your Notes server. If you use Notes for external emails there must be a server somewhere!!??
    You can use the Notes Java API to create and send a document if you have the DIIOP service running on the Notes server.
    SH

  • Using Java Dictionary With Oracle

    Can Someone tell how can i configure my java dictionary with oracle...Currently if a create a table from my IDE and then deploy it it  deploys to the Default SAP DB ...how do  i directrly create  tables in oracle by just  specifying the Deploy option ...
    And further  on  I want my web Dynpro application to talk with oracle db..how do i acheive this..
    Please Help!!

    Hi, 
             Does this mean that the additional features of The Java Dictionary (bufferring etc ) can only be implemented if we ONLY connect to the SAP DB---- YES
    If I have to utilize the services of Java Dictionary in my application i can only use The SAP DB database -- YES
    You deploy a dictionary project to create a table in the DB.
    When it is a DB created and used by Web AS ,it is possible to create tables in that DB with dictionary project using the standard connection parameters specified in visual admin.
    Java Dictionary purpose is to create a DB abstraction by providing a standard interface to create tables whatever the DB used by WebAS maybe.
    Regards
    Bharathwaj
    Edited by: Bharathwaj R - Hope this makes it clear !

  • Tutorial on using client cert with Tomcat 5

    Hello,
    I'm looking for a tutorial on using client-cert method with tomcat 5.0.28 with jsp pages.
    I want to generate my own certs and keys.
    Is there anything like this on the web ?
    Thanks

    Maybe you could try searching the Tomcat mail archives or post your question to one of their mailing lists.
    http://jakarta.apache.org/site/mail.html

  • Using java files with JSP

    Ok, so im pretty new to this JSP lark and have a question.
    I have Java Classes resting in .java files, i need to know how
    do i link these files to my .jsp page so that the classes/variable etc.
    declared with the java files are recognised when they are come
    across in the .jsp file.
    I dont know if I have explained that properly.

    Just include this statement at the top of your jsp:
    <%@page import="yourpackage.yourclass"%>
    The .java files should of course be compiled into .class files prior to using (and you don't include the extension when importing).

  • When using Java Wizard with Firefox 3.6.23 on a Mac OS X 10.6.8 it keep getting an error message: "The Java Wizard cannot run. Please configure your browser to allow Java applets to access the filesystem." Have NO idea how to fix this problem.

    When trying to upload files I received the following error: "The Java Wizard cannot run. Please configure your browser to allow Java applets to access the filesystem."

    If the problem is with a site that is hosted using MOVEit DMZ by Ipswitch, please notify the site owner of the issue and ask them to apply the patch that is available on the support site to resolve the issue.
    This is a better resolution than downgrading your version of Java that was updated due to security issues.

Maybe you are looking for

  • Payment advice problem in F-30. Awaiting for your great reply....

    Hi, Can anyone let me know how should i make payment advice in F-30. I have a problem while making payment advice in TC: FBE1. in FBE1, if i can fill document no. field as invoice no. then while doing F-30 system will clear respective invoice automat

  • Links in the content area

    Hi, we have a iview that have a list of links, the iview is diplayed in a page in the content are on the right. Some of the links are open in a new window but other we want to display it on the content area, we want that the navigation panel will be

  • Application specific key-value pairs in jndi.properties

    Hello, Can I specify my application specific key-value pair in jndi.properties? I tried something like this java.naming.factory.initial=.jndi.WLInitialContextFactory java.naming.provider.url=t3://localhost:7001 myVar=myVal When i tried looking up "my

  • Help! Can't resize layer in Elem. 9!

    Hi! I need this immediately. I've opened a background in elements 9 & have opened/inserted a jpg layer onto it. Need to enlarge this jpg on the background, but when I try it changes the size of the "canvas" background. I'm desperate. Any solutions?!

  • Reassign assets without altering menus and buttons

    I created a DVD that contained too much data to fit on a 4.7 disc however I didn't notice this until after my menues were perfect and each button did exactly what I wanted it to do. Now I'm in the process of compressing my original movie so that it w