Re: JAVA vs. PERL startup time + memory
It's perfectly easy to write code which runs as a process to read a continuous pipe, or to write it to be invoked fresh every time. No special knowledge is needed in either case (the former in Perl boils down to "while ()") I think you'll get better advice if you post more details about what you're trying to achieve. Also, this isn't really the forum to ask this question, since its not about configuring and using Tomcat. That said, I'm guessing you're trying to take a log file feed from Apache and then post it back - first of all, be careful of creating an infinite loop! It sounds like an awkward way to do things. If you want to take log data for a Java web application and make it available via another servlet, it's better to use a mechanism other than HTTP to talk back to yourself; e.g. open a separate i/o stream in Tomcat and create a separate log process which will speak to it via a pipe stream or TCP/IP. One sneaky way to do this might be to start a JVM running your own logging program, and have it fork a thread to run Tomcat's main() on startup. Thus you end up with the logger and Tomcat in the same JVM, and the act of Apache fork()ing the logger sets up the pipe you need. Depending on what you're trying to do, it may be easier just to subclass all your servlets off a common base class which logs servlet activity completely within the JVM. One thing you definitely *don't* want to do is start a JVM for every request - JVM's have a pretty high startup overhead, at least a couple of seconds of CPU. If you want to create a small program or script that runs very frequently, Perl is a good choice, but the best way is to use a statically compiled language with minimal startup overhead such as C. Cheers Dave 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/
Re: JAVA vs. PERL startup time + memory
Just one idea that isn't completely thought through so forgive me if this is ludicrous How about piping the output from the log into a FIFO/named pipe (read the man page for mknod if you're not sure what that is). Then you could have a background process that is reading from the pipe. That way, the process should only need to be started once.
tomcat along side IIS 5 on windows 2000 pro
I have followed your instructions on: http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html and: http://www.verysimple.com/scripts/support_tc_iis.html to setup tomcat as a service and configure the ISAPI redirector on my win 2000 server. when I try: http://localhost/examples/jsp/index.html to get a list of all sample jsp pages to try, they all work i.e. http://localhost/examples/jsp/dates/date.jsp no problem. but if i copy the date.jsp file to the root of my webserver, http://localhost/date.jsp I get the following error message any help would be appreciated. Error: 500 Location: /date.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to load class dates.JspCalendar at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:183) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:99) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:773) at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:220) at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:175) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:183) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164) 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.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) 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) Root cause: java.lang.ClassNotFoundException: Unable to load class dates.JspCalendar at org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:223) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:181) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:99) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:773) at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:220) at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:175) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:183) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164) 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.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.Thre
RE: Tomcat/Xalan
xalan...xerces...japx.jar...j2eee.jar...crimson.jar This definitively is a pain when jars come with different implementations of the same interfaces. We have to juggle with the order in which we place these in the classpath...and all is well in the end. So although you may have the prope jars, just maybe...maybe you have one put in there BEFORE the one that will make it work. Hey... I even have two different versions of crimson.jar (real different!) tomcat/server/lib -and one in - tomcat/jasper so yes...this is definitely a pain. Regards - Paul -Original Message- From: Noel E. Lecaros [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 10:01 PM To: [EMAIL PROTECTED] Subject: Re: Tomcat/Xalan Hi, Robert Actually, I know that, but Dante said he had problems with jaxp and crimson, so Xerces should be another parser to try in place of that. Regards, Noel Lecaros Robert Petersen wrote: > Just FYI - > Xerxes is a parser and Xalan is for XML Transformations (XSLT), they do two > different things and both are from Apache. > > - Robert Petersen > http://www.orangefood.com > > -Original Message- > From: Noel E. Lecaros [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 04, 2001 12:39 PM > To: [EMAIL PROTECTED] > Subject: Re: Tomcat/Xalan > > Hi, Dante > > Just a thought but have you tried using the Apache Xerces parser? Hopefully > this parser provides better integration with Xalan. > > Hope this helps. > > Regards, > Noel Lecaros > > Dante le Poole wrote: > > > Hi, > > > > has anyone used the xalan-package in their webapps? I am and it's going > troublesome. > > > > With tomcat 3.2.1 it originally kept giving a NoSuchMethodError for the > method getNamespaceOfNode (in one of apache's > > xpath-classes). > > I solved that one by replacing the jaxp.jar in tomcat's lib-dir with the > latest version and adding crimson.jar. > > > > Now tomcat has started hanging on me, refusing any http-requests and > requiring several resets a day (see my post from yesterday). > > I'm looking into upgrading to 3.2.2b4, but I'm running into the exact same > problem with the NoSuchMethodError again, only this time > > adding jaxp.jar and crimson.jar doesn't work! > > > > Now I'm stuck with two problems that have got me baffled, and my boss > isn't amused about our site not functioning correctly! Does > > anyone please have any ideas? > > > > Thanx, > > > > Dante le Poole
RE: JAVA vs. PERL startup time + memory
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/
RE: JAVA vs. PERL startup time + memory
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/
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
Apache/Tomcat/JBoss: Where/how to deploy J2EE application?
This is probably a simple question if you've already done it, but if you're trying to deploy a WEB/EJB application in a system using Apache, Tomcat, and JBoss (all separate), where exactly do you deploy it? Can you still deploy it as a single EAR in one place? Do you have to take any special steps in configuring either piece? Or do you have to deploy a WAR with Apache/Tomcat and an ejb-jar with JBoss? -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
RE: JAVA vs. PERL startup time + memory
Perl can be small, and relatively fast, apache cgi invocations of perl scripts (mod-cgi not mod-perl) load the perl "engine"(whatever it might be called, interpreter/VM/JITcompiler) for every process, as far as I know anyway, hence the rise of mod-perl which caches the compiled perl scripts and the "engine" in RAM between requests for a faster startup, or so I understand. Don't know how to deal with pipeing to a daemon though, without invoking a messaging process and defeating the purpose of the daemon. If you know that one, then perl does http & regex quite well (assuming you need to build your requests out of the input), but java does threads and OO nicely. > -Original Message- > From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] > Sent: Saturday, May 05, 2001 8:44 PM > To: [EMAIL PROTECTED] > Subject: Re: JAVA vs. PERL startup time + memory > > > Wouldn't it be easier to create a daemon of some sort that stays > loaded and > accepts requests, rather than creating a new process each time? > Whether you > use Java or Perl, this will make a much bigger performance difference than > the language itself. If you must write something that creates a > new process, > my only recommendation would be to do it in a non-interpreted > language (i.e. > C, C++, etc...) to avoid the overhead of the interpreter. > > The nice thing about Java is that it's relatively simple to create a > multi-threaded daemon. > > --jeff > > - Original Message - > From: "tim leung" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, May 05, 2001 11:39 AM > 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/ > > >
Re: JAVA vs. PERL startup time + memory
Wouldn't it be easier to create a daemon of some sort that stays loaded and accepts requests, rather than creating a new process each time? Whether you use Java or Perl, this will make a much bigger performance difference than the language itself. If you must write something that creates a new process, my only recommendation would be to do it in a non-interpreted language (i.e. C, C++, etc...) to avoid the overhead of the interpreter. The nice thing about Java is that it's relatively simple to create a multi-threaded daemon. --jeff - Original Message - From: "tim leung" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 11:39 AM 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/ >
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/
JSP/ASP Coexistance
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
destroy/init sequence
Does the container maintain session state across a destroy/init sequence? If so is it up to each servlet to serialize or delete any objects stored in the session? For debugging, is it possible to control when the destroy method is called? Thanks, Mike __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
tomcat on IIS in-process
Hi I am trying to set up IIS to work with tomcat 3.2.0 using the jni_connect.dll, so that it can run in-process. But when I start the IIS, I get the following text in the stderr-log file from the JVM: 2001-05-05 05:57:52 - ContextManager: Adding context Ctx( /examples ) 2001-05-05 05:57:52 - ContextManager: Adding context Ctx( /admin ) 2001-05-05 05:57:53 - ContextManager: Adding context Ctx( ) 2001-05-05 05:57:53 - ContextManager: Adding context Ctx( /test ) Failed to loadLibrary() c:/jakarta-tomcat/bin/jni_connect.dll But in the stdout-log file everything looks fine: Starting up StartupThread Starting tomcat. Check logs/tomcat.log for error messages Library c:/jakarta-tomcat/bin/jni_connect.dll loaded Running ... End waiting Running fine I have followed the setup instructions for in-process exactly... any ideas? -thanks, Rasmus
Ajp13 with mod_jk and mod_jk-eapi
Hello, I hae an error, which will occure, when I refresh in the Web Client is too fast, Tomcat will throw an Error (or better mod_jk ?), which popup on stdout: -> java.net.SocketException: Datenübergabe unterbrochen (broken pipe): Datenübergabe unterbrochen (broken pipe) at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:86) at org.apache.tomcat.service.connector.TcpConnector.receiveFully(TcpConnector.java:150) at org.apache.tomcat.service.connector.TcpConnector.receive(TcpConnector.java:121) at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:146) 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) When I do the same procedure with the ajp12 Protocol no error will occurs, or better, it would be shown (?) Is there some Workaround, or a Fix ? I have tried this with the newest mod_jk-eapi.so (04/30) and an older one. Every time the same result. Greetings, and thanks for inconvenience, Michael --
Solved! (Was Re: Tomcat-MySQL connection problem)
Hi Wolle, hi Brahmanand, Thanks a lot for your tips, it works now. My weekend is saved :-)) I think it did not work the first time because I used the src package instead of the binary. have a nice weekend cu Angela
permission denied when running tomcat with apache
Title: permission denied when running tomcat with apache Hi guys, I like to run tomcat and apache together and let apache give all .jsp files to tomcat.So I installed both servers and in the httpd.conf I included the tomcat-apache.conf.Then I started tomcat and after that apache.Now I can reach apache under http://localhost and tomcat under http://localhost:8080 Both servers work fine, but when I execute .jsp files under apache, I become a 500 error which tells me that I do not have permissions to execute the file:When I try tomcat standalone like:http://localhost:8080/examples/hello.jsp it works fine,but I get the error when I try to run this under apache like:http://localhost/examples/hello.jsp Does anyone know, how to handle this? Best regardsTommi
please unsubscribe me
please unsubscribe me
Re: Tomcat-MySQL connection problem
How do you create an Instance of this driver ? Do you use the static call class.forName(driver) ? Try the extend it with class.ForName(driver).newInstance(), this must be done on some VM . Greetings, Michael Wolle wrote: > Hello, > try the mm.mysql-2.0.4-bin.jar file, not the source file. > > Greetings, > Michael > > Angela Stempfel wrote: > > > Brahmanand Gannur wrote: > > > > > put the mysql driver( .jar ) into the lib directory of the TOMCAT and > > > restart the tomcat > > > hope this helps > > > > I now copied the mm.mysql-2.0.4-src.jar to the lib directory of TOMCAT and > > restarted it. However, it did not help as well. Is there any way to debugg > > the problem to get more information where exactly it fails? > > > > thanks > > > > Angela
Re: Tomcat-MySQL connection problem
Hello, try the mm.mysql-2.0.4-bin.jar file, not the source file. Greetings, Michael Angela Stempfel wrote: > Brahmanand Gannur wrote: > > > put the mysql driver( .jar ) into the lib directory of the TOMCAT and > > restart the tomcat > > hope this helps > > I now copied the mm.mysql-2.0.4-src.jar to the lib directory of TOMCAT and > restarted it. However, it did not help as well. Is there any way to debugg > the problem to get more information where exactly it fails? > > thanks > > Angela
Re: Tomcat-MySQL connection problem
Brahmanand Gannur wrote: > put the mysql driver( .jar ) into the lib directory of the TOMCAT and > restart the tomcat > hope this helps I now copied the mm.mysql-2.0.4-src.jar to the lib directory of TOMCAT and restarted it. However, it did not help as well. Is there any way to debugg the problem to get more information where exactly it fails? thanks Angela
Re: Tomcat-MySQL connection problem
Hei, if this doesn't work. Put the .jar file in your TOMCAT/webapps/YOUR_APPL/WEB-INF/lib. When you put your .jar file in here, it's only accessible for this WEB-Application. When you put it in TOMCAT/lib it's accessible to all your Servlets/JSP. You could also put it into your JDK/jre/lib/ext directory, so it's available to all your Java Applicaitons. I have read something about putting the .jar file in /JDK could cause some errors. Greetings, Michael Brahmanand Gannur wrote: > put the mysql driver( .jar ) into the lib directory of the TOMCAT and > restart the tomcat > hope this helps > > -Original Message- > From: Angela Stempfel [mailto:[EMAIL PROTECTED]] > Sent: Saturday, May 05, 2001 6:06 PM > To: [EMAIL PROTECTED] > Subject: Tomcat-MySQL connection problem > > Hi all, > > The past hours I tried to set up Tomcat on my local Win2000 box. I've > installed the lastest MySQL package and also the latest Tomcat version I > got. > > After I've read the manual of the JDBC Driver I was able to set it up > that I can connect to MySQL with my short Java Class I wrote. This class > simply creates some tables in MySQL, so far so good. > Afterwards I tried to use exactly the same way of connecting to MySQL in > my JSP Files, again using Java to connect to MySQL. But it doesn't > matter how I try to do it, I always get the > "javax.servlet.ServletException: No suitable driver..." Exception. > > I connect like this: > >try > { > Class.forName("org.gjt.mm.mysql.Driver").newInstance(); > } > > catch(Exception e) > { > System.err.println("Unable to load driver."); > e.printStackTrace(); > } > > con = > DriverManager.getConnection("jdbc:mysql://localhost/horse"); > > As I said this *works* if I do that with a simple Java test-Class, but > not after I try to do it in Tomcat. Classpath should be correct, at > least I double checked it about 100 times. The Java files I use are in a > package, could that be a problem? The test files are not in the package > (to be honest, I don't really understand this package stuff :-) > > I've also tried to add the port (3306 which seems to be default port in > MySQL) after localhost but this doesn't help. Is there a way to check if > the port is really used in Windows? > > I'm really running out of ideas now, I checked all the information I > found, checked the web on other mailinglists (google rulez) and every > thing I tried did not help so far. So any suggestions are very welcome > :-) > > thanks in advance > > Angela
RE: Tomcat-MySQL connection problem
put the mysql driver( .jar ) into the lib directory of the TOMCAT and restart the tomcat hope this helps -Original Message- From: Angela Stempfel [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 05, 2001 6:06 PM To: [EMAIL PROTECTED] Subject: Tomcat-MySQL connection problem Hi all, The past hours I tried to set up Tomcat on my local Win2000 box. I've installed the lastest MySQL package and also the latest Tomcat version I got. After I've read the manual of the JDBC Driver I was able to set it up that I can connect to MySQL with my short Java Class I wrote. This class simply creates some tables in MySQL, so far so good. Afterwards I tried to use exactly the same way of connecting to MySQL in my JSP Files, again using Java to connect to MySQL. But it doesn't matter how I try to do it, I always get the "javax.servlet.ServletException: No suitable driver..." Exception. I connect like this: try { Class.forName("org.gjt.mm.mysql.Driver").newInstance(); } catch(Exception e) { System.err.println("Unable to load driver."); e.printStackTrace(); } con = DriverManager.getConnection("jdbc:mysql://localhost/horse"); As I said this *works* if I do that with a simple Java test-Class, but not after I try to do it in Tomcat. Classpath should be correct, at least I double checked it about 100 times. The Java files I use are in a package, could that be a problem? The test files are not in the package (to be honest, I don't really understand this package stuff :-) I've also tried to add the port (3306 which seems to be default port in MySQL) after localhost but this doesn't help. Is there a way to check if the port is really used in Windows? I'm really running out of ideas now, I checked all the information I found, checked the web on other mailinglists (google rulez) and every thing I tried did not help so far. So any suggestions are very welcome :-) thanks in advance Angela
Tomcat-MySQL connection problem
Hi all, The past hours I tried to set up Tomcat on my local Win2000 box. I've installed the lastest MySQL package and also the latest Tomcat version I got. After I've read the manual of the JDBC Driver I was able to set it up that I can connect to MySQL with my short Java Class I wrote. This class simply creates some tables in MySQL, so far so good. Afterwards I tried to use exactly the same way of connecting to MySQL in my JSP Files, again using Java to connect to MySQL. But it doesn't matter how I try to do it, I always get the "javax.servlet.ServletException: No suitable driver..." Exception. I connect like this: try { Class.forName("org.gjt.mm.mysql.Driver").newInstance(); } catch(Exception e) { System.err.println("Unable to load driver."); e.printStackTrace(); } con = DriverManager.getConnection("jdbc:mysql://localhost/horse"); As I said this *works* if I do that with a simple Java test-Class, but not after I try to do it in Tomcat. Classpath should be correct, at least I double checked it about 100 times. The Java files I use are in a package, could that be a problem? The test files are not in the package (to be honest, I don't really understand this package stuff :-) I've also tried to add the port (3306 which seems to be default port in MySQL) after localhost but this doesn't help. Is there a way to check if the port is really used in Windows? I'm really running out of ideas now, I checked all the information I found, checked the web on other mailinglists (google rulez) and every thing I tried did not help so far. So any suggestions are very welcome :-) thanks in advance Angela
Re: 2nd Posting: Context Logging with TC4b3
I'm so used to document lag (in other projects) that I went to the list after several days of problems which included 1 niightly build which I couldn't get to work. Last night I tried the 5/4 nightly build which is working. Thank You, Anthony On Saturday 05 May 2001 07:11, Jeff Turner wrote: > From RELEASE-NOTES-4.0-B4.txt: > > "Catalina: Restore recognition of , , and > elements nested inside a element in "conf/server.xml". They were > only being recognized inside a element." > > Ie, it's a (rather crucial) bug, fixed in CVS after b3 was released. > > For *everyone* running T4b3, the RELEASE-NOTES files are essential reading: > > http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat-4.0/RELEASE-NOTES >-4.0-B4.txt > > Thanks to Craig for keeping these docs reasonably up-to-date. > > --Jeff > > On Thu, May 03, 2001 at 09:06:03AM -0500, Anthony W. Marino wrote: > > (binary installation on RedHat 7 with kernel 2.42) > > > > I would expect that the following context settings, within server.xml, > > would give me log specific (ie; localhost_xyz_log) entries when > > servlets running in that particular context (/xyz) are run, but it > > doesn't: > > > > > > > >> prefix="localhost_xyz_log." suffix=".txt" > > timestamp="true"/> > > > > > > It seemed to work fine with TC4b1. Any suggestions? > > > > Thank You, > > Anthony > > > > ---
Re: Tomcat 4-beta 3: ready for prime time?
Take a look at the changes between 4.0b3 and the upcoming 4.0b4 before you make any choices. The logging bug in b3 is pretty annoying. http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat-4.0/RELEASE-NOTES-4.0-B4.txt 3.3 is nice, stable, starts/stops much faster than 4.0, but it's server.xml looks very archaic compared with 4.0's. --Jeff On Wed, May 02, 2001 at 09:57:31AM +0200, Peter Mutsaers wrote: > > Hello, > > A week ago I decided to switch from JRUN to Tomcat for my JSP/Servlet environment. >Naturally I started with the officially released version (3.2). > > But, especially in the JSP department I found some bugs and inconveniences, that >have been fixed in later releases (3.3-milestone-x, and also 4.0). > > Now I wonder, which version should I use in production? It is a stand-alone Tomcat >site for Intranet, so issues with the connectors to other webservers are not >important. > The site is low-volume (1 request per 10 seconds at prime time) but very important, >thus reliability/stability is vital. > > Obviously, although 3.2 is the official release, by browsing through the CVS logs it >looks like the unreleased newer versions are of higher quality. > > 3.3-milestone-2 doesn't seem to have much advantage compared to version 4.0-beta3, >since 4.0 seems closer to a real release (it has gone through 5 milestones already, >and now seems very close to the final release after some betas with relatively minor > changes and fixes). > > What do you advice? > > Peter Mutsaers >
Re: 2nd Posting: Context Logging with TC4b3
>From RELEASE-NOTES-4.0-B4.txt: "Catalina: Restore recognition of , , and elements nested inside a element in "conf/server.xml". They were only being recognized inside a element." Ie, it's a (rather crucial) bug, fixed in CVS after b3 was released. For *everyone* running T4b3, the RELEASE-NOTES files are essential reading: http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat-4.0/RELEASE-NOTES-4.0-B4.txt Thanks to Craig for keeping these docs reasonably up-to-date. --Jeff On Thu, May 03, 2001 at 09:06:03AM -0500, Anthony W. Marino wrote: > (binary installation on RedHat 7 with kernel 2.42) > > I would expect that the following context settings, within server.xml, would > give me log specific (ie; localhost_xyz_log) entries when servlets > running in that particular context (/xyz) are run, but it doesn't: > > > > prefix="localhost_xyz_log." suffix=".txt" timestamp="true"/> > > > > It seemed to work fine with TC4b1. Any suggestions? > > Thank You, > Anthony > > ---
RE: Tomcat/Xalan
Xerces is a parser and Xalan is for XML transformations that's the difference. The easier way to process XML content is to use an XML publishing framework. Cocoon is probably the best publishing framework around, you can get it from http://xml.apache.org/ needless to say it can be easily configured to work with your tomcat installation having tomcat serve the .jsp and servlets (and .html files if tomcat acting a standalone web server) and the cocoon handling the .xml files. You will have to configure your contexts in Tomcat to have this-it takes two steps copying a worker file from cocoon into your context's /WEB-INF directory then modifying your web.xml file of your context to forward .xml files to cocoon. As expected the cocoon-1.8.2 docs files provide excellent coverage on the same - refer to them first. Allan Kamau. --- Robert Petersen <[EMAIL PROTECTED]> wrote: > Just FYI - > Xerxes is a parser and Xalan is for XML > Transformations (XSLT), they do two > different things and both are from Apache. > > - Robert Petersen > http://www.orangefood.com > > -Original Message- > From: Noel E. Lecaros [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 04, 2001 12:39 PM > To: [EMAIL PROTECTED] > Subject: Re: Tomcat/Xalan > > > Hi, Dante > > Just a thought but have you tried using the Apache > Xerces parser? Hopefully > this parser provides better integration with Xalan. > > Hope this helps. > > Regards, > Noel Lecaros > > Dante le Poole wrote: > > > Hi, > > > > has anyone used the xalan-package in their > webapps? I am and it's going > troublesome. > > > > With tomcat 3.2.1 it originally kept giving a > NoSuchMethodError for the > method getNamespaceOfNode (in one of apache's > > xpath-classes). > > I solved that one by replacing the jaxp.jar in > tomcat's lib-dir with the > latest version and adding crimson.jar. > > > > Now tomcat has started hanging on me, refusing any > http-requests and > requiring several resets a day (see my post from > yesterday). > > I'm looking into upgrading to 3.2.2b4, but I'm > running into the exact same > problem with the NoSuchMethodError again, only this > time > > adding jaxp.jar and crimson.jar doesn't work! > > > > Now I'm stuck with two problems that have got me > baffled, and my boss > isn't amused about our site not functioning > correctly! Does > > anyone please have any ideas? > > > > Thanx, > > > > Dante le Poole > > __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Tomcat & IIS
Hi Willis and others installing tomcat and IIS You will need to configure IIS and install a filter that will forward requests to Tomcat. I don't remember the exact steps.The how to docs in Tomcat/docs directory provide detailed explanations on the same. Basically you will need to visit the tomcat download page, move into the win32/ directory and download files from there, you will end up using only one of the dlls included here. Extract the dll (from it's zip format) and copy it to a directory .. you will get more information from the docs. You will need to create a vitual directory in the site(s) you have created in your IIS. At the end. You should be able to run your .asp and .htm[l] files with IIS handling those and your servlets and .jsp files being handled by Tomcat. You can even access servlets in the contexts you've defined. Allan Kamau. --- Keith Willis <[EMAIL PROTECTED]> wrote: > I am trying to run Tomcat and IIS together. > > I would like to put ASP and JSP files in the same > directory. > > I tried changing the directory in IIS to point to > the Root directory of > Tomcat, but it would not run the JSP in that folder > then. > > Is there a way to do this? (Basically I want all my > files in the same set of > directories rather than ASP in one set and JSP in > another) > > Thanks, > > Keith > _ > Get your FREE download of MSN Explorer at > http://explorer.msn.com > __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/