JDK1.4 Logging  -  Tomcat

Hi,
I am developing a web application where i need to load properties setting in the JDK1.4 Logging configuration file.
My application run on Tomcat.
In a nomal application, the location of the properties file can be specify in the java commmand line as follow:
java -Djava.util.logging.config.file=C:\j2sdk1.4.2_01\Project\config\logger.properties MainClass
My question is :
How do i specify in the Tomcat when i start the tomcat?
Do i specify in the xml file?
Or there is another way?
THank you very much.

btw: Obviously you need to put each properties file in
the relevant dir and not in a shared dir.Tomcat uses log4j internally right?I think by default the Commons Logging API is available in a standard installation of Tomcat 5 but log4j is not. So no, not necessarily.
And if two different 'apps' use the same class, then to provide
differentiation via 'app' then the log4j must be using the
class loader to differentiate property files.If you want to use log4j across all your applications then you put the log4j.jar into the $TOMCAT_HOME/common/lib dir, and the log4j properties file in $TOMCAT_HOME/common/classes/log4j.properties. If you want to use log4j only for a specific application you put these files in the WAR.
So any idea how one accesses that functionality in ones own application?Yes, see above.
And what happens if someone wants all the 'apps' to go to the same file? How does one turn that on and off?Again, see above.
HTH

