AW: Loosing Connections in a pool
Do you use a connection pool or do you have connections open for several hours ? Most databases have a maximal time frame for an open connection. So your software (or the connection pool you're using) has to be prepared to reconnect if the server closes the connection. -Ursprüngliche Nachricht- Von: Dan Randall [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 4. Mai 2001 20:32 An: [EMAIL PROTECTED] Betreff: Loosing Connections in a pool Hi, My tomcat application runs in a production environment for about 24 hours before it fails and must be restarted. During that time JDBC connections to Oracle become ignored and eventually disappear. A fair guess is that I am loosing memory, threads and resources in general until there is nothing left and only a restart cures the matter. Unfortunately, tomcat, rather than apache is serving much of the pages and graphics. That may be a contributing factor? I am using: Solaris 8 Oracle 8.1.7 tomcat 3.2.1 apache 1.3.19 and Java 1.3 Does anyone have an idea of what sort of problems I might be having? Any known resource leaks or threading issues? Thanks!! Dan
Re: log4j and tomcat
You can try the following: String propPath = conf.getServletContext().getResource(/WEB-INF/classes/log4j.properties); PropertyConfigurator.configure(propPath); ... regards Winfried Hello there! I was wondering if anybody could help with a tomcat and log4j problem? I have placed my log4j.properties file into my WEB-INF/classes direcotry but it seems that Tomcat is not picking it up! This is the line in my code in my .java file taht tells me what .properties file to look for PropertyConfigurator.configure(log4j.properties); If I put in the full path to the .properties file, it still does not seem to find it! It tells me the following the error message: (but the application in the browser works fine log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:64) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:289) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:308) at security.security.init(security.java:32) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at java.beans.Beans.instantiate(Beans.java:207) at java.beans.Beans.instantiate(Beans.java:51) at jason.security._0002fjason_0002fsecurity_0002flogin_0005fhandler_0002ejsplogin_0005fhandler_jsp_0._jspService(_0002fjason_0002fsecurity_0002flogin_0005fhandler_0002ejsplogin_0005fhandler_jsp_0.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) log4j:ERROR Ignoring configuration file [log4j.properties]. any help is appreciated! Jason --- Anuj Agrawal [EMAIL PROTECTED] wrote: Yes it can. You might want to consider creating a log4j.properties file to hold your log4j configuration. Have that file in your WEB-INF/classes dir and tomcat would automatically pick it up. HTH. Anuj. teh j wrote: I have recently started playing with log4j. Does anybody know if it can be used with Tomcat? I have a a JSP app running on tomcat that has several beans and classes and was wondering if I could use log4j as a logging tool _ http://store.yahoo.com.au - Yahoo! Store - It's time you had your business online!
Re: JAVA vs. PERL startup time + memory
Thanks James, You had solve my problem i had stuck for a month. You are right !!! Apache spawn only one CustomLog process. But it seems like Apache's Log to pipe feature only works on unix. When i try to pipe the log to a java application in windows, it seems not working. on unix: CustomLog |java -classpath /opt pipe common on windows 2000: CustomLog |java -classpath d:\ pipe common // doesn't work in windows I had verfiy the classpath and java path is right by runing the java app in windows terminal. more comment would be more than welcome. thanks. --- James Klicman [EMAIL PROTECTED] wrote: Choose whichever language you want and don't worry. Apache will spawn only one CustomLog process for all log records. It will only start a new process if the pipe hangs or the log process dies. It would be ridiculously inefficient if Apache spawned a new process to log each record. -James On Sat, May 05, 2001 at 06:07:52PM -0700, tim leung wrote: My problem is I must use unix pipe. e.g. command1 | command2 where command1 is some unix command. where command2 is java PipeReader that is output of command1 sent to input of java application -- PipeReader. why I must use pipe? because I am using apache web server. apache server will do logging to a text file. instead of log to text file. I can also log to a pipe : // apache server log to a pipe instead of log file e.g. CustomLog |java -classpath /opt pipe common I pipe the log's (byte sent) / sessionID etc... to the application and the application will HTTP POST the log back to servlet for further processing. the suggestion of unix pipe to a running process (daemon) is what I really want to do but i dont' think there is a way to do it. inorder to pipe the command1's Output to java app PipeReader's Input (stdin). I must invoke a new JVM process inorder to do pipe. right? any one can help me out? thanks. --- Ross Dyson [EMAIL PROTECTED] wrote: The JVM is loaded just ONCE not once pre request. This is WHY java back-ends have better performance and are scalable. -Original Message- From: tim leung [mailto:[EMAIL PROTECTED]] Sent: Sunday, 6 May 2001 4:39 AM To: [EMAIL PROTECTED] Subject: JAVA vs. PERL startup time + memory Hi, I am thinking of write an unix app that will get data from a pipe e.g. | and then will do a HTTP POST to some server. e.g. command1 | java PipeReader-- OR -- e.g. command1 | perl PipeReader Assume I need to invoke the JVM process or PERL process very frequently ( 5 times / sec ) -- ( 300 times / min ) I know that Java's startup time is slow. and it allocation a block of per-defined memory when it starts up. like 2MB. although it may only use 300KB. so. I think start a JVM process is SLOW and need lots of memory. I am not very familiar with PERL. I wonder if I invoke 300 PERL process / min, is it faster and use less memory than invoke 300 JVM process / min? Both will do the same thing.-- each time it's' invoked, it will do a HTTP POST of some data get from the pipe ( stdin ) and then System.exit(). thanks. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: WAP
Hi, there is a bug in tc 3.2, you have to put the mime types in the web.xml under your application yourApplication/web-inf/web.eml Arthur - Original Message - From: Olsen Odd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 8:10 AM Subject: WAP Hi When I try to run WML on Tomcat 3.2, I get MIME type text/plain is not supported I have put the mime types for WML in /conf/web.xml as you can see below and is using Nokia WAP Toolkit. It all worked great when I use Tomcat 3.1 and I can't see why it shouldn't work on 3.2. What more I can do? /Odd !-- Start WAP extensions -- mime-mapping extensionwml/extension mime-typetext/vnd.wap.wml/mime-type /mime-mapping mime-mapping extension wbmp /extension mime-type image/vnd.wap.wbmp /mime-type /mime-mapping mime-mapping extension wmlc /extension mime-type application/vnd.wap.wmlc /mime-type /mime-mapping mime-mapping extension wmls /extension mime-type text/vnd.wap.wmlscript /mime-type /mime-mapping mime-mapping extension wmlsc /extension mime-type application/vnd.wap.wmlscriptc /mime-type /mime-mapping !-- End WAP extensions -- _ Odd Olsen Volvo IT Dept 2540, DA2N SE-40508 Goteborg, Sweden Telephone: +46 31 7655718 E-mail: [EMAIL PROTECTED]
Re: log4j and tomcat
Oops, correcting... String propPath = conf.getServletContext().getResource(/WEB-INF/classes/log4j.properties).getPath(); PropertyConfigurator.configure(propPath); ...
tomcat on sco
Hi, I have a UNIX system running SCO OpenServer 5.0.6. Can anyone help me with info on how to compile tomcat together with all the neccessary apps? Does anyone know where I can find the binaries for SCO? Thanks Raymond
Re: Compiling mod_jserv on AIX 4.3 for Apache 1.3.12
I have spent 3 days to make it work on my AIX Box !!! So : Autochange has not to be include in the mod_jserv so compile it with : apxs -c mod_jserv.c jserv*.c Then , I've some probleme with the linking so, you must modify the apxs script : my $CFG_LDFLAGS_SHLIB = q( -bexpall -bM:SRE -bnoentry -bI:/bin-gms/Binaries/AIX/apache_1.3.19/libexe c/httpd.exp -lc -ldl); # substituted via Makefile.tmpl If it doesn't work, I can send you my binary. I don't success to compile mod_jk, so if someone has any tips Here's the problem : gcc -DAIX=43 -DUSE_PTHREAD_SERIALIZED_ACCEPT -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/bin-gms/Bina ries/AIX/apache_1.3.19/include -I../jk -I/usr/jdk_base/include -I/usr/jdk_ba se/include/aix -c ../jk/jk_jni_worker.c ../jk/jk_jni_worker.c:764: warning: #warning --- ../jk/jk_jni_worker.c:765: warning: #warning NO JAVA 2 HEADERS! SUPPORT FOR JAVA 2 FEATURES DISABLED ../jk/jk_jni_worker.c:766: warning: #warning --- In file included from /usr/jdk_base/include/aix/float_md.h:21, from /usr/jdk_base/include/aix/jni_md.h:22, from /usr/jdk_base/include/jni.h:36, ... - Original Message - From: Ron Parker [EMAIL PROTECTED] To: Tomcat [EMAIL PROTECTED] Sent: Saturday, May 05, 2001 2:34 AM Subject: Compiling mod_jserv on AIX 4.3 for Apache 1.3.12 I have installed Jakarta-Tomcat 3.2.1 on an AIX 4.3 system. Standalone works fine. I'd like to run it under Apache 1.3.12, which is also installed with dso support. I followed instructions in Obtaining the Jserv Module (mod_jserv) section of online tomcat user's guide and executed: apxs -c -o mod_jserv.so *.c days to make This is the error I get: # /usr/local/apache/bin/apxs -c -o mod_jserv.so *.c cc -DAIX=43 -U__STR__ -DAIX_BIND_PROCESSOR -qnogenpcomp -qnousepcomp -DUSE_HSREG EX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -c autochange.c autochange.c, line 72.5: 1506-046 (S) Syntax error. autochange.c, line 79.5: 1506-046 (S) Syntax error. autochange.c, line 79.64: 1506-191 (E) The character @ is not a valid C source character. autochange.c, line 79.69: 1506-191 (E) The character @ is not a valid C source character. autochange.c, line 79.8: 1506-045 (S) Undeclared identifier Parse. autochange.c, line 104.5: 1506-046 (S) Syntax error. autochange.c, line 104.8: 1506-045 (S) Undeclared identifier Print. autochange.c, line 107.5: 1506-046 (S) Syntax error. autochange.c, line 108.9: 1506-046 (S) Syntax error. autochange.c, line 109.5: 1506-046 (S) Syntax error. autochange.c, line 111.8: 1506-045 (S) Undeclared identifier Start. autochange.c, line 114.9: 1506-046 (S) Syntax error. autochange.c, line 114.12: 1506-045 (S) Undeclared identifier Increase. autochange.c, line 116.12: 1506-045 (S) Undeclared identifier Copy. autochange.c, line 119.9: 1506-046 (S) Syntax error. apxs:Break: Command failed with rc=65536 Can someone please tell me what I need to do about this. Thanks. -ron -- Ron Parker Software Creationshttp://www.scbbs.com TradeWinds Publishing http://www.intl-trade.com TradePoint Los Angeleshttp://www.tradepointla.org SiteDirector Security Server http://livepublish.scbbs.com Civil War Online Library http://civilwar.scbbs.com
tomcat starts taking full CPU
Hi, we have a problem with our tomcat 3.2.1 and Apache 1.3.12. (JDK 1.3.0_02 on Redhat 6.2) After about a day of operation, a couple of processes of tomcat start taking full CPU (for example, 4 processes at more or less 25% each, or 2 processes at more or less 50%). This is without tomcat even being used (the servlets and jsp pages are not being called). If tomcat is shut down, a couple of processes of Apache start taking full CPU immediately (as with tomcat). When restarting Apache, everything goes back to normal. Could someone have an idea what the problem is here ?? Thx. Geert.
Re: Tomcat/Xalan
The problem is with the DOM level used by the different xml packages. Tomcat 3.x exposes the interfaces in its xml package to all Tomcat 3.· does not suffer this problemit has a classloading scheme where webapps obtain a clean classloader with only servlet.jar in it.. So is not 3.X is tomcat 3.2.x and down :).. Hip hip horay. Woot. Yippie, etc... Can we have a big banner? There is light at end of tunnel for using xmlc with tomcat. Jim
NT Service question
Hi, I set up Tomcat to work as NT service and it works fine. Now I want to install Tomcat on several other computers. As Tomcat is installed in different paths on the different computers, I have to change the wrapper.properties (JAVA_HOME and TOMCAT_HOME) manually. My question is: Can I tell Tomcat to take the environment settings of TOMCAT_HOME and JAVA_HOME in wrapper.properties. This variables are already set for TOMCAT in normal mode. This could help me a lot. Thanks for any help Stefan
Building mod_jk for solaris
Hi! I'm trying to compile mod_jk.so under solaris 2.6 . Using ./build-solaris.sh of jakarta-tomcat-3.3-m2 + Apache/1.3.12 (Unix) I get only this weird msg Command failed with rc=... from apxs. java -version = Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) I already tried to build mod_jk from the tomcat.3.2.1 sources, but I get the same error again and again. Below you find the ouput of ./build-solaris.sh Any ideas? Regards Mounir Building mod_jk gcc -DSOLARIS -DUSE_EXPAT -I../lib/expat-lite -I/usr/local/apache/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_ajp12_worker.c [...] gcc -DSOLARIS -DUSE_EXPAT -I../lib/expat-lite -I/usr/local/apache/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c mod_jk.c -o mod_jk.so mod_jk.o jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o -lposix4 apxs:Break: Command failed with rc=16711680 Error with apxs __ Do You Yahoo!? Gesendet von Yahoo! Mail - http://mail.yahoo.de
URL rewriting + RequestDispatcher.forward(...)
Hello, our configuration is as follows: Production: RedHat 6.1 IBM JDK 1.1.8 Apache httpd 1.3 9 Tomcat 3.2.1 Development: Win NT 4.0/Win 98 IBM JDK 1.1.8 Apache httpd 1.3 9 Tomcat 3.2.1 The developed application works fine with cookie browser support, but without cookie support, we run in one special problem. We use mod_rewrite in Apache httpd in order to handle URL's like: http://www.domain.com/shop/cashstyle.jsp;jsessionid=7y5yoj91n2?act=startste p=1 This works right. In the Java application we use response.encodeURL(...) to instruct Tomcat to generate an URL with the current session id. This method call we use in different JSP-files, but also in public methods of some JavaBeans, which generates HTML output. Let's construct the following situation: = We have a method, that construct the following URL: 1. with cookie support url_1 = http://www.domain.com/shop/cashstyle.jsp?act=startstep=1 2. with URL rewriting url_2 = http://www.domain.com/shop/cashstyle.jsp;jsessionid=7y5yoj91n2?act=startste p=1 When we now use the two constructed url's with the following method calls, we get different results: context.getRequestDispatcher(url_1).include(request, response); result: O.K., page with url_1 will be included ... context.getRequestDispatcher(url_1).forward(request, response); result: O.K., it will be forwarded to the page with url_1 context.getRequestDispatcher(url_2).include(request, response); result: O.K., page with url_2 will be included ... context.getRequestDispatcher(url_2).forward(request, response); result: FAILED, NO FORWARDING !!! We have now implemented as workaround a method, that looks for a session id in the path parameter, if a RequestDispatcher.forward(...) should be processed, and cuts it (;jsessionid=xyz24356). But this isn't a nice solution !!! QUESTION: Why doesn't work a forward with an URL with a jsessionid ? Thanks in advance, Ralf Zimmerer. (temporary at Dresdner Bank: [EMAIL PROTECTED]) NINA.de Internet Service Agentur http://www.nina.de/ http://www.liveshop.de/
wired CLASSPATH behaviour
Hay there, when I was deploying a application on Tomcat 3.2.1 we had some really wired Problems with CLASSPATH issues. First of all this is the environment: * apache 1.3.14 * mod_jk.so * tomcat 3.2.1 on Redhat 6.2 JVM 1.3 (Sun distribution) ok. So we were putting JDBC Drivers of IBM (db2java.zip) on various places where we should be able to put them. 1. we put it into the $TOMCAT_HOME/lib/ to be include for whole tomcat. (did not work) 2. we put it into the CLASSPATH environment inside the $TOMCAT_HOME/tomcat.sh script (did not work) 3. we put it into $TOMCAT_HOME/webapps/our_app/WEB-INF/lib/ (did not work) 4. we unpacked the zip file and put the package tree under $TOMCAT_HOME/webapps/our_app/WEB-INF/classes/ -- YUHEE, it worked. the depressing part of it was, that db2java.zip and the _right_ Path to it was shown in the CLASSPATH variable on every of the setups (System.out.println, or shellscript ECHO). But the JDBC Driver Manager dumped no suitable driver found. It took me quite a lot of time to make the application run, cause there was no reason for the failure (If you have a package in your classpath, then you would suggest that it is loaded, right?). Anyways. The whole adventure brings me to the conclusion that either the CLASSPATH environment of Sun JDK 1.3 for Linux is not working properly or .. the dynamic loading of packages of TomCat is not fully reliable (which I honestly do not believe). Does anyone had similar Problems, and can someone give me a tip for where to put JDBC Driver packages inside a Webapp? (WEB-INF/lib/ I thought, but) thx. and regards roman
Re: wired CLASSPATH behaviour
Hi, Roman Just a thought, but have you tried RENAMING the file db2java.zip to db2java.jar? Regards, Noel Lecaros Gerteis, Roman wrote: Hay there, when I was deploying a application on Tomcat 3.2.1 we had some really wired Problems with CLASSPATH issues. First of all this is the environment: * apache 1.3.14 * mod_jk.so * tomcat 3.2.1 on Redhat 6.2 JVM 1.3 (Sun distribution) ok. So we were putting JDBC Drivers of IBM (db2java.zip) on various places where we should be able to put them. 1. we put it into the $TOMCAT_HOME/lib/ to be include for whole tomcat. (did not work) 2. we put it into the CLASSPATH environment inside the $TOMCAT_HOME/tomcat.sh script (did not work) 3. we put it into $TOMCAT_HOME/webapps/our_app/WEB-INF/lib/ (did not work) 4. we unpacked the zip file and put the package tree under $TOMCAT_HOME/webapps/our_app/WEB-INF/classes/ -- YUHEE, it worked. the depressing part of it was, that db2java.zip and the _right_ Path to it was shown in the CLASSPATH variable on every of the setups (System.out.println, or shellscript ECHO). But the JDBC Driver Manager dumped no suitable driver found. It took me quite a lot of time to make the application run, cause there was no reason for the failure (If you have a package in your classpath, then you would suggest that it is loaded, right?). Anyways. The whole adventure brings me to the conclusion that either the CLASSPATH environment of Sun JDK 1.3 for Linux is not working properly or .. the dynamic loading of packages of TomCat is not fully reliable (which I honestly do not believe). Does anyone had similar Problems, and can someone give me a tip for where to put JDBC Driver packages inside a Webapp? (WEB-INF/lib/ I thought, but) thx. and regards roman
AW: wired CLASSPATH behaviour
hay Noel, no I have not tried this. I thought about, but this would mean that the classloader does not support .zip files anymore. And I have not heard about any change like this. But it's still a good idea. I will give it a try and report results. thx roman -Ursprüngliche Nachricht- Von: Noel E. Lecaros [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 12:02 An: [EMAIL PROTECTED] Betreff: Re: wired CLASSPATH behaviour Hi, Roman Just a thought, but have you tried RENAMING the file db2java.zip to db2java.jar? Regards, Noel Lecaros Gerteis, Roman wrote: Hay there, when I was deploying a application on Tomcat 3.2.1 we had some really wired Problems with CLASSPATH issues. First of all this is the environment: * apache 1.3.14 * mod_jk.so * tomcat 3.2.1 on Redhat 6.2 JVM 1.3 (Sun distribution) ok. So we were putting JDBC Drivers of IBM (db2java.zip) on various places where we should be able to put them. 1. we put it into the $TOMCAT_HOME/lib/ to be include for whole tomcat. (did not work) 2. we put it into the CLASSPATH environment inside the $TOMCAT_HOME/tomcat.sh script (did not work) 3. we put it into $TOMCAT_HOME/webapps/our_app/WEB-INF/lib/ (did not work) 4. we unpacked the zip file and put the package tree under $TOMCAT_HOME/webapps/our_app/WEB-INF/classes/ -- YUHEE, it worked. the depressing part of it was, that db2java.zip and the _right_ Path to it was shown in the CLASSPATH variable on every of the setups (System.out.println, or shellscript ECHO). But the JDBC Driver Manager dumped no suitable driver found. It took me quite a lot of time to make the application run, cause there was no reason for the failure (If you have a package in your classpath, then you would suggest that it is loaded, right?). Anyways. The whole adventure brings me to the conclusion that either the CLASSPATH environment of Sun JDK 1.3 for Linux is not working properly or .. the dynamic loading of packages of TomCat is not fully reliable (which I honestly do not believe). Does anyone had similar Problems, and can someone give me a tip for where to put JDBC Driver packages inside a Webapp? (WEB-INF/lib/ I thought, but) thx. and regards roman
HANDLER THREAD PROBLEM when accessing servlet
is it really necessary to recompile the mod_jk.so just so that Tomcat will run fine with Apache? I have Apache web server and jakarta-tomcat-3.2.1 running on red hat linux 6. I am running tomcat using the startup.sh script (I guess this means it's stand-alone). I get an error while accessing a servlet in my defined context path but the example was working well. Error is: HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp1 2ConnectionHandler.java:386) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:134) at org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411) at java.lang.Thread.run(Thread.java:484) Any ideas? TIA. :^) A chain is only as strong as its weakest link. Ricky Y. Artigas Analyst/Programmer Information Technology Division Easycall Communications Phils., Inc. - Easycall Internet - 418 Arayat St., Mandaluyong City 1550, Philippines Personal WAP Site: http://www.buzzed.co.uk/mobile/?rya Company Website: http://www.easycall.com.ph Tel.no: (+632) 5338001 ext.6574 Mobile:(+63) 0917-8951783 Pager: 141-002955 Email: [EMAIL PROTECTED] --- IMPORTANT NOTICE: This message (and any attachment hereto) may contain privileged and/or confidential information specific to EasyCall. If you are not the intended addressee indicated in this message, you may not copy or disseminate this message (or any attachment hereto) to anyone. Instead, please destroy this message (and any attachment hereto), and kindly notify the sender by reply email. Any information in this message (and any attachment thereto) that do not relate to the official business of EasyCall shall be understood as neither given nor endorsed by the company. -Original Message- From: Noel E. Lecaros [SMTP:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 6:02 PM To: [EMAIL PROTECTED] Subject: Re: wired CLASSPATH behaviour Hi, Roman Just a thought, but have you tried RENAMING the file db2java.zip to db2java.jar? Regards, Noel Lecaros Gerteis, Roman wrote: Hay there, when I was deploying a application on Tomcat 3.2.1 we had some really wired Problems with CLASSPATH issues. First of all this is the environment: * apache 1.3.14 * mod_jk.so * tomcat 3.2.1 on Redhat 6.2 JVM 1.3 (Sun distribution) ok. So we were putting JDBC Drivers of IBM (db2java.zip) on various places where we should be able to put them. 1. we put it into the $TOMCAT_HOME/lib/ to be include for whole tomcat. (did not work) 2. we put it into the CLASSPATH environment inside the $TOMCAT_HOME/tomcat.sh script (did not work) 3. we put it into $TOMCAT_HOME/webapps/our_app/WEB-INF/lib/ (did not work) 4. we unpacked the zip file and put the package tree under $TOMCAT_HOME/webapps/our_app/WEB-INF/classes/ -- YUHEE, it worked. the depressing part of it was, that db2java.zip and the _right_ Path to it was shown in the CLASSPATH variable on every of the setups (System.out.println, or shellscript ECHO). But the JDBC Driver Manager dumped no suitable driver found. It took me quite a lot of time to make the application run, cause there was no reason for the failure (If you have a package in your classpath, then you would suggest that it is loaded, right?). Anyways. The whole adventure brings me to the conclusion that either the CLASSPATH environment of Sun JDK 1.3 for Linux is not working properly or .. the dynamic loading of packages of TomCat is not fully reliable (which I honestly do not believe). Does anyone had similar Problems, and can someone give me a tip for where to put JDBC Driver packages inside a Webapp? (WEB-INF/lib/ I thought, but) thx. and regards roman
Re: petstore problem
HI, Swamy Did you create the datastore by running the populate script? Regards, Noel Lecaros Swamy wrote: Hi, I have been trying to install the pet store implementation. After jumping a few hoops this last one has been testing me for a while now. Here is the environment : j2sdkee1.2.1, jdk1.3.0_02, Cloudscape_3.6, jboss-tomcat-2.2, jps1.1.1 and the patch from jboss on Windows 2000 server. Here is what I do : Step 1 : Start Cloudscape using the script in j2sdkee1.2.1\bin\cloudscape.bat -start Step 2 : Start jboss using jboss-tomcat-2.2\jboss-2.2\bin\run.bat Step 3 : On the browser I try http://localhost:8080/estore/control/language?language=English This results in a the following exception Internal Servlet Error: java.lang.RuntimeException: NamingException while looking up DB context : EstoreDB not bound at com.sun.j2ee.blueprints.shoppingcart.catalog.model.CatalogModel.init(Catalog Model.java:42) at com.sun.j2ee.blueprints.petstore.control.web.ModelManager.getCatalogModel(Mo delManager.java:84) at com.sun.j2ee.blueprints.petstore.control.web.ModelManager.init(ModelManager. java:60) at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.j ava:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Now, if I refresh the screen. I get the first page right but on the console from where I started jboss I get this message 2001-05-06 03:47:46 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECTuser_pass FROM users WHERE user_name = ? 2001-05-06 03:47:47 - ContextManager: JDBCRealm: Authentication unsuccessful for user null Thanks in advance. Swamy
Re: AW: wired CLASSPATH behaviour
Hi Roman, It is not a limitation of the classloader, but it's just about the way Tomcat works: it only appends jar files to its own classpath (which seems not to be the same classpath that you define within your system) which are in the WEB-INF/lib directory of the application. So, as jar files and zip files have the same file format (in fact jar files are zip files), you just need to rename them to make them taken into consideration by tomcat). Benoît hay Noel, no I have not tried this. I thought about, but this would mean that the classloader does not support .zip files anymore. And I have not heard about any change like this. But it's still a good idea. I will give it a try and report results. thx roman -Ursprüngliche Nachricht- Von: Noel E. Lecaros [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 12:02 An: [EMAIL PROTECTED] Betreff: Re: wired CLASSPATH behaviour Hi, Roman Just a thought, but have you tried RENAMING the file db2java.zip to db2java.jar? Regards, Noel Lecaros Gerteis, Roman wrote: Hay there, when I was deploying a application on Tomcat 3.2.1 we had some really wired Problems with CLASSPATH issues. First of all this is the environment: * apache 1.3.14 * mod_jk.so * tomcat 3.2.1 on Redhat 6.2 JVM 1.3 (Sun distribution) ok. So we were putting JDBC Drivers of IBM (db2java.zip) on various places where we should be able to put them. 1. we put it into the $TOMCAT_HOME/lib/ to be include for whole tomcat. (did not work) 2. we put it into the CLASSPATH environment inside the $TOMCAT_HOME/tomcat.sh script (did not work) 3. we put it into $TOMCAT_HOME/webapps/our_app/WEB-INF/lib/ (did not work) 4. we unpacked the zip file and put the package tree under $TOMCAT_HOME/webapps/our_app/WEB-INF/classes/ -- YUHEE, it worked. the depressing part of it was, that db2java.zip and the _right_ Path to it was shown in the CLASSPATH variable on every of the setups (System.out.println, or shellscript ECHO). But the JDBC Driver Manager dumped no suitable driver found. It took me quite a lot of time to make the application run, cause there was no reason for the failure (If you have a package in your classpath, then you would suggest that it is loaded, right?). Anyways. The whole adventure brings me to the conclusion that either the CLASSPATH environment of Sun JDK 1.3 for Linux is not working properly or .. the dynamic loading of packages of TomCat is not fully reliable (which I honestly do not believe). Does anyone had similar Problems, and can someone give me a tip for where to put JDBC Driver packages inside a Webapp? (WEB-INF/lib/ I thought, but) thx. and regards roman
AW: HANDLER THREAD PROBLEM when accessing servlet
Hay, yes it's necessary to compile mod_jk.so, but it's really easy. get the Tomcat ressources and do exactly what is said in: http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html#s6 2 The build depends on OS and Apache Version so normally the distributed binary is matching exactly one environment exapmle. (Probably not yours ;) If you start the startup.sh (default configuration) TomCat runs standalone and with the interface for Apache connections. (Port 8080 is standalone Version, Port 8007 is for mod_jk connections) Therefore you can try both. If Apache works well with your Tomcat you can remove the: Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.http.HttpConnectionHandler/ Parameter name=port value=8080/ /Connector Entry form $TOMCATHOME/conf/server.xml to run Tomcat not standalone anymore. Regards. roman -Ursprüngliche Nachricht- Von: Artigas, Ricardo Y. [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 12:27 An: [EMAIL PROTECTED] Betreff: HANDLER THREAD PROBLEM when accessing servlet is it really necessary to recompile the mod_jk.so just so that Tomcat will run fine with Apache? I have Apache web server and jakarta-tomcat-3.2.1 running on red hat linux 6. I am running tomcat using the startup.sh script (I guess this means it's stand-alone). I get an error while accessing a servlet in my defined context path but the example was working well. Error is: HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp1 2ConnectionHandler.java:386) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:134) at org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411) at java.lang.Thread.run(Thread.java:484) Any ideas? TIA. :^) A chain is only as strong as its weakest link. Ricky Y. Artigas Analyst/Programmer Information Technology Division Easycall Communications Phils., Inc. - Easycall Internet - 418 Arayat St., Mandaluyong City 1550, Philippines Personal WAP Site: http://www.buzzed.co.uk/mobile/?rya Company Website: http://www.easycall.com.ph Tel.no: (+632) 5338001 ext.6574 Mobile:(+63) 0917-8951783 Pager: 141-002955 Email: [EMAIL PROTECTED] --- IMPORTANT NOTICE: This message (and any attachment hereto) may contain privileged and/or confidential information specific to EasyCall. If you are not the intended addressee indicated in this message, you may not copy or disseminate this message (or any attachment hereto) to anyone. Instead, please destroy this message (and any attachment hereto), and kindly notify the sender by reply email. Any information in this message (and any attachment thereto) that do not relate to the official business of EasyCall shall be understood as neither given nor endorsed by the company. -Original Message- From: Noel E. Lecaros [SMTP:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 6:02 PM To: [EMAIL PROTECTED] Subject: Re: wired CLASSPATH behaviour Hi, Roman Just a thought, but have you tried RENAMING the file db2java.zip to db2java.jar? Regards, Noel Lecaros Gerteis, Roman wrote: Hay there, when I was deploying a application on Tomcat 3.2.1 we had some really wired Problems with CLASSPATH issues. First of all this is the environment: * apache 1.3.14 * mod_jk.so * tomcat 3.2.1 on Redhat 6.2 JVM 1.3 (Sun distribution) ok. So we were putting JDBC Drivers of IBM (db2java.zip) on various places where we should be able to put them. 1. we put it into the $TOMCAT_HOME/lib/ to be include for whole tomcat. (did not work) 2. we put it into the CLASSPATH environment inside the $TOMCAT_HOME/tomcat.sh script (did not work) 3. we put it into $TOMCAT_HOME/webapps/our_app/WEB-INF/lib/ (did not work) 4. we unpacked the zip file and put the package tree under $TOMCAT_HOME/webapps/our_app/WEB-INF/classes/ -- YUHEE, it worked. the depressing part of it was, that db2java.zip and the _right_ Path to it was shown in the CLASSPATH variable on every of the setups (System.out.println, or shellscript ECHO). But the JDBC Driver Manager dumped no suitable driver found. It took me quite a lot of time to make the application run, cause there was no reason for the failure (If you have a package in your classpath, then you would suggest that it is loaded, right?). Anyways. The whole adventure brings me to the conclusion that either the CLASSPATH environment of Sun JDK 1.3 for Linux is not working properly or .. the dynamic loading of packages of TomCat is not fully reliable (which I honestly do not
RE: Linux Startscript
There is one in RPM :) === #!/bin/sh # # Startup script for Tomcat, the Apache Servlet Engine # # chkconfig: 345 80 20 # description: Tomcat is the Apache Servlet Engine # processname: tomcat # pidfile: /var/run/tomcat.pid # # Gomez Henri [EMAIL PROTECTED] # # version 1.02 - Removed initlog support # version 1.03 - Removed config: # version 1.04 - tomcat will start before httpd and stop after httpd # # Source function library. . /etc/rc.d/init.d/functions export PATH=$PATH:/opt/IBMJava2-13/bin:/opt/IBMJava2-13/jre/bin export JAVA_HOME=/opt/IBMJava2-13 export TOMCAT_HOME=/var/tomcat # See how we were called. case $1 in start) echo -n Starting tomcat: daemon tomcat start echo touch /var/lock/subsys/tomcat ;; stop) echo -n Shutting down tomcat: daemon tomcat stop echo rm -f /var/lock/subsys/tomcat rm -f /var/run/tomcat.pid ;; restart) $0 stop sleep 2 $0 start ;; *) echo Usage: $0 {start|stop|restart} exit 1 esac exit 0 - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Wolle [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 06, 2001 8:30 PM To: tomcatUser Subject: Linux Startscript Hello, why is there no startscipt integrated in TC ? The server should normals run when the server is on. If you don't use the mod_jk.conf-auto, it doesn't matter if apache start bevor or after tomcat. Here is a simple Linux start/stop script to insert in /etc/rc.d/init.d #!/bin/sh # description: Start Tomcat 3.2.2b4 for Apache case $1 in 'start') /usr/local/jakarta-tomcat-3.2.2b4/bin/startup.sh touch /var/lock/subsys/tomcat ;; 'stop') /usr/local/jakarta-tomcat-3.2.2b4/bin/shutdown.sh rm -f /var/lock/subsys/tomcat ;; *) echo Usage: $0 { start | stop } ;; esac exit 0 -- Greetings, Michael
Re: JSP/ASP Coexistance
Yes. A single PWS or IIS web server can support both ASP and JSP similtaniously. Leon I DID RTFM, but saw nothing that answered the following basic/newbie question: On both IIS/ASP and PWS/ASP environments, can subject sets of pages both be handled? (I.e., would foo.asp and foo.jsp each be fielded appropriately per the file extension?) Thanks, folks. Arnold Shore Annapolis, MD USA
Re: My growing memory problem resolved
Hei Eric, thank you for your reply, i will answer your questions below: eric chacon wrote: Wolle, I think the problem may lie in your JVM: Setting a reference to the object to null does not automatically free the memory--it just allows the garbage collector to clear it whenever it runs. In many (most?) JVMs, garbage collection is single-threaded. It may run at a fairly low priority. this was tested with JDK1.3.0_02 (Hotspot Server/client) and IBMJava2_1.3 Therefore, under stress testing, it is possible for you to eat up a lot of memory before the garbage collector has a chance to pool it. Yes, of course, I gave it a half day an nothing becomes free. I had also see, that all process was cloesd (tool top under Linux). One way to test this would be to let your process run under high load, and then stop your load and watch over time to see if the memory is released. If, in fact, it is a garbage collection problem, you have a couple of choices: 1) upgrade your JVM and see if that helps. 2) pool your Heavy Objects: create a store of them, and re-use them. I have done something else, I have synchronize the Object and use create only on Object: class Servlet extends HttpServlet{ HeavyObject ho = null; public doPost(request,response) throws IOException{ if (ho != null){ ho = new HeavyObject(); } } } that works, so the Object will only created once, but I have to synchronize the Object. If you're doing load balancing/workload management, this might cause some problems (you'll need to persist your objects to a common database), but if everything's running on one machine, pooling might be an easy, convenient solution. Cheers, Eric thanks and Greetings, Michael From: Wolle [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: tomcatUser [EMAIL PROTECTED] Subject: My growing memory problem resolved Date: Mon, 07 May 2001 03:45:55 +0200 Hello , i have posted for a few day's a problem thats the Memory usage will extremly grow up when I refresh a page very often The Problem was, that I creat a heavy memory Object on each refresh. Normally I have 81 processes run at all, when execute the stress-test the processcount will rise till ~ 230. And each new Prcoesses will creat a new Object. When I stop the stress-test, the processcount becomes normal (~ 100) , but the memory usage won't fall. But the new created Object have now refernces that points to them. But why they don't becomes free My code is somthing like this: public class servlet1 extends HttpServlet{ .. ... .. .. public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException{ try{ HeavyObject ho = new HeavyObject(); } finally{ ho = null; // for testing implementet, but this gives the memory not free, also } } } Is this a Bug in Tomcat ? Or is it a Bug from me ? Or som Java misunderstood ? Why will the Object not becomes free, when some of the Threads will be closed , and the only reference is in the closed Thread ? Greetings, Michael _ Get your FREE download of MSN Explorer at http://explorer.msn.com
modified classes location
Hi Tomcat supports automatic class re-loading allowing us to modify class files at runtime. This is enabled by setting a reloadable flag server.xml. The following method in the Loader class(from TC source) allows us to specify additional directories containing source files possible getting modified. public void Loader::addRepository(java.lang.String repository) Add a new repository to the set of repositories for this class loader. Now how to specify this repository at user level ? thanks, -csk
IIS (SBS) + LINUX Help....
I am trying to set-up IIS on SBS2000 (Small Business Server 2000) to work with TOMCAT on LINUX, but not having much luck. I obtain the dreaded ISAPI_redirect.dll failed to load. Any help will be appreciated. I think I have performed all the tasks mentioned in the Tomcat IIS HowTO. My registry entries are: extension_uri=/jakarta/isapi_redirect.dll log_file=d:\Tomcat\isapi.log worker_file=d:\Tomcat\etc\workers.properties worker_mount_file=d:\Tomcat\etc\uriworkermap.properties log_level=debug The contents of workers.properties are: worker.list=ajp12 worker.ajp12.host=linuxgate worker.ajp12.port=8007 The Contents of uriworkermap.properties are: /servlet/*=ajp12 # Mount the examples context to the ajp12 worker /examples/*=ajp12 # Advanced mount of the examples context /examples/*.jsp=ajp12 /examples/servlet/*=ajp12 The hosts file has the entry: 192.168.16.33 linuxgate.chormit.co.uk linuxgate The Default Web Site on the IIS has a virtual directory with D:\Tomcat\bin as the path name and this directory holds the isapi_redirect.dll. The ISAPI FiIter jakarta is D:\Tomcat\bin\isapi_redirect.dll and the arrow next to it stays RED with a status Not Loaded and Priority unknown. (I have restarted the IIS few times). Any help would be appreciated. Regards, Jitu
trusted application
I get the following error when accessing the /admin pages and trying to view all contexts: Error: 500 Location: /admin/contextAdmin/contextAdmin.jsp You must mark the administration application as trusted How and where do i do this? // Erik
mod_jk error shortly after starting tomcat
Hi friends, shortly after starting tomcat some requests are going wrong (error 500 visible in the browser). mod_jk.log says: jk_ajp13_worker.c (203): connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed jk_ajp13_worker.c (619): Error reading request after a while this error doesn't appear again versions: tomcat 3.2.1, jdk1.3 (IBM), apache 1.3.14 is this known by someone? if yes, what does it mean? should I take care of what? thanks in advance regards Fritz
j_security_check not working on web pages
Hi, In the security example when I try to access the protected directory it redirects me to the login.jsp page. It shows in the log 2001-05-07 02:38:37 - ContextManager: AccessInterceptor: checking /jsp/security/protected/index.jsp 2001-05-07 02:38:37 - ContextManager: AccessInterceptor: matched /jsp/security/protected/* DELETE GET POST PUT null tomcat role1 2001-05-07 02:38:37 - ContextManager: AccessInterceptor: checking /jsp/security/login/login.jsp Realm.authenticate() is called but there is nothing to authenticate. I then enter username/password and hit login. I am then shown the index.jsp from the example. The log shows 2001-05-07 02:39:29 - ContextManager: AccessInterceptor: checking /jsp/security/login/j_security_check 2001-05-07 02:39:29 - ContextManager: AccessInterceptor: checking /jsp/security/protected/index.jsp 2001-05-07 02:39:29 - ContextManager: AccessInterceptor: matched /jsp/security/protected/* DELETE GET POST PUT null tomcat role1 The realm.authenticate() is called and my realm authenticates OK. However, if my protected resource is a simple web page then tomcat first redirects to the login form as above and the log shows 2001-05-07 02:50:40 - ContextManager: AccessInterceptor: checking /HelloWorld.html 2001-05-07 02:50:40 - ContextManager: AccessInterceptor: matched /HelloWorld.html DELETE GET POST PUT null tomcat role1 sysadmin 2001-05-07 02:50:40 - ContextManager: AccessInterceptor: checking /jsp/security/login/login.jsp When I hit the login button the realm.authenticate() mechanism is not called and all that is shown in the log is 2001-05-07 02:50:48 - ContextManager: AccessInterceptor: checking /jsp/security/login/j_security_check Whatever I type in the username/password fields is not used. Why is it not calling the realm.authenicate(). Rgds -- Antony Bowesman Teamware Group [EMAIL PROTECTED] tel: +358 9 5128 2562 fax: +358 9 5128 2705
Re: NT Service question
please set it in tomcat.bat - Original Message - From: Stefan Henke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 6:29 PM Subject: NT Service question Hi, I set up Tomcat to work as NT service and it works fine. Now I want to install Tomcat on several other computers. As Tomcat is installed in different paths on the different computers, I have to change the wrapper.properties (JAVA_HOME and TOMCAT_HOME) manually. My question is: Can I tell Tomcat to take the environment settings of TOMCAT_HOME and JAVA_HOME in wrapper.properties. This variables are already set for TOMCAT in normal mode. This could help me a lot. Thanks for any help Stefan
Re: trusted application
In $TOMCAT_HOME/conf/server.xml Context path=/admin docBase=webapps/admin crossContext=true debug=0 reloadable=true trusted=true /Context -Jeff - Original Message - From: Erik Hellman [EMAIL PROTECTED] To: Tomcat-User@Jakarta. Apache. Org [EMAIL PROTECTED] Sent: Monday, May 07, 2001 7:19 AM Subject: trusted application I get the following error when accessing the /admin pages and trying to view all contexts: Error: 500 Location: /admin/contextAdmin/contextAdmin.jsp You must mark the administration application as trusted How and where do i do this? // Erik
getResource() for files such as /WEB-INF/app.properties?
In the J2EE blueprint, there is an example of a configuration file residing in the /WEB-INF/ directory which is loaded using getResource(), see eg. http://java.sun.com/j2ee/blueprints/sample_application/qanda/ excerpt; Here is some sample code that gets a configuration file from the WEB-INF/ directory and parses it as XML. URL myURL = null; try { myURL = context.getResource(/WEB-INF/mysettings.xml); } catch (java.net.MalformedURLException ex) { System.out.println(Malformed URL exception: + ex); } ... However, when doing this in tomcat 4.0dev (April 24th snapshot), the getResource() method only returns null. Is this supported in tomcat, or does getResource() only return things that are in the classpath? I there any other nice way of loading a property / xml / other file from the WEb-INF directory? -- - Torgeir
Re: NT Service question
Dear Stefan, You want a system to pre defines TOMCAT_HOME JAVA_HOME, right? Do that using the basic NT Environment variables settings. In W2K this is can be done by right clck on My computer = Propertities Page = Advanced Tab = Environment Variables. This could help. thanks sachin - Original Message - From: Stefan Henke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 1:59 PM Subject: NT Service question Hi, I set up Tomcat to work as NT service and it works fine. Now I want to install Tomcat on several other computers. As Tomcat is installed in different paths on the different computers, I have to change the wrapper.properties (JAVA_HOME and TOMCAT_HOME) manually. My question is: Can I tell Tomcat to take the environment settings of TOMCAT_HOME and JAVA_HOME in wrapper.properties. This variables are already set for TOMCAT in normal mode. This could help me a lot. Thanks for any help Stefan
RE: petstore problem
Yeap. Ran the populate script. Also used 'select * from users' to check if the inserts were successful. Thanks. Swamy -Original Message- From: Noel E. Lecaros [SMTP:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 4:11 AM To: [EMAIL PROTECTED] Subject:Re: petstore problem HI, Swamy Did you create the datastore by running the populate script? Regards, Noel Lecaros Swamy wrote: Hi, I have been trying to install the pet store implementation. After jumping a few hoops this last one has been testing me for a while now. Here is the environment : j2sdkee1.2.1, jdk1.3.0_02, Cloudscape_3.6, jboss-tomcat-2.2, jps1.1.1 and the patch from jboss on Windows 2000 server. Here is what I do : Step 1 : Start Cloudscape using the script in j2sdkee1.2.1\bin\cloudscape.bat -start Step 2 : Start jboss using jboss-tomcat-2.2\jboss-2.2\bin\run.bat Step 3 : On the browser I try http://localhost:8080/estore/control/language?language=English This results in a the following exception Internal Servlet Error: java.lang.RuntimeException: NamingException while looking up DB context : EstoreDB not bound at com.sun.j2ee.blueprints.shoppingcart.catalog.model.CatalogModel.init(Catalog Model.java:42) at com.sun.j2ee.blueprints.petstore.control.web.ModelManager.getCatalogModel(Mo delManager.java:84) at com.sun.j2ee.blueprints.petstore.control.web.ModelManager.init(ModelManager. java:60) at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.j ava:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Now, if I refresh the screen. I get the first page right but on the console from where I started jboss I get this message 2001-05-06 03:47:46 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECTuser_pass FROM users WHERE user_name = ? 2001-05-06 03:47:47 - ContextManager: JDBCRealm: Authentication unsuccessful for user null Thanks in advance. Swamy
mod_jk problems ...
Hello I am trying to configure the Tomcat 3.2.1 to work with Apache 1.3.19+mod_ssl. on a Linux SUSE 7.1 system. I have compiled the mod_jk.so, but I can't make it working with the Apache.. What I get when I'm trying to start apache with ssl enabled is : Syntax error on line 8 of /usr/local/tomcat/conf/mo API module structure `jk_module' in file /usr/local garbled - perhaps this is not an Apache module DSO? I've done everything I thought would be necessary : - adding DSO support to Apache - modifying the apxs script, so that the compilation of mod_jk ends up correctly (I conplied it on my platform from the sources which come in the jakarta-tomcat3.2.1 distribution) - loading the mod_jk module in the httpd.conf file.. I was going through the mailing archives in the last few days and saw that many people ran into the same kind of trouble as I did.. the main issue is that I couldn't find anyone who managed to make this work on a SUSE platform.. Can anybody please help me with this? I would appreciate very, very much any help, because I'm like in a kind of dead point.. I mean, the next step would be to change my linux for a Redhat or Mandrake, where it seems there are some chances to make the thing working.. :( Thank you in advance! Diana
AW: My growing memory problem resolved
You have to separate two things: - memory usage inside the vm this is what you see if you print out: Runtime.getRuntime().totalMemory() Runtime.getRuntime().freeMemory() You have hardly any control about the execution of the garbage collector. The only contract that you can take for granted, is that any JVM will do the garbage collection, if it runs out of memory. All other things (calling system.gc(), terminating a method, setting all references to an object to null) are just hints for the JVM that can be ignored. From the java doc of System.gc(): Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused object - memory usage of the vm this is what you see with top/ps/task manager Even if all objects are garbage collected, that doesn't mean that the size of the JVM shrinks, it is possible that only the free memory inside the JVM grows for each byte that is garbage collected. Wether the JVM is able to decrease it's memory footprint is up to the JVM and the underlying operating system. -Ursprüngliche Nachricht- Von: Wolle [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 03:46 An: tomcatUser Betreff: My growing memory problem resolved Hello , i have posted for a few day's a problem thats the Memory usage will extremly grow up when I refresh a page very often The Problem was, that I creat a heavy memory Object on each refresh. Normally I have 81 processes run at all, when execute the stress-test the processcount will rise till ~ 230. And each new Prcoesses will creat a new Object. When I stop the stress-test, the processcount becomes normal (~ 100) , but the memory usage won't fall. But the new created Object have now refernces that points to them. But why they don't becomes free My code is somthing like this: public class servlet1 extends HttpServlet{ .. ... .. .. public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException{ try{ HeavyObject ho = new HeavyObject(); } finally{ ho = null; // for testing implementet, but this gives the memory not free, also } } } Is this a Bug in Tomcat ? Or is it a Bug from me ? Or som Java misunderstood ? Why will the Object not becomes free, when some of the Threads will be closed , and the only reference is in the closed Thread ? Greetings, Michael
NEWBIE: having problem starting new app
I am setting up a test app, using the Ant tool. The files go into the proper directory I have setup (/webapps/myapps), but when I try to access them on the browser it doesn't work properly unless I use the port number. I have to type http://localhost:8080/myapp/, if I type just http://localhost/myapp/ it doesn't work. I have been able to use the example/servlet directory by typing that in as in http://localhost/example/serlet. I know this is set up by the apache-tomcat.conf file which is created everytime I start up the tomcat server. When I look at the conf file everything seems proper the myapps section is as follows: Alias /myapp C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp Options Indexes FollowSymLinks /Directory ApJServMount /myapp/servlet /myapp Location /myapp/WEB-INF/ AllowOverride None deny from all /Location Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp/WEB-INF/ AllowOverride None deny from all /Directory Location /myapp/META-INF/ AllowOverride None deny from all /Location Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp/META-INF/ AllowOverride None deny from all /Directory Thanks for any help on this. Ajay __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: JNDI Datasource in Tomcat
Which database drivers are you using with poolman? I'm trying to use Oracle, but it's giving me null pointer exceptions when I run the test. Could you send your poolman.xml file? Thanks dave eric chacon wrote: You'll need some connection pooling software which doesn't appear to come bundled with Tomcat. There are several open-source connection pools. I've used PoolMan (www.codestudio.com), and found it to work pretty well. I did have a problem using JNDI, which I never successfully resolved, however: to make a Datasource (or any object) available through JNDI, you need to set up a proper security policy. I was never able to deploy a datasource that my servlets could read. Most connection pooling software packages don't require that you use JNDI (they come with propietary configuration files and such). Note: If you use a full J2EE solution such as Enhydra or JBoss (both of which come bundled with Tomcat), then they'll set up your data sources for you (you modify some XML files), and you're good to go. -- Dave Weis businessolver, Inc. [EMAIL PROTECTED] http://www.businessolver.com/
Re: problems with Tomcat 3.2.1 samples
now, I get the directory listing. thanks, - Original Message - 寄件者: Noel E. Lecaros [EMAIL PROTECTED] 收件者: [EMAIL PROTECTED] 傳送日期: 2001年5月7日 AM 11:37 主旨: Re: problems with Tomcat 3.2.1 samples Hi, Jack When you say does not work, what do you see? Do you get an error (e.g. 404-Not Found), or do you get a directory listing? If you get a directory listing, then it is working. Seems you're on the right track. The fact is you don't really need to do anything special to get the examples working. Regards, Noel Lecaros jackling wrote: Hi, I'm not familiar w/ the configuration also. http://localhost:8080/examples/ does not work for me. Is it my config problem? But I try this and works: http://localhost:8080/examples/servlet/CookieExample this is to call the \web-apps\examples\web-inf\classes\CookieExample.class Is it correct to say that we hv to put the java classes under the web-inf\classes? pls let me know if I'm on the right track. thanks, jackling. - Original Message - 寄件者: Noel E. Lecaros [EMAIL PROTECTED] 收件者: [EMAIL PROTECTED] 傳送日期: 2001年5月6日 PM 11:19 主旨: Re: problems with Tomcat 3.2.1 samples Hi, Ofer What URL did you type? Did you try: http://localhost:8080/examples/ ? Regards, Noel Lecaros Ofer Baranes wrote: Hi there , i install Tomcat 3.2.1 and i try to run its samples , but it failed. What's wrong or miss in the next steps which i follow : 1 - add to my autoexec.bat : set TOMCAT_HOME=c:\tmct321 set JAVA_HOME=c:\jdk13002 set PATH = %PATH%;c:\;c:\jdk13002\bin;c:\jdk13002; 2 - run the tomcat.bat file : tomcat.bat start 3 - open webapps\examples\servlets\index.html and hit the execute button which fails(all the other examples failed as well) I haven't done any change to the server.xml. Am i using right the tomcat.bat ? should i use the web.xml in any way ? What is wrong here ?!
Tomcat and Jikes
Hello everybody: I'm new in this list and here goes my first (great) doubt: It's possible to use jikes as default compiler to servlets/jsp files in Tomcat? (instead of javac). I've been looking for any place in $tomcat_home/conf/build.xml where configure this option but i haven't found anything. Thanks a lot in advance: __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __
RE: NEWBIE: having problem starting new app
Sounds like you have server.xml set up to watch for http connections on port 8080. Look for port Parameters in there and set them to 80 IF you have root/admin rights on the machine, otherwise you will have to run it on a higher port like 8080. -Original Message- From: Ajay Ejantkar [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 9:21 AM To: [EMAIL PROTECTED] Subject: NEWBIE: having problem starting new app I am setting up a test app, using the Ant tool. The files go into the proper directory I have setup (/webapps/myapps), but when I try to access them on the browser it doesn't work properly unless I use the port number. I have to type http://localhost:8080/myapp/, if I type just http://localhost/myapp/ it doesn't work. I have been able to use the example/servlet directory by typing that in as in http://localhost/example/serlet. I know this is set up by the apache-tomcat.conf file which is created everytime I start up the tomcat server. When I look at the conf file everything seems proper the myapps section is as follows: Alias /myapp C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp Options Indexes FollowSymLinks /Directory ApJServMount /myapp/servlet /myapp Location /myapp/WEB-INF/ AllowOverride None deny from all /Location Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp/WEB-INF/ AllowOverride None deny from all /Directory Location /myapp/META-INF/ AllowOverride None deny from all /Location Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp/META-INF/ AllowOverride None deny from all /Directory Thanks for any help on this. Ajay __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
NEWBIE: Accessing servlet in test app **Correction**
I am setting up a test app, using the Ant tool. The files go into the proper directory I have setup (/webapps/myapps). I was trying to access a servlet from the test myapp if I click on myapp's index page I can go to the hello.jsp no problem using both http://localhost/myapp/hello.jsp, and http://localhost:8080/myapp/hello.jsp, but if I try to access the servlet hello I have to use http://localhost:8080/myapp/hello, I can't use http://localhost/myapp/hello .I have been able to use the example/servlet directory by typing that in as in http://localhost/example/servlet. I know this is set up by the apache-tomcat.conf file which is created everytime I start up the tomcat server. When I look at the conf file everything seems proper the myapps section is as follows: Alias /myapp C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp Options Indexes FollowSymLinks /Directory ApJServMount /myapp/servlet /myapp Location /myapp/WEB-INF/ AllowOverride None deny from all /Location Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp/WEB-INF/ AllowOverride None deny from all /Directory Location /myapp/META-INF/ AllowOverride None deny from all /Location Directory C:/ApacheGroup/jakarta-tomcat-3.2.1/webapps/myapp/META-INF/ AllowOverride None deny from all /Directory Thanks for any help on this. Ajay __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
AW: NT Service question
Hi Sachin, well, this is not what I wanted to do. I already set this environment variables. My problem is: If I start Tomcat as a NT service, I need the file wrapper.properties. There I have to set location of tomcat and jdk. Normally, you set the real path in wrapper.properties. But I want the values be catched from the system environment. So if I change the location of jdk or tomcat, I just have to change environment variables. Thanks Stefan -Ursprüngliche Nachricht- Von: Sachin Phatak [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 14:10 An: [EMAIL PROTECTED] Betreff: Re: NT Service question Dear Stefan, You want a system to pre defines TOMCAT_HOME JAVA_HOME, right? Do that using the basic NT Environment variables settings. In W2K this is can be done by right clck on My computer = Propertities Page = Advanced Tab = Environment Variables. This could help. thanks sachin - Original Message - From: Stefan Henke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 1:59 PM Subject: NT Service question Hi, I set up Tomcat to work as NT service and it works fine. Now I want to install Tomcat on several other computers. As Tomcat is installed in different paths on the different computers, I have to change the wrapper.properties (JAVA_HOME and TOMCAT_HOME) manually. My question is: Can I tell Tomcat to take the environment settings of TOMCAT_HOME and JAVA_HOME in wrapper.properties. This variables are already set for TOMCAT in normal mode. This could help me a lot. Thanks for any help Stefan
error message logging
Hi there! I was wondering if it were possible to somehow log the error messages that appear at the tomcat console should there be an error in a jsp application? eg say that our javabeans have a nullpointer exception and an error 500 message is displayed at our console and at our browser. Is there a way to pipe this to a log file? thanks ! Jason _ http://store.yahoo.com.au - Yahoo! Store - It's time you had your business online!
Re: JAVA vs. PERL startup time + memory
Thanks James, You had solve my problem i had stuck for a month. You are right !!! Apache spawn only one CustomLog process. But it seems like Apache's Log to pipe feature only works on unix. When i try to pipe the log to a java application in windows, it seems not working. on unix: CustomLog |java -classpath /opt pipe common on windows 2000: CustomLog |java -classpath d:\ pipe common // doesn't work in windows I had verfiy the classpath and java path is right by runing the java app in windows terminal. more comment would be more than welcome. thanks. --- James Klicman [EMAIL PROTECTED] wrote: Choose whichever language you want and don't worry. Apache will spawn only one CustomLog process for all log records. It will only start a new process if the pipe hangs or the log process dies. It would be ridiculously inefficient if Apache spawned a new process to log each record. -James On Sat, May 05, 2001 at 06:07:52PM -0700, tim leung wrote: My problem is I must use unix pipe. e.g. command1 | command2 where command1 is some unix command. where command2 is java PipeReader that is output of command1 sent to input of java application -- PipeReader. why I must use pipe? because I am using apache web server. apache server will do logging to a text file. instead of log to text file. I can also log to a pipe : // apache server log to a pipe instead of log file e.g. CustomLog |java -classpath /opt pipe common I pipe the log's (byte sent) / sessionID etc... to the application and the application will HTTP POST the log back to servlet for further processing. the suggestion of unix pipe to a running process (daemon) is what I really want to do but i dont' think there is a way to do it. inorder to pipe the command1's Output to java app PipeReader's Input (stdin). I must invoke a new JVM process inorder to do pipe. right? any one can help me out? thanks. --- Ross Dyson [EMAIL PROTECTED] wrote: The JVM is loaded just ONCE not once pre request. This is WHY java back-ends have better performance and are scalable. -Original Message- From: tim leung [mailto:[EMAIL PROTECTED]] Sent: Sunday, 6 May 2001 4:39 AM To: [EMAIL PROTECTED] Subject: JAVA vs. PERL startup time + memory Hi, I am thinking of write an unix app that will get data from a pipe e.g. | and then will do a HTTP POST to some server. e.g. command1 | java PipeReader-- OR -- e.g. command1 | perl PipeReader Assume I need to invoke the JVM process or PERL process very frequently ( 5 times / sec ) -- ( 300 times / min ) I know that Java's startup time is slow. and it allocation a block of per-defined memory when it starts up. like 2MB. although it may only use 300KB. so. I think start a JVM process is SLOW and need lots of memory. I am not very familiar with PERL. I wonder if I invoke 300 PERL process / min, is it faster and use less memory than invoke 300 JVM process / min? Both will do the same thing.-- each time it's' invoked, it will do a HTTP POST of some data get from the pipe ( stdin ) and then System.exit(). thanks. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Does mod_jk work with remote workers
Hi Is it possible to replicate the distributed environment that is possible to setup with Jserv using mod_jk. I am not looking for details only if it is possible. Here is the scenario i have with Jserv. apache is on crabtree 9080, 9443 tomcat is on hickory 9080 - ajpv12 - 9007 - ajpv13 - 9009 oadModule jserv_module libexec/mod_jserv.so ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel debug ApJServDefaultHost hickory.gmacinsurance.com ApJServDefaultPort 9007 AddType text/jsp .jsp AddHandler jserv-servlet .jsp Alias /card /usr/local/test/jakarta-tomcat/webapps/card Directory /usr/local/test/jakarta-tomcat/webapps/card Options Indexes FollowSymLinks /Directory ApJServMount /card/servlet ajpv12://hickory.gmacinsurance.com:9007/card LocationMatch /card SetHandler jserv-servlet /LocationMatch Location /card/WEB-INF/ AllowOverride None deny from all /Location Location /card/META-INF/ AllowOverride None deny from all /Location This works great. However when i try to replicate it. ( documentation is scarce here ) i can get the configuration working if apache and tomcat are on the same machine but not on seperate ones. Was it designed this way or am i missing something in the larger picture or in configuration files. # mod_jk.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile /usr/local/uat/apache/conf/workers.properties JkLogFile /usr/local/uat/apache/logs/mod_jk.log # Log level to be used by mod_jk JkLogLevel debug JkExtractSSL On JkHTTPSIndicator HTTPS JkSESSIONIndicator SSL_SESSION_ID JkCIPHERIndicator SSL_CIPHER JkCERTSIndicator SSL_CLIENT_CERT JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 Alias /card /usr/local/uat/jakarta-tomcat/webapps/card Directory /usr/local/uat/jakarta-tomcat/webapps/card Options Indexes FollowSymLinks /Directory JkMount /card/servlet/* ajp13 JkMount /card/*.jsp ajp13 JkMount /card/servlet ajpv13://hickory.gmacinsurance.com:9009/card Location /gemini/WEB-INF/ AllowOverride None deny from all /Location Location /gemini/META-INF/ AllowOverride None deny from all /Location Any Help here would be appreciated, however i am really looking to know if this is even possible? Many posts in the archive suggests that it is not. Thanks in advance Israel Lawson -- Note: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. --
RE: NT Service question
I don't think that you really want to do this - remember that EACH ACCOUNT has its own set of environment variables. If you run Tomcat as the System Account (the default account), I don't know if you can set the environment variables. As the software is currently written, what you are trying to do is not possible. You will need to get the source of jk_nt_service and find the portion of code that reads the file. Then you probably want to do something like replace %xxx% with the environment value of xxx. This doesn't seem to difficult, but I don't think its something that you really want to do - my experience with system variables is that they are a nightmare to manage. I would prefer files any day. Another thought on how to do this might be to have one wrappers file for each machine (i.e. wrappers-hostname.properties) and then when you install the service use the appropriate file name. You could then write your own installer which generates the appropriate configuration file based upon the environment variables. Randy -Original Message- From: Stefan Henke [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 9:48 AM To: [EMAIL PROTECTED] Subject: AW: NT Service question Hi Sachin, well, this is not what I wanted to do. I already set this environment variables. My problem is: If I start Tomcat as a NT service, I need the file wrapper.properties. There I have to set location of tomcat and jdk. Normally, you set the real path in wrapper.properties. But I want the values be catched from the system environment. So if I change the location of jdk or tomcat, I just have to change environment variables. Thanks Stefan -Ursprüngliche Nachricht- Von: Sachin Phatak [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 14:10 An: [EMAIL PROTECTED] Betreff: Re: NT Service question Dear Stefan, You want a system to pre defines TOMCAT_HOME JAVA_HOME, right? Do that using the basic NT Environment variables settings. In W2K this is can be done by right clck on My computer = Propertities Page = Advanced Tab = Environment Variables. This could help. thanks sachin - Original Message - From: Stefan Henke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 1:59 PM Subject: NT Service question Hi, I set up Tomcat to work as NT service and it works fine. Now I want to install Tomcat on several other computers. As Tomcat is installed in different paths on the different computers, I have to change the wrapper.properties (JAVA_HOME and TOMCAT_HOME) manually. My question is: Can I tell Tomcat to take the environment settings of TOMCAT_HOME and JAVA_HOME in wrapper.properties. This variables are already set for TOMCAT in normal mode. This could help me a lot. Thanks for any help Stefan
Log tracking program
Does anyone know of a program (hopefully free) that can track and parse the log files of a tomcat-apache configuration. We are looking for basic stats, such as total hits, unique page views, specific file views (images, pages, etc.) Any help or tips to get me looking in the right direction would be greatly appreciated. Thanks! Brandon Cruz
How to run through a DMZ firewall.
Title: How to run through a DMZ firewall. I have been unable to track down any documentation on this configuration. Is there any out there? Where can I get thorough documentation for Tomcat? Thanks in advance, Fred Huelsbeck
AW: Log tracking program
http://www.mrunix.net/webalizer/ regards lothar -Ursprüngliche Nachricht- Von: Brandon Cruz [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 07. Mai 2001 16:26 An: [EMAIL PROTECTED] Betreff: Log tracking program Does anyone know of a program (hopefully free) that can track and parse the log files of a tomcat-apache configuration. We are looking for basic stats, such as total hits, unique page views, specific file views (images, pages, etc.) Any help or tips to get me looking in the right direction would be greatly appreciated. Thanks! Brandon Cruz
Re: JNDI Datasource in Tomcat
Heh. I am using Postgresql (7.0.2)--and (here's the kicker), I'm using PoolMan 1.4.1, which doesn't have an XML file. I've done some work with the 2.0 beta, but I ran into a problem that appears to be fixed in 2.1, but I haven't had a chance to test it yet. I hope to play with this sometime in the next month, and I'll let you know if I come up with anything. Cheers, E. From: Dave Weis [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: JNDI Datasource in Tomcat Date: Mon, 07 May 2001 08:32:37 -0500 Which database drivers are you using with poolman? I'm trying to use Oracle, but it's giving me null pointer exceptions when I run the test. Could you send your poolman.xml file? Thanks dave eric chacon wrote: You'll need some connection pooling software which doesn't appear to come bundled with Tomcat. There are several open-source connection pools. I've used PoolMan (www.codestudio.com), and found it to work pretty well. I did have a problem using JNDI, which I never successfully resolved, however: to make a Datasource (or any object) available through JNDI, you need to set up a proper security policy. I was never able to deploy a datasource that my servlets could read. Most connection pooling software packages don't require that you use JNDI (they come with propietary configuration files and such). Note: If you use a full J2EE solution such as Enhydra or JBoss (both of which come bundled with Tomcat), then they'll set up your data sources for you (you modify some XML files), and you're good to go. -- Dave Weis businessolver, Inc. [EMAIL PROTECTED] http://www.businessolver.com/ _ Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: How to run through a DMZ firewall.
Title: How to run through a DMZ firewall. All you need to do if you are going to use DMZ is set up everything as normal on your computer that is in the DMZ. When auser tries to go to the ip address of your firewall (whatever it is to the outside world), that request will go to your computer running tomcat or your web application. It might be better to set up forwarding for any request coming in on port 80 though so that you don't have to put an entire computer in the DMZ. Brandon Cruz -Original Message-From: Fred Huelsbeck [mailto:[EMAIL PROTECTED]]Sent: Monday, May 07, 2001 9:24 AMTo: [EMAIL PROTECTED]Subject: How to run through a DMZ firewall. I have been unable to track down any documentation on this configuration. Is there any out there? Where can I get thorough documentation for Tomcat? Thanks in advance, Fred Huelsbeck
loadbalancing - java.io.IOException: Stream closed prematurely
hi, i see that you are an apache-tomcat user and that you have posted a request about the : loadbalancing - java.io.IOException: Stream closed prematurely .. error. Actually i get the same error. Everything is working fine, but i see this error on the console once in a while and also a write socket error while loading up the images of an html /jsp page .But even the images are getting loaded fine. Could you help me out with this thanks gopi kokkonda traffixinc.com email:[EMAIL PROTECTED] mailto:email:[EMAIL PROTECTED]
Re: Does mod_jk work with remote workers
You might see if the documentation below helps out http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/Tomcat-Workers-HowTo.html From: Lawson, Israel H. [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat \(E-mail\) [EMAIL PROTECTED] Subject: Does mod_jk work with remote workers Date: Mon, 7 May 2001 10:20:25 -0400 Hi Is it possible to replicate the distributed environment that is possible to setup with Jserv using mod_jk. I am not looking for details only if it is possible. Here is the scenario i have with Jserv. apache is on crabtree 9080, 9443 tomcat is on hickory 9080 - ajpv12 - 9007 - ajpv13 - 9009 oadModule jserv_module libexec/mod_jserv.so ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel debug ApJServDefaultHost hickory.gmacinsurance.com ApJServDefaultPort 9007 AddType text/jsp .jsp AddHandler jserv-servlet .jsp Alias /card /usr/local/test/jakarta-tomcat/webapps/card Directory /usr/local/test/jakarta-tomcat/webapps/card Options Indexes FollowSymLinks /Directory ApJServMount /card/servlet ajpv12://hickory.gmacinsurance.com:9007/card LocationMatch /card SetHandler jserv-servlet /LocationMatch Location /card/WEB-INF/ AllowOverride None deny from all /Location Location /card/META-INF/ AllowOverride None deny from all /Location This works great. However when i try to replicate it. ( documentation is scarce here ) i can get the configuration working if apache and tomcat are on the same machine but not on seperate ones. Was it designed this way or am i missing something in the larger picture or in configuration files. # mod_jk.conf LoadModule jk_module libexec/mod_jk.so JkWorkersFile /usr/local/uat/apache/conf/workers.properties JkLogFile /usr/local/uat/apache/logs/mod_jk.log # Log level to be used by mod_jk JkLogLevel debug JkExtractSSL On JkHTTPSIndicator HTTPS JkSESSIONIndicator SSL_SESSION_ID JkCIPHERIndicator SSL_CIPHER JkCERTSIndicator SSL_CLIENT_CERT JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 Alias /card /usr/local/uat/jakarta-tomcat/webapps/card Directory /usr/local/uat/jakarta-tomcat/webapps/card Options Indexes FollowSymLinks /Directory JkMount /card/servlet/* ajp13 JkMount /card/*.jsp ajp13 JkMount /card/servlet ajpv13://hickory.gmacinsurance.com:9009/card Location /gemini/WEB-INF/ AllowOverride None deny from all /Location Location /gemini/META-INF/ AllowOverride None deny from all /Location Any Help here would be appreciated, however i am really looking to know if this is even possible? Many posts in the archive suggests that it is not. Thanks in advance Israel Lawson -- Note: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. -- _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: error message logging
Look at server.xml: you can specify a log file for Loger name=tc_log, that where tomcat will redirect its logs insetad of console. Is it what you want? hth * * Boris NiyazovPh: 212-854-4094 Fax: 212-854-1749 * * Systems Manager Email: [EMAIL PROTECTED] * * Columbia Law School URL: http://www.law.columbia.edu * * Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Date: Tue, 8 May 2001 00:04:11 +1000 (EST) From: teh j [EMAIL PROTECTED] Subject: error message logging To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi there! I was wondering if it were possible to somehow log the error messages that appear at the tomcat console should there be an error in a jsp application? eg say that our javabeans have a nullpointer exception and an error 500 message is displayed at our console and at our browser. Is there a way to pipe this to a log file? thanks ! Jason _ http://store.yahoo.com.au - Yahoo! Store - It's time you had your business online!
JDBCRealm
Of so I have been experimenting with this JDBCRealm stuff and can't seem to make it ask me for a user name and password. in the server.xml is.. RequestInterceptor className="org.apache.tomcat.request.JDBCRealm" debug="99"driverName="org.gjt.mm.mysql.Driver"connectionURL="jdbc:mysql://localhost/authority?user=authcheck;password=passcheck"userTable="Users" userNameCol="UserName" userCredCol="PassWord"userRoleTable="UserRoles" roleNameCol="RoleName" / in the examples web.xml is... security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/examples/servlets/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication --login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config Shouldn't all this require the server to ask me for a password before I can use any of my servlets or am I missing something here?
Why does Internet Explorer think it is offline?
I am using tomcat with IE and am having problems with it. Every time I start IE and try and access a Java Server Page or servlet through lolcalhost:8080/examples/jsp the browser first complains that the system is not connected to a network. I then click on try again and the browser then seems to find the JSPand display it. Is there a special setting for tomcat if the system is connected to a hub? Any thoughts? Rick
JDBC Realm
So I have been experimenting with this JDBCRealm stuff and can't seem to make it ask me for a user name and password. in the server.xml is.. RequestInterceptor className="org.apache.tomcat.request.JDBCRealm" debug="99"driverName="org.gjt.mm.mysql.Driver"connectionURL="jdbc:mysql://localhost/authority?user=authcheck;password=passcheck"userTable="Users" userNameCol="UserName" userCredCol="PassWord"userRoleTable="UserRoles" roleNameCol="RoleName" / in the examples web.xml is... security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/examples/servlets/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication --login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config Shouldn't all this require the server to ask me for a password before I can use any of my servlets or am I missing something here?
Re: Why does Internet Explorer think it is offline?
RODGERS,RICK (HP-Cupertino,ex3) wrote: I am using tomcat with IE and am having problems with it. Every time I start IE and try and access a Java Server Page or servlet through lolcalhost:8080/examples/jsp the browser first complains that the system is not connected to a network. I then click on try again and the browser then seems to find the JSPand display it. Is there a special setting for tomcat if the system is connected to a hub? Any thoughts? Rick Somes times windows dont' know who localhost is. Try this: go to a command window, and ping localhost if you get host unknown or some other error other than 4 ping responses then you should edit your hosts file to include a line like localhost 127.0.0.1 ALSO: If you put a port number in there IE requires a protocol. so you can do localhost/blah/blah but if you do localhost:8080/blah/blah you need http://localhost:8080/blah/blah
Re: RE: Loosing Connections in a pool
Hi Josh, No, I am not receiving any error messages. Well, not until it crashes! At that point, I get a java.lang out of memory error. It seems like an application (ours, not tomcat's) resource leak to me, but I am searching for any know issues with tomcat, jdbc, etc just in case. Thanks, Dan Joshua Sharp [EMAIL PROTECTED] 05/04 3:51 PM Are you receiving any error messages? I know oracle 8.1.7 has a connection limit of ~120/process before it runs out of file descriptors. I haven't seen any problems with loosing connections though. Josh -Original Message- From: Dan Randall [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: Loosing Connections in a pool Hi, My tomcat application runs in a production environment for about 24 hours before it fails and must be restarted. During that time JDBC connections to Oracle become ignored and eventually disappear. A fair guess is that I am loosing memory, threads and resources in general until there is nothing left and only a restart cures the matter. Unfortunately, tomcat, rather than apache is serving much of the pages and graphics. That may be a contributing factor? I am using: Solaris 8 Oracle 8.1.7 tomcat 3.2.1 apache 1.3.19 and Java 1.3 Does anyone have an idea of what sort of problems I might be having? Any known resource leaks or threading issues? Thanks!! Dan This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail.
A non-apropriate question?
Hello again: about my last e-mail to this list... It's possible to use jikes as default compiler for jsp files in Tomcat? (instead of javac). I've been looking for any place in $tomcat_home/conf/build.xml where configure this option but i haven't found anything. perhaps, Is it a non apropriate question to this group? or, due to my bad english it hasn't been understood... So, is possible to use 'jikes' as the default jsp compiler with Tomcat? Thanks again, and excuse me to be so impatient ;-) __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __
AW: Log tracking program
Have a look at webalizer: http://www.mrunix.net/webalizer/ -Ursprüngliche Nachricht- Von: Brandon Cruz [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 16:26 An: [EMAIL PROTECTED] Betreff: Log tracking program Does anyone know of a program (hopefully free) that can track and parse the log files of a tomcat-apache configuration. We are looking for basic stats, such as total hits, unique page views, specific file views (images, pages, etc.) Any help or tips to get me looking in the right direction would be greatly appreciated. Thanks! Brandon Cruz
RE: A non-apropriate question?
It is possible and its done through the server.xml file (although I can't seem to remember how right now). One suggestion would be to not post HTML-encoded messages, since a number of people on list can't easily read them (thus the way you sent your message encouraged the people you wanted to as the most to not read your message). Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 12:12 PM To: [EMAIL PROTECTED] Subject: A non-apropriate question? Hello again: about my last e-mail to this list... It's possible to use jikes as default compiler for jsp files in Tomcat? (instead of javac). I've been looking for any place in $tomcat_home/conf/build.xml where configure this option but i haven't found anything. perhaps, Is it a non apropriate question to this group? or, due to my bad english it hasn't been understood... So, is possible to use 'jikes' as the default jsp compiler with Tomcat? Thanks again, and excuse me to be so impatient ;-) __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __
RE: A non-apropriate question?
Yes you can at least with Tomcat 3.3, for Tomcat 3.2 i dont know.. Saludos , Ignacio J. Ortega -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Enviado el: lunes 7 de mayo de 2001 18:12 Para: [EMAIL PROTECTED] Asunto: A non-apropriate question? Hello again: about my last e-mail to this list... It's possible to use jikes as default compiler for jsp files in Tomcat? (instead of javac). I've been looking for any place in $tomcat_home/conf/build.xml where configure this option but i haven't found anything. perhaps, Is it a non apropriate question to this group? or, due to my bad english it hasn't been understood... So, is possible to use 'jikes' as the default jsp compiler with Tomcat? Thanks again, and excuse me to be so impatient ;-) __ Jaume Soriano Sivera [EMAIL PROTECTED] Tel: 96504 -ext. 44744 Fax: 965040047 Portal y servicios multimedia - Nuevas tecnologias W a n a d o o E s p a n a - http://www.wanadoo.es __
Re: JNDI Datasource in Tomcat
Hi All, I am using poolman 2.1 for connection pooling. The connection pooling seems to be working fine, but the only problem I seem to be having is that my total connections grow very rapidly. And also the connections used grow at the same pace. I always have 1 or 2 connections available. Could anyone tell me the possible reason for that. Here is my poolman.xml poolman datasource !-- == -- !-- Physical Connection Attributes -- !-- == -- !-- Standard JDBC Driver info -- dbnameproddb-cache/dbname jndiNamejndi-epochdb-cache/jndiName drivercom.sybase.jdbc2.jdbc.SybDriver/driver !-- drivercom.sybase.jdbc.SybDriver/driver -- urljdbc:sybase:Tds:0.0.0.0:4100/url usernameuser/username passwordpass/password !-- If the following element is set to true, then PoolMan's -- !-- scrollable/updatable ResultSet will not be used, and the -- !-- underlying driver's ResultSet will be used instead. This -- !-- provides a performance gain in certain rare instances at -- !-- the expense of functionality. -- !-- DEFAULT: false -- nativeResultsfalse/nativeResults !-- -- !-- Pool Behavior Attributes -- !-- -- !-- Connections created when the pool is instantiated -- !-- DEFAULT: 1 -- initialConnections2/initialConnections !-- The pool will never shrink below this number -- !-- DEFAULT: 0 -- minimumSize0/minimumSize !-- The pool will never grow larger than this value -- maximumSize50/maximumSize !-- The connection will be destroyed after living for a -- !-- duration of this value. IN SECONDS. -- !-- DEFAULT: 1200 (20 minutes) -- connectionTimeout600/connectionTimeout !-- A user will lose a Connection and it will automatically -- !-- return to its pool after the duration greater than or -- !-- equal to this value. IN SECONDS. -- !-- DEFAULT: 20 -- userTimeout10/userTimeout !-- How frequently each object's connection timeout and -- !-- user timeout values will be examined for collection. -- !-- IN SECONDS. -- !-- DEFAULT: 660 (11 minutes) -- skimmerFrequency60/skimmerFrequency !-- Each time the pool is sized down, how many connections -- !-- should be removed from it? This value prevents backing -- !-- off the pool too quickly. -- shrinkBy5/shrinkBy !-- Where should log and debug information be printed? -- !-- DEFAULT: System.out -- logFile/var/log/poolman.log/logFile !-- If set to true, the logger will display verbose info -- !-- DEFAULT: false -- debuggingtrue/debugging !-- XA Connection Attributes -- !-- NOTE: MEASURED IN SECONDS. -- transactionTimeout100/transactionTimeout !-- Query Cache Attributes-- !-- If enabled, queries will be cached. The cache is -- !-- asynchronously updated in the background. -- !-- DEFAULT: false -- cacheEnabledtrue/cacheEnabled !-- The maximum number of query/ResultSet pairs the -- !-- cache can contain. -- !-- DEFAULT: 5 -- cacheSize500/cacheSize !-- How long the cache waits before re-loading its -- !-- ResultSets from the underlying database. -- !-- IN SECONDS. -- !-- DEFAULT: 30 -- cacheRefreshInterval21600/cacheRefreshInterval !-- A SQL statement to be executed when the pool is created.-- !-- DEFAULT: none -- !-- initialPoolSQL insert into users values(32, 'xml') /initialPoolSQL /poolman Can someone tell me if I am doing anything wrong in this... or I have to set some other parameters. Also, when the total connection objects become high... I start getting lots of Arrayindexoutofbounds exception. I have to cycle my server to avoid getting these errors. Thanks and Regards Manish
Problem with JSP in Tomcat calling JavaBean that uses Xalan 2
I created a bean that can be called from a JSP or by directly instantiating it frommain(). The bean uses an XML file and an XSLT file, both of which are valid. When I run the bean using the main() method, it works correctly and prints the correct HTML output to the console. However, when I call the bean from the JSP below in Tomcat, it gives me the following error: java.lang.IllegalStateException: Response has already been committed I already know that an IllegalStateException"signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation." I don't know how to solve it though. Any ideas? Thanks, Christopher Benson [EMAIL PROTECTED] = package com.christopherbenson; import java.io.*;import javax.xml.transform.*;import javax.xml.transform.stream.*; public class TransformationBean{ public TransformationBean(){} public static void main(String[] args) throws Exception { TransformationBean bean = new TransformationBean(); try { bean.setXMLdoc("C:/Temp/test.xml"); bean.setXSLTdoc("C:/Temp/test.xsl"); String x = bean.getResult(); System.out.println(x); } catch (Exception e) { System.out.println(e.toString()); } } private String xmlsource = null; private String xsltsource = null; public void setXMLdoc(String xmldoc) throws FileNotFoundException, IOException { BufferedReader in = new BufferedReader(new FileReader(xmldoc)); String s, s2 = new String(); while((s = in.readLine())!= null) s2 += s + "\n"; in.close(); xmlsource = s2; } public void setXSLTdoc(String xsltdoc) throws FileNotFoundException, IOException { BufferedReader in = new BufferedReader(new FileReader(xsltdoc)); String t, t2 = new String(); while((t = in.readLine())!= null) t2 += t + "\n"; in.close(); xsltsource = t2; } public String getResult() throws TransformerException, TransformerFactoryConfigurationError, TransformerConfigurationException, IOException //SAXException { try { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(new StringReader(xsltsource))); StringWriter resultWriter = new StringWriter(); StreamResult TheResult = new StreamResult(resultWriter); transformer.transform(new StreamSource(new StringReader(xmlsource)), TheResult); String result = resultWriter.toString(); return result; } catch (Exception e) { String result = e.getMessage(); return result; } } }= %@ page language="java" %jsp:useBean id="bean" class="com.christopherbenson.TransformationBean" /%bean.setXMLdoc("C:/Temp/test.xml");bean.setXSLTdoc("C:/Temp/test.xsl");String result = bean.getResult();out.println(result);% =
contextAdmin question
Here's another question regarding the contextAdmin application that comes with Tomcat. Is it possible to save the new context created to server.xml in any way so that it will exists when I restart tomcat, or do I have to write this code myself? // Erik
Re: please unsubscribe me
praveen wrote: please unsubscribe me yeah me too !!1
creating the folder in the directory where .war file is
Hi, When tomcat starts, it puts the folder called same as our application in the directory where our .war file is. What i don't understand is why the prepare target of the build.xml file creates the same folder in the same place ? i apprecite ant help Thanks
Re: WAP
Arthur, I am getting a similar error message to Odd.Olsen, but using Tomcat in conjunction with the UP.Simulator vice Nokia. I am attempting to get the UP.Simulator to access .wml files on Tomcat using http://localhost:8080/static.wml file. I have added the mime-types to the (in my case) c:\jakarta-tomcat\conf\web.xml file without success (Odd.Olsen's problem). Netscape and IE both work fine with my Tomcat localhost:8080 installation. This seems to be a special case with respect to your recommendation to add the mime types to the yourApplication/web-inf/web.xml file. I have added the wap mime-types to the c:\jakarta-tomcat\webapps\examples\Web-inf\web.xml file with the same (error) result. Can you suggest any fixes in this case? thanks - jim At 09:49 AM 5/7/01 +0200, you wrote: Hi, there is a bug in tc 3.2, you have to put the mime types in the web.xml under your application yourApplication/web-inf/web.eml Arthur - Original Message - From: Olsen Odd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 8:10 AM Subject: WAP Hi When I try to run WML on Tomcat 3.2, I get MIME type text/plain is not supported I have put the mime types for WML in /conf/web.xml as you can see below and is using Nokia WAP Toolkit. It all worked great when I use Tomcat 3.1 and I can't see why it shouldn't work on 3.2. What more I can do? /Odd !-- Start WAP extensions -- mime-mapping extensionwml/extension mime-typetext/vnd.wap.wml/mime-type /mime-mapping mime-mapping extension wbmp /extension mime-type image/vnd.wap.wbmp /mime-type /mime-mapping mime-mapping extension wmlc /extension mime-type application/vnd.wap.wmlc /mime-type /mime-mapping mime-mapping extension wmls /extension mime-type text/vnd.wap.wmlscript /mime-type /mime-mapping mime-mapping extension wmlsc /extension mime-type application/vnd.wap.wmlscriptc /mime-type /mime-mapping !-- End WAP extensions -- _ Odd Olsen Volvo IT Dept 2540, DA2N SE-40508 Goteborg, Sweden Telephone: +46 31 7655718 E-mail: [EMAIL PROTECTED] Jim Watson [EMAIL PROTECTED] [EMAIL PROTECTED]
RE: RE: Loosing Connections in a pool
1) Make sure you have enough open cursors (specified as OPEN_CURSORS in your init.ora file). 2) See what cursors you've got open after running your page(s) by doing, SELECT SQL_TEXT FROM SYS.V_$OPEN_CURSOR; That'll tell you (more or less) what queries you've left open. 3) Make sure that you're closing all the connections, statements and result sets you open. In general, you should close resources in finally blocks, like, ResultSet rs = stmt.executeQuery(SELECT 'X' FROM DUAL); try { // Handle the data in the result set,... } finally { try { rs.close(); } catch (Exception ex) { } } That way, if something crashes in the middle, you're still closing the resource. -- Bill K. -Original Message- From: Dan Randall [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 9:00 AM To: [EMAIL PROTECTED] Subject: Re: RE: Loosing Connections in a pool Hi Josh, No, I am not receiving any error messages. Well, not until it crashes! At that point, I get a java.lang out of memory error. It seems like an application (ours, not tomcat's) resource leak to me, but I am searching for any know issues with tomcat, jdbc, etc just in case. Thanks, Dan Joshua Sharp [EMAIL PROTECTED] 05/04 3:51 PM Are you receiving any error messages? I know oracle 8.1.7 has a connection limit of ~120/process before it runs out of file descriptors. I haven't seen any problems with loosing connections though. Josh -Original Message- From: Dan Randall [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: Loosing Connections in a pool Hi, My tomcat application runs in a production environment for about 24 hours before it fails and must be restarted. During that time JDBC connections to Oracle become ignored and eventually disappear. A fair guess is that I am loosing memory, threads and resources in general until there is nothing left and only a restart cures the matter. Unfortunately, tomcat, rather than apache is serving much of the pages and graphics. That may be a contributing factor? I am using: Solaris 8 Oracle 8.1.7 tomcat 3.2.1 apache 1.3.19 and Java 1.3 Does anyone have an idea of what sort of problems I might be having? Any known resource leaks or threading issues? Thanks!! Dan This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail.
Re: Threads
Have you tried the User's Guide? http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/uguide/tomcat_ug.htm l --jeff - Original Message - From: Wolle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, May 06, 2001 4:28 AM Subject: Re: Threads Hei, thanks, that was exactly what I mean Greetings, Michael P.S. Exists some doku about this features ? [EMAIL PROTECTED] wrote: hi ; u can use it like that in your server.xml Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ Parameter name=max_threads value=30/ Parameter name=max_spare_threads value=20/ Parameter name=min_spare_threads value=5 / /Connector I think this is what u want -Original Message- From: Wolle [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 06, 2001 3:52 AM To: tomcatUser Subject: Threads Hello all wise guys, Could I manange the number of Thread that Tomcat will creat ? Is there an Option in the server.xml (somthing like max_thread) ? when yes, how do I configure this. Greetings, Michael -- __ Gruss, Wolle --- [EMAIL PROTECTED]
RE: please unsubscribe me
Title: RE: please unsubscribe me To remove your address from the list, send a message to: [EMAIL PROTECTED] -Original Message- From: Tien Duc Nguyen [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 10:33 AM To: [EMAIL PROTECTED] Subject: Re: please unsubscribe me praveen wrote: please unsubscribe me yeah me too !!1
Poolman
Hi All, I am using poolman 2.1 for connection pooling. The connection pooling seems to be working fine, but the only problem I seem to be having is that my total connections grow very rapidly. And also the connections used grow at the same pace. I always have 1 or 2 connections available. Could anyone tell me the possible reason for that. Here is my poolman.xml poolman datasource !-- == -- !-- Physical Connection Attributes -- !-- == -- !-- Standard JDBC Driver info -- dbnameproddb-cache/dbname jndiNamejndi-epochdb-cache/jndiName drivercom.sybase.jdbc2.jdbc.SybDriver/driver !-- drivercom.sybase.jdbc.SybDriver/driver -- urljdbc:sybase:Tds:0.0.0.0:4100/url usernameuser/username passwordpass/password !-- If the following element is set to true, then PoolMan's -- !-- scrollable/updatable ResultSet will not be used, and the -- !-- underlying driver's ResultSet will be used instead. This -- !-- provides a performance gain in certain rare instances at -- !-- the expense of functionality. -- !-- DEFAULT: false -- nativeResultsfalse/nativeResults !-- -- !-- Pool Behavior Attributes -- !-- -- !-- Connections created when the pool is instantiated -- !-- DEFAULT: 1 -- initialConnections2/initialConnections !-- The pool will never shrink below this number -- !-- DEFAULT: 0 -- minimumSize0/minimumSize !-- The pool will never grow larger than this value -- maximumSize50/maximumSize !-- The connection will be destroyed after living for a -- !-- duration of this value. IN SECONDS. -- !-- DEFAULT: 1200 (20 minutes) -- connectionTimeout600/connectionTimeout !-- A user will lose a Connection and it will automatically -- !-- return to its pool after the duration greater than or -- !-- equal to this value. IN SECONDS. -- !-- DEFAULT: 20 -- userTimeout10/userTimeout !-- How frequently each object's connection timeout and -- !-- user timeout values will be examined for collection. -- !-- IN SECONDS. -- !-- DEFAULT: 660 (11 minutes) -- skimmerFrequency60/skimmerFrequency !-- Each time the pool is sized down, how many connections -- !-- should be removed from it? This value prevents backing -- !-- off the pool too quickly. -- shrinkBy5/shrinkBy !-- Where should log and debug information be printed? -- !-- DEFAULT: System.out -- logFile/var/log/poolman.log/logFile !-- If set to true, the logger will display verbose info -- !-- DEFAULT: false -- debuggingtrue/debugging !-- XA Connection Attributes -- !-- NOTE: MEASURED IN SECONDS. -- transactionTimeout100/transactionTimeout !-- Query Cache Attributes-- !-- If enabled, queries will be cached. The cache is -- !-- asynchronously updated in the background. -- !-- DEFAULT: false -- cacheEnabledtrue/cacheEnabled !-- The maximum number of query/ResultSet pairs the -- !-- cache can contain. -- !-- DEFAULT: 5 -- cacheSize500/cacheSize !-- How long the cache waits before re-loading its -- !-- ResultSets from the underlying database. -- !-- IN SECONDS. -- !-- DEFAULT: 30 -- cacheRefreshInterval21600/cacheRefreshInterval !-- A SQL statement to be executed when the pool is created.-- !-- DEFAULT: none -- !-- initialPoolSQL insert into users values(32, 'xml') /initialPoolSQL /poolman Can someone tell me if I am doing anything wrong in this... or I have to set some other parameters. Also, when the total connection objects become high... I start getting lots of Arrayindexoutofbounds exception. I have to cycle my server to avoid getting these errors. Thanks and Regards Manish -- Manish Poddar Paycom.net 310-827-5880 x 327 818-415-7447 (m)
RE: Why does Internet Explorer think it is offline?
I have found that IE really wants to have the HTTP:// in front of the localhost - On mine, it wants to change localhost:8080/whatever to local:8080/whatever and I get a similar error to what you mention. Could this be part of your problem? -Original Message- From: RODGERS,RICK (HP-Cupertino,ex3) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 11:18 AM To: '[EMAIL PROTECTED]' Subject: Why does Internet Explorer think it is offline? I am using tomcat with IE and am having problems with it. Every time I start IE and try and access a Java Server Page or servlet through lolcalhost:8080/examples/jsp the browser first complains that the system is not connected to a network. I then click on try again and the browser then seems to find the JSPand display it. Is there a special setting for tomcat if the system is connected to a hub? Any thoughts? Rick
send response to browser and continue processing in servlet.service()
Is there a way to send the response to browser and then continue some lengthy processing in the Servlet.service() method? I'm using IE and I tried these scenarios. I tried SevletResponse.flushBuffer() which seems to have not effect. I tried SevletResponse.getOutputStream().flush() which will send all output to the browser. However, the browser's indicator keep on spinning. I tried SevletResponse.getOutputStream().close() also but it also seems to have no effect. The indicator won't stop until I exit Servlet.service(). Because of my design, I can't just start a thread and exit. Is there anyway I can tell Tomcat I want to remain in Servlet.service() for a while. All output has been send and please close the socket? Thanks for any help! Wai-yip
win32 apache support Log to pipe??
Hi, sorry for this question may not be very related to this list. but I can't find an apache user list to send to. Q: does win32 apache 1.3.17 support Logging to pipe? Log to pipe work on unix though. on unix: // works :) CustomLog |java -classpath /opt pipe common on windows 2000: // didn't work :( CustomLog |java -classpath d:\ pipe common thanks. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: A non-apropriate question?
Apparently, yes, it is possible to use the jikes compiler: open up the (tomcat-home)/conf/web.xml file and find this entry: !-- uncomment the following to use Jikes for JSP compilation init-param param-namejspCompilerPlugin/param-name param-valueorg.apache.jasper.compiler.JikesJavaCompiler /param-value /init-param -- I hope this helps, regards, michael tiffany
working directory getting too big
can anyone tell me if there is a way to manage the working directory, (where tomcat places the JSP compiled files .java, .class) my application automatically creates new JSP who get compiled and their files get put in the working directory. THEREFORE IT WILL GROW INDEFINITLY. What i am looking for is a way to delete automatically the JSP files in that directory after they are no longer needed.can tomcat do this? Or have them stored in a cache instead and setting a max size where the first in is the first out . Or something at the OS level. Any help, advice or directing me in the right path will be greatly appreciated. thanks in advance.
Re: Why does Internet Explorer think it is offline?
Your problem has nothing to do with Tomcat, or Apache, or any other server on god's green earth... The problem isn't a problem, it's just IE checking for an active internet connection and not finding one. Just click "try again" and it'll find the server. There is, to my knowledge, no way around it. Netscape, BTW, does not behave in this fashion. It's just a MonopolySoft, err, Microsoft quirk. regards, MTiffany
Tomcat/Netscape 3.6 connector for Solaris?
Does anyone know a location of documentation and/or binaries for the Tomcat-Netscape Enterprise 3.6 server? The http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-netscape-howt o.html document is completely NT-centric, to the point that it's not clear whether the redirector has been ported to Solaris or what it would be called if so. Considering the close relationship between Sun and Jakarta I'm surprised by what I seem to be seeing. I'm willing to RTFM if I can just find TFM. Thanks, David Boyce
RE: Why does Internet Explorer think it is offline?
I have found that IE really wants to have the HTTP:// in front of the I do use http. I use http://localhost/8080/examples/jsp/filename; localhost - On mine, it wants to change localhost:8080/whatever to local:8080/whatever and I get a similar error to what you mention. it shortens it to local? Thats weird. Could this be part of your problem? -Original Message- From: RODGERS,RICK (HP-Cupertino,ex3) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 11:18 AM To: '[EMAIL PROTECTED]' Subject: Why does Internet Explorer think it is offline? I am using tomcat with IE and am having problems with it. Every time I start IE and try and access a Java Server Page or servlet through lolcalhost:8080/examples/jsp the browser first complains that the system is not connected to a network. I then click on try again and the browser then seems to find the JSPand display it. Is there a special setting for tomcat if the system is connected to a hub? Any thoughts? Rick
AW: How to run through a DMZ firewall.
To answer your question, you should provide a bit more about what you want to achieve. (Or what problems you have) A typical firewall configuration doesn't block http on port 80. But that's up to the administrator of the firewall. -Ursprüngliche Nachricht- Von: Fred Huelsbeck [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 7. Mai 2001 16:24 An: [EMAIL PROTECTED] Betreff: How to run through a DMZ firewall. I have been unable to track down any documentation on this configuration. Is there any out there? Where can I get thorough documentation for Tomcat? Thanks in advance, Fred Huelsbeck
Tomcat/Apache Q
Right now, I am running a web app. with a Tomcat 3.2.1 and Apache 1.3.12 configuration. I want to track all errors that are produced in the Apache error.log Does anyone out there know of a way to use the Apache error.log to track use and set it up as a simple reporting tool? One that will send an email if or when there is an error. I know the error log itself can't do this, but is there something that can? Thanks in advance for any feedback. ~~ Mark
Reload Servlet problems
I work with tomcat 3.2.1 and apache. I set reload=true in the server.xml. The servlet refresh well without restart tomcat. But, when I call a servlet by a jsp file and the servlet crash( ClassCastException for example) the servlet stop reloading for new one. I need to restart tomcat and I don't wont to restart it. Why do I need ? Is there a explication ? Thank
RE: Why does Internet Explorer think it is offline?
Any time you specify ports 8080, you must use http to indicate its an http site Nael Mohammad Neomar, Inc. 180 Montgomery Street Suite 2000 San Francisco, CA 94104 Tel: 415-403-7300 ext. 274 Fax: 415-403-7373 URL: www.neomar.com When Wireless Means Business To acquire and to earn is the meaning of Nael
apxs problem with solaris 7
Title: apxs problem with solaris 7 When I give the magic apxs incantation found in the mod_jk configuration instructions page...I get lots of smooth looking output followed by this little gem... gcc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/usr/local/apache/include -I../jk -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../jk/jk_worker.c -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o apxs:Break: Command failed with rc=255 Hmm...I'm using Solaris7 with gcc in the path along with working Perl 5. Any ideas/encouragement would be great. Chad Prey
Servlet Tag
I hope that this is not off topic but I can find nowhere else to ask the question. I'm trying to use the SERVLET tag in a static html page causing the page to run the servlet as a server side include. I'm running Apache as my webserver. I've turned SSI on in my Apache configuration file. In fact, I am able to use #echo to throw the date back. I have my .shtml file in /apache/htdocs. I have my servlet in /jacarta-tomcat-3.2.1/webapps/examples/web-inf/classes. The .shtml file is properly served by Apache and renders everything but my servlet output. I can also directly call my servlet and see its output. Does anybody know what I may be doing wrong? Attached below is the contents of my .shtml file. Thanks in advance. HTML HEAD TITLE Including Servlet Output in HTML /TITLE /HEAD BODY H1 Servlet Output is between the lines /H1 HR SERVLET CODE=/examples/servlet/TestServlet /SERVLET HR HR Echoing the DATE_GMT !--#echo var=DATE_GMT-- HR H1 H1 /BODY /HTML Dallas Skinner EDS b l u e s p h e r e Montana * 406.582.5234* 406.582.5299 * mailto:[EMAIL PROTECTED]
RE: send response to browser and continue processing in servlet.s ervice()
Title: RE: send response to browser and continue processing in servlet.s ervice() One way you can set the refresh header which auto checks for every 5 secs or 10 etc and displays the new data. This way once the data is fully there then do not set the refresh header and just send the data in your servlet. This way part of the servlet result can be displayed and rest as and when it comes. Thanks and Regards, === Gary Grewal -Original Message- From: William Kaufman [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 3:17 PM To: '[EMAIL PROTECTED]' Subject: RE: send response to browser and continue processing in servlet.s ervice() I tried SevletResponse.getOutputStream().flush() which will send all output to the browser. However, the browser's indicator keep on spinning. Is that a bad thing? That is, when you're off working on something else, is the page finished or isn't it? If it is finished, you can close the output stream, and do the work in another thread. If it isn't finished (i.e., if the work you're doing has to return to the browser's page), then the browser _should_ seem busy, because it's waiting on more data. (Any other solution to this, including launching more browser windows or refreshing the page constantly for extra data, will be solved with HTML/HTTP, and won't be specific to Tomcat, to servlets, or even to any Java code. You can try looking around HTML web sites, like html.about.com or www.webdeveloper.com .) -- Bill K. -Original Message- From: Wai-Yip Tung [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 12:20 PM To: [EMAIL PROTECTED] Subject: send response to browser and continue processing in servlet.service() Is there a way to send the response to browser and then continue some lengthy processing in the Servlet.service() method? I'm using IE and I tried these scenarios. I tried SevletResponse.flushBuffer() which seems to have not effect. I tried SevletResponse.getOutputStream().flush() which will send all output to the browser. However, the browser's indicator keep on spinning. I tried SevletResponse.getOutputStream().close() also but it also seems to have no effect. The indicator won't stop until I exit Servlet.service(). Because of my design, I can't just start a thread and exit. Is there anyway I can tell Tomcat I want to remain in Servlet.service() for a while. All output has been send and please close the socket? Thanks for any help! Wai-yip
RE: Why does Internet Explorer think it is offline?
-- Thanks for your info. But please tell me what makes an active internet connection ? I am hooked up to a switch and I have tomcat running on the system I am using. Doesn't this make for an active internet connection? Rick [RODGERS,RICK (HP-Cupertino,ex3)] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 1:19 PM To: [EMAIL PROTECTED] Subject: Re: Why does Internet Explorer think it is offline? Your problem has nothing to do with Tomcat, or Apache, or any other server on god's green earth... The problem isn't a problem, it's just IE checking for an active internet connection and not finding one. Just click try again and it'll find the server. There is, to my knowledge, no way around it. Netscape, BTW, does not behave in this fashion. It's just a MonopolySoft, err, Microsoft quirk. regards, MTiffany
RE: Why does Internet Explorer think it is offline?
At 03:16 PM 5/7/2001 -0700, you wrote: Thanks for your info. But please tell me what makes an active internet connection ? I am hooked up to a switch and I have tomcat running on the system I am using. Doesn't this make for an active internet connection? Internet Exploder/File/Work Offline. Purely an IE/WinME/2000 thing.
Help me on Active X and tomcat.
I have an application using IE explorer 4.X as an Active X control that uses a window provided to it by the Active X container application. The problem is that the browser inside the container window can not seem to connect to the Webserver (tomcat). I see no error, its just that I can not display files trough a URL such ashttp://localhost:8080/examples/jsp/filename; If anyone has any idea what the problem is it would sure BE APRECIATED! Rick
Re: Why does Internet Explorer think it is offline?
My experiences with server push are that 4.76 works fine, however, it crashes NN6 and Mozilla .8. What that tells me is that server push isn't too reliable. Anthony On Monday 07 May 2001 17:41, you wrote: cmiiw, but possibly active vs. passive; i.e., related to supporting server push. NN does, IE doesn't. Arnold Shore Annapolis, MD US -Original Message- From: Tim O'Neil [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 6:24 PM To: [EMAIL PROTECTED] Subject: RE: Why does Internet Explorer think it is offline? At 03:16 PM 5/7/2001 -0700, you wrote: Thanks for your info. But please tell me what makes an active internet connection ? I am hooked up to a switch and I have tomcat running on the system I am using. Doesn't this make for an active internet connection? Internet Exploder/File/Work Offline. Purely an IE/WinME/2000 thing.
RE: Testing my installation
Does it work as http://myservername:8080/examples/jsp/?? if NOT, the problem is purely Tomcat. If this DOES work, then your problem is in the Apache "glue" -Original Message-From: Tan Khim Siang [mailto:[EMAIL PROTECTED]]Sent: Saturday, April 21, 2001 12:37 AMTo: [EMAIL PROTECTED]Subject: Testing my installationImportance: High Hi all, I have done the following: Installed the glue for Apache and Tomcat (mod_jk) Installed Tomcat 3.2.1 I am about to test and see whether the installation is right at all. I tried this: http://myservername/jakarta-tomcat-3.2.1/webapps/examples/jsp/ Those appls don't seem to be working correctly for my case, I believe its got to do with my setup. Is this the right way to test the installation? Any idea anybody? Thank you all! Khim
ErrorHandler
Anyone know why this error might come up? It appears to be a 50/50 chance this error occurs on a page, and when it does it causes that jsp page to no longer be served. This seems extremely bizzare to me as I would imagine that the images or js files are entirely separate requests from the jsp page that uses them. But this is causing server crashes. This does not happen because the browsers "stop" button is pushed. Anyone seen this before or know a possible solution?Inormally run my sites on linux/solaris, but this one running on 2000 is having problems. This is a stand-alone situation. Any help greatly appreciated. Error Handler: Error loop for R( +/images/sign2.gif + null) error java.net.SocketException: Connection reset by peer: socket write error. What is the "Error loop" about? Thanks.
Re: error message logging
ah rightio:) is there also a way to keep the console logs too? --- Boris Niyazov [EMAIL PROTECTED] wrote: Look at server.xml: you can specify a log file for Loger name=tc_log, that where tomcat will redirect its logs insetad of console. Is it what you want? hth * * Boris NiyazovPh: 212-854-4094 Fax: 212-854-1749 * * Systems Manager Email: [EMAIL PROTECTED] * * Columbia Law School URL: http://www.law.columbia.edu * * Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Date: Tue, 8 May 2001 00:04:11 +1000 (EST) From: teh j [EMAIL PROTECTED] Subject: error message logging To: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi there! I was wondering if it were possible to somehow log the error messages that appear at the tomcat console should there be an error in a jsp application? eg say that our javabeans have a nullpointer exception and an error 500 message is displayed at our console and at our browser. Is there a way to pipe this to a log file? thanks ! Jason _ http://store.yahoo.com.au - Yahoo! Store - It's time you had your business online! _ http://store.yahoo.com.au - Yahoo! Store - It's time you had your business online!
RE: ErrorHandler
Are you using IE? And, have you tried Netscape? It's not quite the same error, but you always get Connection reset by peer on static content when using IE: it will start to pull a file, see that it's already got an up-to-date copy in its cache, and drop the connection. (Randy Layman posted a nice description of the problem on Apr 19: see the mailing list archives.) This isn't fatal, though. I suspect that you're _actually_ getting a completely different problem, unrelated to this message. (After all, are you actually opening a URL to /images/sign2.gif and reading the content in your own code?) I think you'll either find that it's not crashing (you're just taking that warning too seriously), or that it's crashing somewhere else (and you're associating it with that warning). -- Bill K. -Original Message- From: Simon Chatfield [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 4:38 PM To: [EMAIL PROTECTED] Subject: ErrorHandler Anyone know why this error might come up? It appears to be a 50/50 chance this error occurs on a page, and when it does it causes that jsp page to no longer be served. This seems extremely bizzare to me as I would imagine that the images or js files are entirely separate requests from the jsp page that uses them. But this is causing server crashes. This does not happen because the browsers stop button is pushed. Anyone seen this before or know a possible solution? I normally run my sites on linux/solaris, but this one running on 2000 is having problems. This is a stand-alone situation. Any help greatly appreciated. Error Handler: Error loop for R( +/images/sign2.gif + null) error java.net.SocketException: Connection reset by peer: socket write error. What is the Error loop about? Thanks.
Re: petstore problem
Hi, Swamy I don't recall the exact steps, but I'm sure you have to make the estore database known to the J2EE container. That means editing a property file somewhere. Sorry, I can't be more detailed since I don't have my setup in front of me right now. Hope this helps. Regards, Noel Lecaros Swamy wrote: Yeap. Ran the populate script. Also used 'select * from users' to check if the inserts were successful. Thanks. Swamy -Original Message- From: Noel E. Lecaros [SMTP:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 4:11 AM To: [EMAIL PROTECTED] Subject:Re: petstore problem HI, Swamy Did you create the datastore by running the populate script? Regards, Noel Lecaros Swamy wrote: Hi, I have been trying to install the pet store implementation. After jumping a few hoops this last one has been testing me for a while now. Here is the environment : j2sdkee1.2.1, jdk1.3.0_02, Cloudscape_3.6, jboss-tomcat-2.2, jps1.1.1 and the patch from jboss on Windows 2000 server. Here is what I do : Step 1 : Start Cloudscape using the script in j2sdkee1.2.1\bin\cloudscape.bat -start Step 2 : Start jboss using jboss-tomcat-2.2\jboss-2.2\bin\run.bat Step 3 : On the browser I try http://localhost:8080/estore/control/language?language=English This results in a the following exception Internal Servlet Error: java.lang.RuntimeException: NamingException while looking up DB context : EstoreDB not bound at com.sun.j2ee.blueprints.shoppingcart.catalog.model.CatalogModel.init(Catalog Model.java:42) at com.sun.j2ee.blueprints.petstore.control.web.ModelManager.getCatalogModel(Mo delManager.java:84) at com.sun.j2ee.blueprints.petstore.control.web.ModelManager.init(ModelManager. java:60) at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.j ava:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Now, if I refresh the screen. I get the first page right but on the console from where I started jboss I get this message 2001-05-06 03:47:46 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECTuser_pass FROM users WHERE user_name = ? 2001-05-06 03:47:47 - ContextManager: JDBCRealm: Authentication unsuccessful for user null Thanks in advance. Swamy
Re: contextAdmin question
You mean to say that..if i create a new one like below.. Context path=/admin docBase=webapps/admin crossContext=true debug=0 reloadable=true trusted=false /Context it is not persistent? It disappears after restart/restop? --- [EMAIL PROTECTED] wrote: That was a really good question, and not knowing the answer, I copied my server.xml file, renamed one of the copies, and started tomcat. Added new contexts, shut down tomcat, and compared the two files. Apparently the answer* to your question is yes, you will have to manually code new contexts into your server.xml file if you want them (contexts, that is) to persist between start/stops of tomcat. * == This answer derived on a Win98 box running Tomcat 3.2.1. YMMV. So my follow-up question is: does anyone know if this is the intended functionality of the contextAdmin tool? And beyond that: where can I find more information about requested, recommended, planned, and existing Tomcat administration tools/servlets. Anyone? Anyone? Here's another question regarding the contextAdmin application that comes with Tomcat. Is it possible to save the new context created to server.xml in any way so that it will exists when I restart tomcat, or do I have to write this code myself? __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: ErrorHandler
Had Inot been pulling my hair out about these strange problems I've been having Iwould not have been grasping at straws. Irealize that http is entirely stateless and the two problem shouldn't be connected. Anyway, the problem has seemingly gone away after a server reboot, (that's the real problem, not the IE io problem) Ican't stand windows. If Icould teach the world to sing. Thanks for your help. William Kaufman wrote: Are you using IE? And, have you tried Netscape? It's not quite the same error, but you always get "Connection reset by peer" on static content when using IE: it will start to pull a file, see that it's already got an up-to-date copy in its cache, and drop the connection. (Randy Layman posted a nice description of the problem on Apr 19: see the mailing list archives.) This isn't fatal, though. I suspect that you're _actually_ getting a completely different problem, unrelated to this message. (After all, are you actually opening a URL to "/images/sign2.gif" and reading the content in your own code?) I think you'll either find that it's not crashing (you're just taking that warning too seriously), or that it's crashing somewhere else (and you're associating it with that warning). -- Bill K. -Original Message- From: Simon Chatfield [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 4:38 PM To: [EMAIL PROTECTED] Subject: ErrorHandler Anyone know why this error might come up? It appears to be a 50/50 chance this error occurs on a page, and when it does it causes that jsp page to no longer be served. This seems extremely bizzare to me as I would imagine that the images or js files are entirely separate requests from the jsp page that uses them. But this is causing server crashes. This does not happen because the browsers "stop" button is pushed. Anyone seen this before or know a possible solution? I normally run my sites on linux/solaris, but this one running on 2000 is having problems. This is a stand-alone situation. Any help greatly appreciated. Error Handler: Error loop for R( +/images/sign2.gif + null) error java.net.SocketException: Connection reset by peer: socket write error. What is the "Error loop" about? Thanks. -- Simon Chatfield VP, Software Development Inteflux Inc.
User id and Paswd for Admin Webapp?
What is userid and passwd for Admin Webapp? Ted __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Problem with JSP in Tomcat calling JavaBean that uses Xalan 2
Hi, Christopher Just an idea to get you started. If I remember correctly, an IllegalStateException can be thrown if you obtain a Writer to the ServletOutputStream more than once, e.g. calling Request.getWriter, and then calling Request.getInputStream. From your code, I can't tell whether you're doing so, but I do know that a JSP will try to obtain a Reader from the request object. That means any stream- or writer-related accesses in your bean are suspect. You can also investigate by looking in the working subdirectory where Tomcat creates the servlets from JSPs. The variable names be a bit cryptic, but this should help you debug your exception dumps. Hope this helps. Regards, Noel Lecaros Christopher Benson wrote: I created a bean that can be called from a JSP or by directly instantiating it from main(). The bean uses an XML file and an XSLT file, both of which are valid. When I run the bean using the main() method, it works correctly and prints the correct HTML output to the console. However, when I call the bean from the JSP below in Tomcat, it gives me the following error: java.lang.IllegalStateException: Response has already been committed I already know that an IllegalStateException signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation. I don't know how to solve it though. Any ideas? Thanks, Christopher Benson [EMAIL PROTECTED] = package com.christopherbenson; import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; public class TransformationBean { public TransformationBean(){} public static void main(String[] args) throws Exception { TransformationBean bean = new TransformationBean(); try { bean.setXMLdoc(C:/Temp/test.xml); bean.setXSLTdoc(C:/Temp/test.xsl); String x = bean.getResult(); System.out.println(x); } catch (Exception e) { System.out.println(e.toString()); } } private String xmlsource = null; private String xsltsource = null; public void setXMLdoc(String xmldoc) throws FileNotFoundException, IOException { BufferedReader in = new BufferedReader(new FileReader(xmldoc)); String s, s2 = new String(); while((s = in.readLine())!= null) s2 += s + \n; in.close(); xmlsource = s2; } public void setXSLTdoc(String xsltdoc) throws FileNotFoundException, IOException { BufferedReader in = new BufferedReader(new FileReader(xsltdoc)); String t, t2 = new String(); while((t = in.readLine())!= null) t2 += t + \n; in.close(); xsltsource = t2; } public String getResult() throws TransformerException, TransformerFactoryConfigurationError, TransformerConfigurationException, IOException //SAXException { try { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(new StringReader(xsltsource))); StringWriter resultWriter = new StringWriter(); StreamResult TheResult = new StreamResult(resultWriter); transformer.transform(new StreamSource(new StringReader(xmlsource)), TheResult); String result = resultWriter.toString(); return result; } catch (Exception e) { String result = e.getMessage(); return result; } } } = %@ page language=java % jsp:useBean id=bean class=com.christopherbenson.TransformationBean / % bean.setXMLdoc(C:/Temp/test.xml); bean.setXSLTdoc(C:/Temp/test.xsl); String result = bean.getResult(); out.println(result); % =