Similar Messages

  • Logging tomcat messages

    On CF9,8,7 some of the error or warning messages that would write to CF\runtime\logs\ (Jrun4\logs case mutiserver) coldfusion-event.log and coldfusion-out.log are valuable to diagnosis of CF/jrun/java issues that can be rectified. While CF10 CFadmin > Debugging & Logging > Log Files has “server log” it misses much of the error or warning details that you could rely on from the coldfusion -event -out.log. It would be good if the tomcat/java details pertaining to Heap, Garbage Collection, Perm Space etc could be written to CF10 CFadmin > Debugging & Logging > Log Files or ColdFusion10\cfusion\runtime\logs for reference case any of those where having a problem? Perhaps something akin to native tomcat7-stderr.log or catalina.log would be useful details to have to check on CF/tomcat/java issues?
    I notice the tomcat/java messages can be seen via running CF10 in console mode however running CF in console mode is not always an option and having some kind of log history to refer to can be helpful to track down a problem and apply suitable change to fix.
    If  I deliberately crash CF10 by filling the Heap or Perm Space I can see Heap or Perm Space messages in console mode. If I run CF10 as a service (as you normally would) and apply same conditions to crash it there are no log contents to integrate and see  - I had a Perm Space problem, let’s stop that occurring again via such and such CFadmin > Server Settings > Java and JVM  alteration.
    Thanks in advance, Carl.

    Carl,
    We had identified this bug sometime back and this has been fixed.
    Regards,
    Rupesh

  • JDK1.3 + Tomcat  and International Characters-- Working!

    I am involved with a project that has people using a "command/ prompt" based system to enter data. Lets assume this is a simple java program that uses system.out. The data they are entering uses international characters such as the � character.and others. Now that the data was captured I wanted to display the data through JSP on a webpage. When doing so I ran into a problem where the � where translated into ?. Thus started the journey
    After much research, and alot of trial and error I came up with the following Test JSP that finally works
    ---- copy / past this to file and type it out from a windows command prompt ---
    <%@page contentType="text/html; charset=Cp1252" %>
    <% String test = "���������"; %>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=CP437">
    </HEAD>
    <BODY>
    TEST: XX <%=test%> XX
    </BODY>
    </HTML>
    When you do this you will see ��������� for the test string. By the way if you use Visual Slick you will see the characters properly as apposed to lets say note pad.
    Putting this file in a jsp and runing it under tomcat 4.01 you will see the expected result mainly:
    TEST: XX ��������� XX
    As you can see though by the file the character set the jsp is set to use is cp1252 but the meta tag uses cp437.
    which gives the desired effect of properly printing the characters as I would have hoped.
    So here is my question:
    Am I correct in assuming that the windows command prompt uses CP1252 as a character set (there for any dos / non-windows tool uses the same thing) and that Windows graphical ie notepad, and webpages uses CP437.
    Since this seems to be correct. Is this the right way of doing this? Seems a bit hard coded. I have not tried this on UNIX or a unix based text browser but I suspect this will not work on them. What is the correct way to do this?
    Thanks
    Mike..

    Wow, that seems like a sticky little issue to have overcome. I can offer you no better way to do it, but can wish you luck in your future endeavors!!!!

  • Tomcat 4.0 & JDK1.4

    I keep getting "Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated" warning AND "Class mypackage.myclass not found" errors
    I installed JDK1.4 locally and none of my webapps worked, so I re-installed JDK1.3 and I do not receive these errors when using jdk1.3 & tomcat 4.0 locally - my jsp find all of the classes and everything works great, locally. But when I try to deploy my webapp on my ISP server, I get the class not found errors. My older webapps on my ISP server which are identically conifgured are still working, but the new one will not work due to the erros mentioned above. I also tried
    <%@ page import="mypackage.myclass" %> and still receive class not found errors.
    All of my classes are in named packages, my jsp are in the ROOT folder, and classes in ROOT/WEB-INF/classes/mypackage.
    Is their any special configuration required for jdk1.4/tomcat 4.0 to work together successfully? I have read people referring to ensuring tools.jar is in the tomcat classpath. Will that solve this issue?
    Any help/ideas would be appreciated. Thanks all.

    still waiting for a response from tech support....but...
    I managed to get the webapp (same jsp & classes)running on another machine locally with jdk1.4 & tomcat 4.0.3, but still get the error on my ISP's server.
    Any suggestions for things that they should check in their configuration?
    I have confirmed that all of my jsp & classes are in the correct path, so I don't think there is anything else I can do.

  • Where are Tomcat Java server pages stored in JBuilder 4?

    From what I understand JSP pages should be saved into the ROOT directory of Tomcat.
    I have created a JSP page in Jbuilder 4 but when it saves, it is somewhere entirely different.
    If I right click on the JSP in Jbuilder 4 and select webrun it runs in Jbuilder fine.
    However if I try and run it from IE7 browser with address http://localhost:8080/hello.jsp I get a message saying internet explorer cannot display the page.
    I also did a search on my C drive to find the tomcat ROOT directory but could not find it.
    So what do I need to do in Jbuilder4 to be able to view my developed JSP pages in a browser?
    Thanks,
    Jason.

    Hello,
    I am using version 4 of JBuilder professional.
    I am getting the impression that JBuilder4 does not setup a proper instalation of Tomcat but sets up some temporary directory/link to it when you do a webrun on the JSP.
    Here is the log if it means anything to you:
    C:\JBuilder4\jdk1.3\bin\javaw -classpath "C:\JBuilder4\tomcat\lib\webserver.jar;C:\JBuilder4\tomcat\lib\jasper.jar;C:\JBuilder4\tomcat\lib\xml.jar;C:\JBuilder4\lib\servlet.jar;C:\JBuilder4\lib\webserverglue.jar;C:\OU2007\TM427\EasyBeans\myproject;C:\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\JBuilder4\jdk1.3\jre\lib\i18n.jar;C:\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\JBuilder4\jdk1.3\jre\lib\rt.jar;C:\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\JBuilder4\jdk1.3\lib\dt.jar;C:\JBuilder4\jdk1.3\lib\tools.jar" org.apache.tomcat.startup.Tomcat -config C:\OU2007\TM427\EasyBeans\conf\server8080.xml
    Starting tomcat. Check logs/tomcat.log for error messages
    Setting home to C:\OU2007\TM427\EasyBeans
    Context log: path="" Adding context path="" docBase="C:\OU2007\TM427\EasyBeans\"
    Starting tomcat install="C:\OU2007\TM427\EasyBeans" home="C:\OU2007\TM427\EasyBeans" classPath="C:\JBuilder4\tomcat\lib\webserver.jar;C:\JBuilder4\tomcat\lib\jasper.jar;C:\JBuilder4\tomcat\lib\xml.jar;C:\JBuilder4\lib\servlet.jar;C:\JBuilder4\lib\webserverglue.jar;C:\OU2007\TM427\EasyBeans\myproject;C:\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\JBuilder4\jdk1.3\jre\lib\i18n.jar;C:\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\JBuilder4\jdk1.3\jre\lib\rt.jar;C:\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\JBuilder4\jdk1.3\lib\dt.jar;C:\JBuilder4\jdk1.3\lib\tools.jar"
    JSP Servlet Started
    JSP Servlet Started (Echo)
    Context log path="" :tomcat.errorPage: init
    Context log: path="" File not found C:\OU2007\TM427\EasyBeans\WEB-INF\web.xml, using only defaults
    Context log path="" :jsp: init
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007 Scratch dir for the JSP engine is: C:\OU2007\TM427\EasyBeans\work\localhost_8080</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007 IMPORTANT: Do not modify the generated servlets</JASPER_LOG>
    Context log path="" :default: init
    Context log: path="" File not found C:\OU2007\TM427\EasyBeans\conf\tomcat-users.xml
    Starting endpoint port="8080" handler="org.apache.tomcat.service.http.HttpConnectionHandler"
    Starting endpoint port="8081" handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"
    HTTP:GET /myproject/mybeans/valuebean.jsp 17-Mar-07 08:06:37
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007 JspEngine --> /myproject/mybeans/valuebean.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007      ServletPath: /myproject/mybeans/valuebean.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007      PathInfo: null</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007      RealPath: C:\OU2007\TM427\EasyBeans\myproject\mybeans\valuebean.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007      RequestURI: /myproject/mybeans/valuebean.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007      QueryString: null</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007      Request Params: </JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:06:37 GMT+00:00 2007 Classpath according to the init parameter is: </JASPER_LOG>
    HTTP:GET /hello.jsp 17-Mar-07 08:07:15
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007 JspEngine --> /hello.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007      ServletPath: /hello.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007      PathInfo: null</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007      RealPath: C:\OU2007\TM427\EasyBeans\hello.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007      RequestURI: /hello.jsp</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007      QueryString: null</JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007      Request Params: </JASPER_LOG>
    <JASPER_LOG> Sat Mar 17 08:07:15 GMT+00:00 2007 Classpath according to the init parameter is: </JASPER_LOG>

  • Tomcat in win98 - please can anyone help??

    I've been trying to install Tomcat in win98 for the last couple of
    days....
    It now seems to run OK when I do startup and shutdown, but it won't
    display the homepage on localhost:8080. I get HTTP 500 error when
    Tomcat is running (and a 'page cannot be displayed' if it's not). And yes the port number is right.
    Can anyone think of anything I can try, please?

    IT WORKS!!!! Well, sort of.
    I tried the final combination of Tomcat 3.2.3 and my original JDK1.3. Before, I had been trying to set environment variables in sysedit, but when I just put JAVA_HOME and TOMCAT_HOME at the beginning of Tomcat.bat it did the trick.
    Sweet Tomcat index page! But then only about half of the jsp and servlet examples work properly - some only give http 500 error and some of them kind of half work. This is the kind of thing that happens (running 'Date')
    Day of month: is 27
    Year: is 2002
    Month: is June
    Time: is 11:11:14
    Date: is 6/27/2002
    Day: is Thursday
    Day Of Year: is 178
    Week Of Year: is 26
    era: is 1
    DST Offset: is 1
    Zone Offset: is 1
    Error: 500
    Location: /examples/jsp/dates/date.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.lang.NoSuchMethodError
    at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)
    at jsp.dates._0002fjsp_0002fdates_0002fdate_0002ejspdate_jsp_0._jspService(_0002fjsp_0002fdates_0002fdate_0002ejspdate_jsp_0.java:159)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
    at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    I don't think it likes my classpath very much. (I didn't alter it at all this time.) This is what I get when I start Tomcat:
    C:\jakarta-tomcat-3.2.3\bin>startup
    Unable to set CLASSPATH dynamically.
    Note: To set the CLASSPATH dynamically on Win9x systems
    only DOS 8.3 names may be used in TOMCAT_HOME!
    Setting your CLASSPATH statically.
    Using CLASSPATH: C:\jakarta-tomcat-3.2.3\classes;C:\jakarta-tomcat-3.2.3\lib\ant
    .jar;C:\jakarta-tomcat-3.2.3\lib\jasper.jar;C:\jakarta-tomcat-3.2.3\lib\jaxp.jar
    ;C:\jakarta-tomcat-3.2.3\lib\parser.jar;C:\jakarta-tomcat-3.2.3\lib\servlet.jar;
    C:\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\JAVAc:\jdk1.3\lib;c:.;C:\jdk1.3\lib
    \tools.jar
    Starting Tomcat in new window
    C:\jakarta-tomcat-3.2.3\bin>
    And in the new window:
    2002-06-27 11:16:49 - ContextManager: Adding context Ctx( /examples )
    Starting tomcat. Check logs/tomcat.log for error messages 2002-06-27 11:16:49 -
    ContextManager: Adding context Ctx( /admin )
    2002-06-27 11:16:49 - ContextManager: Adding context Ctx( )
    2002-06-27 11:16:49 - ContextManager: Adding context Ctx( /test )
    2002-06-27 11:16:50 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
    2002-06-27 11:16:50 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
    Anyway, it's a definite step in the right direction!

  • Full GC loops - JDK1.4.1

    Hi,
    we are using JDK1.4.1_01 with Tomcat 4.1.18 for a banking application with 20.000 hits per day and 2000 users (Win 2000, 4 GB, 2 2000 MHZ CPU).
    After 8 hours runtime and only some full gcs occuring (and a lot more minor gcs) Tomcat dies with OutOfMemory exceptions.
    In the verbose:gc output you can see that the vm hangs in a full gc loop without reducing the heap and although there is only 100M of 1500M heap used.
    The systems can't respond due to the fact one full gc is starting after the one that has just finished.
    At this stage we have no idea why. Only restarting Tomcat helps and ensures us another 8 hours online time.
    The vm parameters are the following:
    -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:NewRatio=3 -Xms1536M -Xmx1536M -XX:-DisableExplicitGC -Xloggc:logs\tomcat-gc-collections.txt -Dcatalina.base="d:\apps\tomcat" -Dcatalina.home="d:\apps\tomcat" -Djava.io.tmpdir=d:\apps\tmp -Dhostmode=avus -Dlog4j.configuration=log4J.properties -Djava.naming.factory.initial=com.inprise.j2ee.jndi.CtxFactory -Djava.naming.factory.url.pkgs=com.inprise.j2ee.jndi -Dvbroker.agent.port=14449
    The catalina.log states the following:
    003-06-23 16:31:49 HttpProcessor[80][36] process.invoke
    java.lang.OutOfMemoryError
    2003-06-23 16:31:49 HttpProcessor[80][25] process.invoke
    java.lang.OutOfMemoryError
    Thanks for any help
    Oliver

    is it just me or did you disable explicit garbage collection meaning that calls to System.gc() are ignored ...
    personally I think it is probably better to force calls when they are needed (i.e. when you're placing a lot of young objects into the heap)
    However as to why full gc isn't reducing the free memory - sound buggy to me.

  • Tomcat and SSL

    Hi I'm getting an error when I try to run SSL with tomcat. Does anybody know how to solve this. THanks for your help in advance
    Starting tomcat. Check logs/tomcat.log for error messages
    2001-08-20 03:47:44 - ContextManager: Adding context Ctx( )
    2001-08-20 03:47:44 - ContextManager: Adding context Ctx( /test )
    2001-08-20 03:47:44 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
    FATAL:java.net.BindException: Address in use: JVM_Bind
    java.net.BindException: Address in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397)
    at java.net.ServerSocket.<init>(ServerSocket.java:170)
    at java.net.ServerSocket.<init>(ServerSocket.java:121)
    at javax.net.ssl.SSLServerSocket.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>([DashoPro-V1.
    2-120198])
    at com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerS
    ocket([DashoPro-V1.2-120198])
    at org.apache.tomcat.net.SSLSocketFactory.createSocket(SSLSocketFactory.
    java:120)
    at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoi
    nt.java:239)
    at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.jav
    a:188)
    at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
    at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
    at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

    trying to bind to port 443 This is the default HTTPS port, used when you are only specifying the protocol (HTTPS:) without an explicit port, like https://localhost/something. Just like the default port for HTTP: would be 80. A default setup of Tomcat simply adds 8000 to the default ports, making them 8080 and 8443.
    Hmmmm, I do not see any reference to the 443 port in the posted error -- the only problem I see is the 8080 port.
    "Micksta" wrote:
    I try to run SSL with tomcatDoes this imply you have changed Tomcat's server.xml to handle SSL, or that you forward SSL request from a webserver to Tomcat?
    Just to be sure: a single Tomcat instance handles both HTTP: and HTTPS: (if setup to do that). In other words: you do not have to run Tomcat twice to support both HTTP: and HTTPS:. When you want to use the default ports (80 and 443) and also have another webserver running (like Apache) then you would need to forward the requests from Apache to Tomcat.
    a.

  • Crystal rpeort java(crj) not support weblogic 10.3.6 jdk1.6

    Hi,
    My system use weblogic 10.0 jdk1.5 with crystal report java (crjava-runtime_12.2.217) is work find, but we want to upgrade server to weblogic 10.3.6.
    In the crystal report java (crjava-runtime_12.2.217) document say weblogic 10.3.6 only support 1.5.0_04.
    I install jdk1.5 with weblogic 10.3.6 the server can't started success, it well say bad version for .class.
    I can't accept is any brand application server have support jdk1.6.
    Only Weblogic not support jdk1.6(Tomcat support 1.6 and is free).
    Someone can help me to finish server upgrade?
    Thank you very much.
    crystal report java (crjava-runtime_12.2.217) support document:
    Web Application Servers       
    JDK Support
    ===========================================================
    * JBoss 4.2
    1.5
    * JBoss 5
    1.5
    * JBoss 7.1
    1.6
    * Oracle Application Server 10g R3 (10.1.3)
    1.5.05
    * SAP Web Application Server 7.1
    1.5
    * SAP Web Application Server 7.31 SP4
    1.6
    * SAP Web Application Server 7.40
    1.6
    * Tomcat 5.5
    1.5.0_x
    * Tomcat 6.0
    1.5+/1.6
    * Tomcat 7.0.25
    1.6
    * WebLogic 9.2
    1.5.0_04
    * WebLogic 10.2
    1.5.0_04
    * WebLogic 10.3
    1.5.0_04
    * WebSphere 6.1
    1.
    * WebSphere 7.0
    1.5
    * WebSphere 8.5
    1.6

    Hi,
    The standalone weblogic 10.3.6 does support jdk 1.6 and not jdk1.5
    if crystal report works only with wls 10.3.6 with jdk 1.5, then you need to check if there is any other version of crystal report that can be used with wls 10.3.6 + jdk 1.6
    Thanks,
    Sharmela

  • How to view the tomcat errors in another file

    hi friends,
    i am starting tomcat by using startup.bat, in the console i can see the startupe messages, but when i execute the jsp page it throws some errors, because the window run fast i cannot see the previos errors.
    how to redirect these errors in to a file ???
    i tried using startup.bat > error.txt, but there it is not writing the errors.In tomcat logs also i cannot see the errrors.
    can any one telll how to see this
    thanks
    vin

    Tomcat uses the log4j API. You can put a log4j.properties file in your application classpath (WEB-INF/classes/log4j.properties) and in that properties file you can redirect tomcat log output to a file. The content could be like this:
    log4j.properties:
    # a default stdout console appender. When debugging from an IDE, this will end up in the output window
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
    # tomcat file log appender
    log4j.appender.TA=org.apache.log4j.FileAppender
    log4j.appender.TA.layout=org.apache.log4j.PatternLayout
    log4j.appender.TA.layout.ConversionPattern=%d %p [%c] - %m%n
    log4j.appender.TA.File=c:/log/tomcat.log
    log4j.appender.TA.append=true
    # configure the tomcat logger to use the tomcat file appender. Only warnings and higher are sent to the logfile
    log4j.logger.org.apache=WARN, TA
    Check out the log4j documentation for more details.
    Edited by: gimbal2 on Feb 5, 2008 3:19 PM

  • Seeting up tomcat to run beans

    Hi. I installed jdk1.3/tomcat 4.0 on my windows 2000 server, and it runs well with html and "plain" JSPs, but when I try to load a bean-calling JSP, got an "class not found" error. It seems tomcat cannot find mybean.class.
    Somebody told me I had to "register" the bean in server.xml, but didn�t work.
    There exists any standard procedure to run beans in tomcat? Thanks.

    you dont have to register javabeans in doc descriptor (and certailnly not server.xml). Most likely the bean is not in the class path. To keep it simple, If your bean's fully qualified name is com.foo.SomeBean then make sure you have SomeBean.class file at WEB-INF\classes\com\foo\ directory.

  • Tomcat servlet question.

    I created a really simple servlet named Log ( "Hello World") that was created in a Packet called World.
    When I try to run this servlet using
    http://1#.3#.1#4.1#9:8080/World/servlet/Log
    Tomcat generated this error :
    Error: 500
    Location: /World/servlet/Log
    Internal Servlet Error:
    java.lang.NoClassDefFoundError: Log (wrong name: World/Log)
         at java.lang.ClassLoader.defineClass0(Native Method)
    How can I call this servlet ?
    I has been using servlets with websphere without problems.
    Thanks in advance.

    JSP's don't have to be registered but they can. Servlets that are not in packages can be put directly into WEB-INF/classes and not registered.
    As a caveat,this may not apply for all servers. I know that weblogic requires that all servlets be registered and mapped to an alias.

  • Tomcat is acting weird!

    Hi,
    I had tomcat 3.2.3 and j2sdk 1.3.1 and everything was working fine and I developed a number of projects in jsp. One fine morning I decided to install j2ee as well as upgrade j2se. I installed j2sdk 1.4.0_03 and j2sdkee 1.3.1. Since then the Tomcat server wont start, it quits by giving the following error;
    2003-03-30 00:14:09 - ContextManager: Adding context Ctx( /examples )
    Starting tomcat. Check logs/tomcat.log for error messages 2003-03-30 00:14:09 -
    ContextManager: Adding context Ctx( /admin )
    2003-03-30 00:14:22 - ContextManager: Adding context Ctx( )
    2003-03-30 00:14:23 - ContextManager: Adding context Ctx( /test )
    Exception in thread "main" java.lang.AbstractMethodError: org.apache.tomcat.faca
    de.ServletContextFacade.getResourcePaths(Ljava/lang/String;)Ljava/util/Set;
    at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocations
    Cache.java:202)
    at org.apache.jasper.compiler.TldLocationsCache.<init>(TldLocationsCache
    .java:139)
    at org.apache.jasper.EmbededServletOptions.<init>(EmbededServletOptions.
    java:345)
    at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    at org.apache.tomcat.core.Handler.init(Handler.java:215)
    at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
    at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
    StartupInterceptor.java:130)
    at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
    :491)
    at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
    at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
    at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
    What could be wrong? Is that the Tomcat is looking for an older mouse (older version of j2se)? Please help me as I am totally stuck!
    Thanking you,
    Rajesh

    Hi,
    My poor little cat is still dead... :(
    Could any one please help me?
    Thank you,
    Rajesh

  • Deploy .war on tomcat 5.5.9

    hi,
    i try to deploy a app in tomcat with SO Centos 5.2 but trow the next error ; running the wepapp installled with adfinstaller
    Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /wm/bc4j.jsp(5,0) The value for the useBean class attribute oracle.jbo.client.wm.WebMonitorBean is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /wm/bc4j.jsp(5,0) The value for the useBean class attribute oracle.jbo.client.wm.WebMonitorBean is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
    i install with all instrunctions related in oracle adfinstaller
    http://www.oracle.com/technology/products/jdev/htdocs/11/as_supportmatrix.html#1013
    and
    http://www.oracle.com/technology/software/products/jdev/htdocs/adfinstaller.html
    my aplication use Mysql but not found
    thanks

    hi,
    i using Jdeveloper 10.1.3.4. and i try deploy on tomcat 6.0.18. when i see the log tomcat cant`a context file i try configure some parameters in web.xml
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <description>
    </description>
    <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
    <param-value>true</param-value>
    </context-param>
    this is the log fo tomcat when try start up the app
    23/02/2009 08:25:32 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
    23/02/2009 08:25:32 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
    23/02/2009 08:25:33 AM org.apache.coyote.http11.Http11AprProtocol init
    INFO: Inicializando Coyote HTTP/1.1 en puerto http-8286
    23/02/2009 08:25:33 AM org.apache.coyote.ajp.AjpAprProtocol init
    INFO: Initializing Coyote AJP/1.3 on ajp-8009
    23/02/2009 08:25:33 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 831 ms
    23/02/2009 08:25:33 AM org.apache.catalina.core.StandardService start
    INFO: Arrancando servicio Catalina
    23/02/2009 08:25:33 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    23/02/2009 08:25:33 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Despliegue del archivo WebAppTest.war de la aplicaci�n web
    23/02/2009 08:25:34 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/WebAppTest'
    23/02/2009 08:25:35 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Despliegue del archivo webtest.war de la aplicaci�n web
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Short,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Short)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Byte,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Byte)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Integer,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Integer)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Long,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Long)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Float,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Float)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Double,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Double)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ValidatorRule end
    ADVERTENCIA: [ValidatorRule]{faces-config/validator} Merge(javax.faces.LongRange)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.DateTime,null)
    23/02/2009 08:25:36 AM com.sun.faces.config.rules.ConverterRule end
    ADVERTENCIA: [ConverterRule]{faces-config/converter} Merge(javax.faces.Number,null)
    23/02/2009 08:25:36 AM org.apache.catalina.core.StandardContext start
    GRAVE: Error listenerStart
    23/02/2009 08:25:36 AM org.apache.catalina.core.StandardContext start
    GRAVE: Fall� en arranque del Contexto [webtest] debido a errores previos
    23/02/2009 08:25:37 AM org.apache.coyote.http11.Http11AprProtocol start
    INFO: Arrancando Coyote HTTP/1.1 en puerto http-8286
    23/02/2009 08:25:37 AM org.apache.coyote.ajp.AjpAprProtocol start
    INFO: Starting Coyote AJP/1.3 on ajp-8009
    23/02/2009 08:25:37 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3888 ms
    and this is the log of localhost
    javax.servlet.jsp.JspException: Cannot find FacesContext
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:427)
         at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:125)
         at org.apache.jsp.index_jspx._jspx_meth_f_005fview_005f0(index_jspx.java:92)
         at org.apache.jsp.index_jspx._jspService(index_jspx.java:70)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
         at java.lang.Thread.run(Unknown Source)
    thanks for you help
    Edited by: JuanAndresDeveloper on 23-feb-2009 6:12

  • Where, oh where, is Tomcat

    Anyone know where Tomcat has got off to?  The Wiki points to a folder called "Incoming" on the Arch FTP server.  That directory doesn't appear to exist at the moment.  There were some forum postings about Incoming being offline in March or something like that.
    Failing an actual precompiled package, does anyone have a working PKGBUILD for Tomcat?
    I'd be grateful for any leads or help.
    Bob Pisciotta
    Prairie Village, KS

    Hola, a few time ago i needed Tomcat to make a project for my university, so i've looked for an arch package on the ftp and i've found PKGBUILD and stuff needed to make tomcat works. The original PKGBUILD was from Bryan Bulten bbulten AT telus.net and it was for tomcat 5.0.something, now i've modified it to make it works with tomcat 5.5.9 adding a few things from Dusty's one and a few changes needed to make it works with archlinux... (I hope it works... i'm gonna try it in a while )
    here u are
    PKGBUILD:
    pkgname=tomcat
    pkgver=5.5.9
    pkgrel=1
    pkgdesc="Servlet container for Java Servlet and JavaServer Pages"
    url="http://jakarta.apache.org/tomcat/index.html"
    depends=('j2re')
    conflicts=()
    backup=()
    install=
    source=(http://mirrors.publicshout.org/apache/jakarta/$pkgname-5/v$pkgver/bin/jakarta-$pkgname-$pkgver.tar.gz)
    md5sums=('35ea177af353446af1de3c762a4f0f4d')
    build() {
    mkdir -p $startdir/pkg/opt
    cp -R $startdir/src/jakarta-$pkgname-$pkgver $startdir/pkg/opt/tomcat
    cd $startdir/pkg/opt/tomcat
    rm LICENSE
    rm NOTICE
    rm RUNNING.txt
    rm RELEASE-NOTES
    rm bin/*.bat
    rm bin/*.exe
    install -D -m644 $startdir/tomcat.conf.d $startdir/pkg/etc/conf.d/tomcat
    install -D -m755 $startdir/tomcat $startdir/pkg/etc/rc.d/tomcat
    tomcat.conf.d :
    # Java runtime
    JAVA_HOME=/opt/java
    JRE_HOME=/opt/java/jre
    # Web application location
    CATALINA_HOME=/opt/tomcat
    CATALINA_BASE=${CATALINA_HOME}
    # Tomcat's user
    CATALINA_USER=tomcat
    # Log location
    CATALINA_OUT=/var/log/tomcat/catalina.log
    # Location of tomcat libraries
    CATALINA_LIBDIR=${CATALINA_HOME}/common/lib
    # Classpath for tomcat
    CLASSPATH=${CLASSPATH}:${CATALINA_LIBDIR}
    # (Optional) Temporary directory the JVM should use
    #CATALINA_TMPDIR=${CATALINA_HOME}/temp
    # Tomcat startup/shutdown
    TOMCAT_START="start"
    TOMCAT_STOP="stop"
    tomcat :
    #!/bin/bash
    # source application-specific settings
    [ -f /etc/conf.d/tomcat ] && . /etc/conf.d/tomcat
    # general config
    . /etc/rc.conf
    . /etc/rc.d/functions
    case "$1" in
    start)
    stat_busy "Starting Tomcat Daemon"
    ${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_START} >& /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    add_daemon tomcat
    stat_done
    fi
    stop)
    stat_busy "Stopping Tomcat Daemon"
    ${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_STOP} >& /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon tomcat
    stat_done
    fi
    restart)
    $0 stop
    sleep 3
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac

Maybe you are looking for

  • 64 bit application server for a 32 bit Oracle DB on ECC 6.0 ?

    Hallo, We are planning an upgrade from our current ECC 5.0 to an ECC 6.0 version. We are now running our productive system on a Windows 2003 - 32 bit platform. We do not have performance problems so far, and we might keep our actual hardware, but we'

  • Error: Missing Parameter Values on

    I've started experiencing the "Missing Parameter Values" error on a report containing a subreport. All of my other reports can export just fine, but just not the one with the subreport. The report (and the subreport) both use a stored procedure to re

  • Wine 1.0 for 64 bit with CoD4 patch.

    If anyone wants the new wine with the CoD4 patch. (So you can play Call of Duty 4 with this.) Version: 1.0 rc1-1 Architecture: x86_64 pacman -U http://download249.mediafire.com/yue2jvbxom9g/m4qtpxjabap/wine-1.0_rc1-1-i686.pkg.tar.gz That ought to do

  • Standard program for creating outbound IDoc holding wbs+cost plan

    Hello, a) Before we start developing our own ABAP, I would like to ask the forum if somebody knows if there is already a standard ABAP program for generating outbound IDocs including wbs-element data (CJ20N; wbs ID, description) plus annual data from

  • Been away for 4 months- just come back and time machine wont back up

    Ive just been traveling for 4 months and left my 1TB Time Machine @ home. I just came back - plugged it in so that time machine could do a back up but, it says it can't, because it has been over 127 days - or something like that. Now it says it need