Re: Use of return statement in servlet.
Thanks for the reply I want the browser to point to the query page if user did not provide enough data or an error happens like database connection is not available. I want user to re enter data or wait for some time . So I dont want to use requestDispatcher.forward() method or redirect to an error page. I want to know is there any problems in using the return statement in servlets/jsp. Antony Paul - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 12:00 PM Subject: Re: Use of return statement in servlet. Antony Paul wrote: Hi, If any one feel it off topic mark it as off topic. I want to exit from a servlet if no database connection is available. For this can I use a return statement in the beginning of a servlet. Will it cause any state problems. I dont like putting the code in an if block. There will be lots of if blocks. A servlet is a web application component. It is invoked when a web client makes a request. The client expects SOMETHING as a response from the server and, thus, from the servlet. So, quitting with no response is not a good practice. What you should do is display an error page. There are several ways you can do it, requestDispatcher.forward() or throw an exception and have custom error pages ready. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
-Message d'origine- De : Robert Charbonneau [mailto:[EMAIL PROTECTED] Envoyé : vendredi 31 octobre 2003 06:17 À : Tomcat Users Mailing List Objet : Opinions Does anyone have an opinion of Tomcat running in a very high traffic environment, let's say, 100K - 500K unique visits/day? I'm also wondering about the possibility of running a Tomcat server standalone as opposed to using mod_jk.so with Apache to mount webapps with. Would this be more stable, and is there any loss to me if I *don't* use Apache? I have several tomcat standalone applications with more than one connection per second. It works well. I had to be carefull with: o JITC bug in IBM 1.4.1 Jvm on hyperthreaded machines (SIG11) o Silly name lookup at IBM Jvm startup (it needs to know the name for all the interfaces up on the machine or it SIG11. Even if your tomcat has nothing to do with the interfaces, event if you need administrative unnamed (DNS, Hosts) interfaces). This does not happen with Sun Jvm. o Memory leaks (in java servlets or Jvm or both) o Tomcat 4.1.27 bug when running at the MaxConnector limit (workaroundable) Those applications are wap and web applications, mainly. Total traffic is about 30Mb/s (up to 40) all day. I am in the process of migrating to a LinuxVirtualServer architecture for load balancing and failover. It works well. I have to say that tomcat is not so easy to share between nodes. I had to do at least one modification to catalina.sh (introducing a CATALINA_LOGS). The CATALINA_BASE is shared netween nodes (via NFS) and I need one catalina.out for each node. So... Oh, and last but not least, I didn't find a privilege separation method in tomcat (like in apache or ssh or postfix, or...). Perhaps am I wrong, but, if you want tomcat to run in unpriviledge environment, you have to make it bind to a public port (say 8080). I use iptables to redirect connections from 80 to 8080: If you have only one tomcat running on the server, you can use: /sbin/iptables -t nat -A PREROUTING -i lo -p tcp --dport 80 -j REDIRECT --to-ports 8080 For more than one (one IP for one tomcat is required), you have to deal with DNAT: /sbin/iptables -t nat -A PREROUTING -d 1.2.3.4 -p tcp -m tcp --dport 80 -j DNAT --to-destination 1.2.3.4:8080 This way, you don't have to put any port number in URLs. Ho. I just see that it is all linux related... I don't have any experience in Windows. Sorry. In fact, with a minimal of Unix/Linux sysadmin knowledge, tomcat become spretty scalable. François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ERROR using the tomcat db connection pool against one SQL SERVER 200 database. Please help me
org.apache.commons.dbcp.DbcpException : java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL The URL is invalid. valuejdbc:microsoft:sqlserver://192.168.0.12:1433/Northwind/value Here is the URL On my servers, my devs are using: valuejdbc:microsoft:sqlserver://1.2.3.4:port;DatabaseName=DBP_toto /value Hope this helps - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions
François, Oh, and last but not least, I didn't find a privilege separation method in tomcat (like in apache or ssh or postfix, or...). Perhaps am I wrong, but, if you want tomcat to run in unpriviledge environment, you have to make it bind to a public port (say 8080). I use iptables to redirect connections from 80 to 8080: No, you're right. You can make Apache listen on port 80 while running as root because it'll change the process' ownership when it opens a new connection. There is no portable way of doing this in Java; therefore, you have to run Tomcat as root if you want to make it listen on port 80. Of course, that's a major security hole. I always front-end TC with Apache and use mod_proxy to achieve what you're doing with iptables. -Vincent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions
Vincent Aumont [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] François, Oh, and last but not least, I didn't find a privilege separation method in tomcat (like in apache or ssh or postfix, or...). Perhaps am I wrong, but, if you want tomcat to run in unpriviledge environment, you have to make it bind to a public port (say 8080). I use iptables to redirect connections from 80 to 8080: No, you're right. You can make Apache listen on port 80 while running as root because it'll change the process' ownership when it opens a new connection. There is no portable way of doing this in Java; therefore, you have to run Tomcat as root if you want to make it listen on port 80. Of course, that's a major security hole. I always front-end TC with Apache and use mod_proxy to achieve what you're doing with iptables. Right and wrong ;-). Tomcat 5 ships with the (source for) commons-daemon, which gives Tomcat this same capability on *nix boxes. Of course, commons-daemon works with Tomcat 4.1 and Tomcat 3.3 as well (as well as any other Java programs that need this feature). -Vincent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with JNDI Datasource HOW-TO MySQL Example
I'm new to Java but have installed Tomcat a couple of times, and am now trying to configure a JNDI datasource (to use with the OpenReports database reporting package - see http://sourceforge.net/projects/oreports for info on that). Before configuring a datasource for db reporting, I'm trying to set up the test datasource described on the JNDI Datasource HOW-TO at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html, under the section MySQL DBCP Example. I've edited the conf/server.xml and webapps/DBTest/WEB-INF/web.xml files as indicated in the HOW-TO. When deploying the code in this sample webapp with Tomcat 4.1.27, I either get a 404 or an error that includes the following: An error occurred at line: 6 in the jsp file: /test.jsp Generated servlet error: [javac] Compiling 1 source file /home/ddegraff/packages/openreports-tomcat/work/Standalone/localhost/DBTest/ test_jsp.java:48: package foo does not exist foo.DBTest tst = new foo.DBTest(); The above error occurs if the jsp file and class file are in the $CATALINA_HOME/webapps/DBTest directory together. If I put the compiled class file (DBTest.class) in webapps/DBTest/WEB-INF/classes, I get a 404 when trying to access the jsp. The jsp file and class file source is copied below. Any insight would be much appreciated. Best, Dave De Graff JSP file text: html head titleDB Test/title /head body % foo.DBTest tst = new foo.DBTest(); tst.init(); % h2Results/h2 Foo %= tst.getFoo() %br/ Bar %= tst.getBar() % /body /html -- DBTest.java file text: package foo; import javax.naming.*;import javax.sql.*;import java.sql.*; public class DBTest { String foo = Not Connected; int bar = -1; public void init() {try{ Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); if (ds != null) {Connection conn = ds.getConnection(); if(conn != null) {foo = Got Connection +conn.toString(); Statement stmt = conn.createStatement();ResultSet rst = stmt.executeQuery( select id, foo, bar from testdata); if(rst.next()) { foo=rst.getString(2); bar=rst.getInt(3);} conn.close();} }}catch(Exception e) { e.printStackTrace();} } public String getFoo() { return foo; } public int getBar() { return bar;}} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
No, you're right. You can make Apache listen on port 80 while running as root because it'll change the process' ownership when it opens a new connection. There is no portable way of doing this in Java; therefore, Hey! And they call it an advanced language? you have to run Tomcat as root if you want to make it listen on port 80. Of course, that's a major security hole. Not only, it also masks some bugs (like the JITC one for exemple). I always front-end TC with Apache and use mod_proxy to achieve what you're doing with iptables. Well, let me find iptables less resources consuming :). François. P.S.: One or two trolls are hiding in this message, please do NOT feed! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with JNDI Datasource HOW-TO MySQL Example
By the way, the Java source code I'm trying to deploy is formatted and indented just as it is on the HOW-TO page. It lost formatting in being posted to the list. Dave - Original Message - From: David De Graff [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 31, 2003 12:25 AM Subject: Problem with JNDI Datasource HOW-TO MySQL Example I'm new to Java but have installed Tomcat a couple of times, and am now trying to configure a JNDI datasource (to use with the OpenReports database reporting package - see http://sourceforge.net/projects/oreports for info on that). Before configuring a datasource for db reporting, I'm trying to set up the test datasource described on the JNDI Datasource HOW-TO at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html, under the section MySQL DBCP Example. I've edited the conf/server.xml and webapps/DBTest/WEB-INF/web.xml files as indicated in the HOW-TO. When deploying the code in this sample webapp with Tomcat 4.1.27, I either get a 404 or an error that includes the following: An error occurred at line: 6 in the jsp file: /test.jsp Generated servlet error: [javac] Compiling 1 source file /home/ddegraff/packages/openreports-tomcat/work/Standalone/localhost/DBTest/ test_jsp.java:48: package foo does not exist foo.DBTest tst = new foo.DBTest(); The above error occurs if the jsp file and class file are in the $CATALINA_HOME/webapps/DBTest directory together. If I put the compiled class file (DBTest.class) in webapps/DBTest/WEB-INF/classes, I get a 404 when trying to access the jsp. The jsp file and class file source is copied below. Any insight would be much appreciated. Best, Dave De Graff JSP file text: html head titleDB Test/title /head body % foo.DBTest tst = new foo.DBTest(); tst.init(); % h2Results/h2 Foo %= tst.getFoo() %br/ Bar %= tst.getBar() % /body /html -- DBTest.java file text: package foo; import javax.naming.*;import javax.sql.*;import java.sql.*; public class DBTest { String foo = Not Connected; int bar = -1; public void init() {try{ Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); if (ds != null) {Connection conn = ds.getConnection(); if(conn != null) {foo = Got Connection +conn.toString(); Statement stmt = conn.createStatement();ResultSet rst = stmt.executeQuery( select id, foo, bar from testdata); if(rst.next()) { foo=rst.getString(2); bar=rst.getInt(3);} conn.close();} }}catch(Exception e) { e.printStackTrace();} } public String getFoo() { return foo; } public int getBar() { return bar;}} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Right and wrong ;-). Tomcat 5 ships with the (source for) commons- daemon, which gives Tomcat this same capability on *nix boxes. Of course, commons-daemon works with Tomcat 4.1 and Tomcat 3.3 as well (as well as any other Java programs that need this feature). Oh. Could you please point us to a documentation. I think I NEED it. Thanks. François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Intermittent Performance Problems
Hi There, Change to either the 1.4.2 or 1.3.1 branch of Java. Pete -Original Message- From: icewind [mailto:[EMAIL PROTECTED] Sent: 30 October 2003 20:42 To: [EMAIL PROTECTED] Subject: Intermittent Performance Problems Hello, I'm having performance issues that are hard to pin down. Every so often, the site's performance will slow to an absolute crawl for some period of time, and the only solution is to restart tomcat or wait for the problem to fix itself, which it sometimes does. My cocoon app is hosted on tomcat version 4.1.18 running on SunOS 5.8 with specs as follows: /usr/local# prtconf -v System Configuration: Sun Microsystems sun4u Memory size: 1024 Megabytes System Peripherals (Software Nodes): SUNW,Ultra-250 snip -- gobs of peripheral stuff drivers /var/adm# psrinfo -v Status of processor 0 as of: 10/02/03 15:08:50 Processor has been on-line since 07/11/03 11:38:48. The sparcv9 processor operates at 400 MHz, and has a sparcv9 floating point processor. Status of processor 1 as of: 10/02/03 15:08:51 Processor has been on-line since 07/11/03 11:38:49. The sparcv9 processor operates at 400 MHz, and has a sparcv9 floating point processor. So, in summary, the machine is a dual ultrasparc, with 1GB ram. The JDK version is j2sdk1.4.1_01. The last time I noticed this performance problem, the following entries were in catalina_log: 2003-10-22 12:24:28 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError 2003-10-22 16:21:32 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError 2003-10-22 16:23:10 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError 2003-10-22 22:52:03 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.OutOfMemoryError During this time, I also get entries in localhost_log of the following form: 2003-10-22 16:15:50 StandardWrapperValve[5cam]: Servlet.service() for servlet 5cam threw exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707) at
Re: Problem with JNDI Datasource HOW-TO MySQL Example
simple suggestion. put the class file in webapps/DBTest/WEB-INF/classes/foo. Antony. Original Message - From: David De Graff [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 31, 2003 1:55 PM Subject: Problem with JNDI Datasource HOW-TO MySQL Example I'm new to Java but have installed Tomcat a couple of times, and am now trying to configure a JNDI datasource (to use with the OpenReports database reporting package - see http://sourceforge.net/projects/oreports for info on that). Before configuring a datasource for db reporting, I'm trying to set up the test datasource described on the JNDI Datasource HOW-TO at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html, under the section MySQL DBCP Example. I've edited the conf/server.xml and webapps/DBTest/WEB-INF/web.xml files as indicated in the HOW-TO. When deploying the code in this sample webapp with Tomcat 4.1.27, I either get a 404 or an error that includes the following: An error occurred at line: 6 in the jsp file: /test.jsp Generated servlet error: [javac] Compiling 1 source file /home/ddegraff/packages/openreports-tomcat/work/Standalone/localhost/DBTest/ test_jsp.java:48: package foo does not exist foo.DBTest tst = new foo.DBTest(); The above error occurs if the jsp file and class file are in the $CATALINA_HOME/webapps/DBTest directory together. If I put the compiled class file (DBTest.class) in webapps/DBTest/WEB-INF/classes, I get a 404 when trying to access the jsp. The jsp file and class file source is copied below. Any insight would be much appreciated. Best, Dave De Graff JSP file text: html head titleDB Test/title /head body % foo.DBTest tst = new foo.DBTest(); tst.init(); % h2Results/h2 Foo %= tst.getFoo() %br/ Bar %= tst.getBar() % /body /html -- DBTest.java file text: package foo; import javax.naming.*;import javax.sql.*;import java.sql.*; public class DBTest { String foo = Not Connected; int bar = -1; public void init() {try{ Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); if (ds != null) {Connection conn = ds.getConnection(); if(conn != null) {foo = Got Connection +conn.toString(); Statement stmt = conn.createStatement();ResultSet rst = stmt.executeQuery( select id, foo, bar from testdata); if(rst.next()) { foo=rst.getString(2); bar=rst.getInt(3);} conn.close();} }}catch(Exception e) { e.printStackTrace();} } public String getFoo() { return foo; } public int getBar() { return bar;}} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions
It's a little thin, but what there is is at http://jakarta.apache.org/commons/daemon/ Francois JEANMOUGIN [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Right and wrong ;-). Tomcat 5 ships with the (source for) commons- daemon, which gives Tomcat this same capability on *nix boxes. Of course, commons-daemon works with Tomcat 4.1 and Tomcat 3.3 as well (as well as any other Java programs that need this feature). Oh. Could you please point us to a documentation. I think I NEED it. Thanks. François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
It's a little thin, but what there is is at http://jakarta.apache.org/commons/daemon/ Hu! It's in early developments or is it suitable for production ? And, in a sysadmin point of view, what does that means: There two ways to use jsvc: via a Class that implements the Daemon interface or via calling a Class that have the required methods. For example Tomcat-4.1.x uses the Daemon interface and Tomcat-5.0.x provide a Class whose methods are called by jsvc directly.? The applications are located in CATALINA_BASE directory, I have a conf file with servers and connectors definitions. What should I do to use jsvc? As you said, it's a little thin. I feel that there is a lot of solutions to my problems, but... You can do Apache administration without knowing C or PHP or perl. But you can't do tomcat administration without knowing java. I feel it a week point of Jakarta (perhaps am I wrong, it's just a feeling). Anyway, I will switch to jsvc later. Sorry :). François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with JNDI Datasource HOW-TO MySQL Example
Excellent! That worked on the first try, and it turns out that the test JNDI datasource also works. It's strange that the need to put class files in a directory of their package name isn't mentioned in the O'Reilly Tomcat book (diagram on p. 71 shows class file in the WEB-INF/classes directory). Or maybe only some class files need to be in a package subdirectory? In any case, thanks much for the help! Dave - Original Message - From: Antony Paul [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 12:42 AM Subject: Re: Problem with JNDI Datasource HOW-TO MySQL Example simple suggestion. put the class file in webapps/DBTest/WEB-INF/classes/foo. Antony. Original Message - From: David De Graff [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 31, 2003 1:55 PM Subject: Problem with JNDI Datasource HOW-TO MySQL Example I'm new to Java but have installed Tomcat a couple of times, and am now trying to configure a JNDI datasource (to use with the OpenReports database reporting package - see http://sourceforge.net/projects/oreports for info on that). Before configuring a datasource for db reporting, I'm trying to set up the test datasource described on the JNDI Datasource HOW-TO at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html, under the section MySQL DBCP Example. I've edited the conf/server.xml and webapps/DBTest/WEB-INF/web.xml files as indicated in the HOW-TO. When deploying the code in this sample webapp with Tomcat 4.1.27, I either get a 404 or an error that includes the following: An error occurred at line: 6 in the jsp file: /test.jsp Generated servlet error: [javac] Compiling 1 source file /home/ddegraff/packages/openreports-tomcat/work/Standalone/localhost/DBTest/ test_jsp.java:48: package foo does not exist foo.DBTest tst = new foo.DBTest(); The above error occurs if the jsp file and class file are in the $CATALINA_HOME/webapps/DBTest directory together. If I put the compiled class file (DBTest.class) in webapps/DBTest/WEB-INF/classes, I get a 404 when trying to access the jsp. The jsp file and class file source is copied below. Any insight would be much appreciated. Best, Dave De Graff JSP file text: html head titleDB Test/title /head body % foo.DBTest tst = new foo.DBTest(); tst.init(); % h2Results/h2 Foo %= tst.getFoo() %br/ Bar %= tst.getBar() % /body /html -- DBTest.java file text: package foo; import javax.naming.*;import javax.sql.*;import java.sql.*; public class DBTest { String foo = Not Connected; int bar = -1; public void init() {try{ Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); if (ds != null) {Connection conn = ds.getConnection(); if(conn != null) {foo = Got Connection +conn.toString(); Statement stmt = conn.createStatement();ResultSet rst = stmt.executeQuery( select id, foo, bar from testdata); if(rst.next()) { foo=rst.getString(2); bar=rst.getInt(3);} conn.close();} }}catch(Exception e) { e.printStackTrace();} } public String getFoo() { return foo; } public int getBar() { return bar;}} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xhtml and Internet Explorer
Marius, I think such a feature request should not be addressed to Tomcat, but to the JSP specification itself. Remember that Tomcat is being used as the reference implementation of servlet/JSP technologies, and so it should stick to the specification. Basically, as I see it, your request means a special treatment for a subset of directives in a few specific cases. I think it would imply that tags could be marked as not generating any output, so when in a single JSP line there were only such marked tags and leading / trailing spaces among them, the line itself could be omited from the output. Such a change should be made from the specification. Regards, Rodrigo Marius Scurtescu wrote: JSP is a templating language which is using a meta language: the JSP constructs. The new line is in the JSP indeed, but is it part of the meta language or part of the literal output? I would argue that these new lines are part of the meta language and that they should not be output. You put them there so the meta language you use is readable. See how FreeMarker, another templating language, is dealing with this issue: http://freemarker.sourceforge.net/docs/dgui_misc_whitespace.html#dgui_misc_whitespace_stripping You are not asking the directive to scan anything, the page compiler could consider white space and newlines after a directive as part of that directive. Marius Adam Hardy wrote: On 10/30/2003 10:08 PM Marius Scurtescu wrote: I will consider implementing a filter to remove the empty lines before the html tag. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use of return statement in servlet.
Anthony, putting a return in a servlet code will not create any state problem for the servlet itself. You could have problems if you have opened resources that need finalization or closing before returning, for example DB connections, or opened streams others than the servlet input and ouput ones, but that depends on the code, and it is independent from the servlet engine. Of course, if you do not redirect to anywhere, or display nothing, what you will get in the browser is a neat clean blank page ;-) I am not sure at all, but I think JSPs could be different, depending on the compiler implementation. I think Jasper generated code does not have problems with return statements, but I check it with every new release I download, just in the case ;-) What I do is to create a simplest JSP: !-- JSP beginning -- Hello World !-- JSP end -- And compile it. Then, looking at the generated servlet code, I check that no resource-freeing operations are done after writing Hello Worl to the output stream. The moment this happens, the moment I will have a lot of problems :-P Hope it helps you, Rodrigo Antony Paul wrote: Thanks for the reply I want the browser to point to the query page if user did not provide enough data or an error happens like database connection is not available. I want user to re enter data or wait for some time . So I dont want to use requestDispatcher.forward() method or redirect to an error page. I want to know is there any problems in using the return statement in servlets/jsp. Antony Paul - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 12:00 PM Subject: Re: Use of return statement in servlet. Antony Paul wrote: Hi, If any one feel it off topic mark it as off topic. I want to exit from a servlet if no database connection is available. For this can I use a return statement in the beginning of a servlet. Will it cause any state problems. I dont like putting the code in an if block. There will be lots of if blocks. A servlet is a web application component. It is invoked when a web client makes a request. The client expects SOMETHING as a response from the server and, thus, from the servlet. So, quitting with no response is not a good practice. What you should do is display an error page. There are several ways you can do it, requestDispatcher.forward() or throw an exception and have custom error pages ready. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions
Hi It's a little thin, but what there is is at http://jakarta.apache.org/commons/daemon/ You can do Apache administration without knowing C or PHP or perl. But you can't do tomcat administration without knowing java. I feel it a week point of Jakarta (perhaps am I wrong, it's just a feeling). but you can do tomcat administration without knowing bash and vi , if you use the manager admin interfaces. yes, you lack quite some features if you stick to those. but just imagine the features you lack by not knowing java. I don't think anyone will dare to rewrite the C code of apache to change its behaviour. I feel it's a week point of apache :-) it's a choice. I think historically tomcat was developed to give some backbone to programmers writing applications build on the HttpServlet interface. As a plain webserver, you still need a programmer to set it up correctly, but a monkey can manage it once it's running. whatever, *-pike = Microsoft: HOWTO: Read the Fucking Manual This article demonstrates how to read the fucking manual http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions
Also, depending on the amout of static content in your webapps, having an Apache as the front-end can perform better than a standalone tomcat. But this depends on numbers you have to get by yourself. Experimenting uses to be the best way ;-) Rodrigo Vincent Aumont wrote: François, Oh, and last but not least, I didn't find a privilege separation method in tomcat (like in apache or ssh or postfix, or...). Perhaps am I wrong, but, if you want tomcat to run in unpriviledge environment, you have to make it bind to a public port (say 8080). I use iptables to redirect connections from 80 to 8080: No, you're right. You can make Apache listen on port 80 while running as root because it'll change the process' ownership when it opens a new connection. There is no portable way of doing this in Java; therefore, you have to run Tomcat as root if you want to make it listen on port 80. Of course, that's a major security hole. I always front-end TC with Apache and use mod_proxy to achieve what you're doing with iptables. -Vincent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
yes, you lack quite some features if you stick to those. but just imagine the features you lack by not knowing java. I don't think anyone will dare to rewrite the C code of apache to change its behaviour. I feel it's a week point of apache :-) Well, I think I'm a shameless troller. Anyway, my feeling is just documentation related. I think you can administrate tomcat the way you administrate any other Unix service as a Unix bofh, and, in fact, I do. But the documentations are not so sysadmin oriented. Okay, perhaps will I have to find time to write some :). If I can I will do. As a monkey (for a programming point of view), I would never advocate about the choice of a programming language (or just for plain trolling). François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use of return statement in servlet.
Thaks for the extra information. I am using response.sendRedirect(). That is why I want to get out of the servlet and go to the target page. Antony - Original Message - From: Rodrigo Ruiz [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:51 PM Subject: Re: Use of return statement in servlet. Anthony, putting a return in a servlet code will not create any state problem for the servlet itself. You could have problems if you have opened resources that need finalization or closing before returning, for example DB connections, or opened streams others than the servlet input and ouput ones, but that depends on the code, and it is independent from the servlet engine. Of course, if you do not redirect to anywhere, or display nothing, what you will get in the browser is a neat clean blank page ;-) I am not sure at all, but I think JSPs could be different, depending on the compiler implementation. I think Jasper generated code does not have problems with return statements, but I check it with every new release I download, just in the case ;-) What I do is to create a simplest JSP: !-- JSP beginning -- Hello World !-- JSP end -- And compile it. Then, looking at the generated servlet code, I check that no resource-freeing operations are done after writing Hello Worl to the output stream. The moment this happens, the moment I will have a lot of problems :-P Hope it helps you, Rodrigo Antony Paul wrote: Thanks for the reply I want the browser to point to the query page if user did not provide enough data or an error happens like database connection is not available. I want user to re enter data or wait for some time . So I dont want to use requestDispatcher.forward() method or redirect to an error page. I want to know is there any problems in using the return statement in servlets/jsp. Antony Paul - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 12:00 PM Subject: Re: Use of return statement in servlet. Antony Paul wrote: Hi, If any one feel it off topic mark it as off topic. I want to exit from a servlet if no database connection is available. For this can I use a return statement in the beginning of a servlet. Will it cause any state problems. I dont like putting the code in an if block. There will be lots of if blocks. A servlet is a web application component. It is invoked when a web client makes a request. The client expects SOMETHING as a response from the server and, thus, from the servlet. So, quitting with no response is not a good practice. What you should do is display an error page. There are several ways you can do it, requestDispatcher.forward() or throw an exception and have custom error pages ready. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.0.6 stall on manager - reload application
I use Tomcat 4.0.6 installed on Redhat 8.0 (psyche) , I have an application that it seems that has some problems when I try to reload it from manager app - the application STALLS, but the rest of tomcat applications are running well. As a notice, I dont use any persistence for the sessions. Does anybody have some ideas what can be the cause?
Re: Problem with JNDI Datasource HOW-TO MySQL Example
Every java class file must be put in their respective directories as declared in the package declaration. One more thing never put class files in web-inf\classes outside package. Tomcat cannot import such files. Antony - Original Message - From: David De Graff [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:24 PM Subject: Re: Problem with JNDI Datasource HOW-TO MySQL Example Excellent! That worked on the first try, and it turns out that the test JNDI datasource also works. It's strange that the need to put class files in a directory of their package name isn't mentioned in the O'Reilly Tomcat book (diagram on p. 71 shows class file in the WEB-INF/classes directory). Or maybe only some class files need to be in a package subdirectory? In any case, thanks much for the help! Dave - Original Message - From: Antony Paul [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, October 31, 2003 12:42 AM Subject: Re: Problem with JNDI Datasource HOW-TO MySQL Example simple suggestion. put the class file in webapps/DBTest/WEB-INF/classes/foo. Antony. Original Message - From: David De Graff [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 31, 2003 1:55 PM Subject: Problem with JNDI Datasource HOW-TO MySQL Example I'm new to Java but have installed Tomcat a couple of times, and am now trying to configure a JNDI datasource (to use with the OpenReports database reporting package - see http://sourceforge.net/projects/oreports for info on that). Before configuring a datasource for db reporting, I'm trying to set up the test datasource described on the JNDI Datasource HOW-TO at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html, under the section MySQL DBCP Example. I've edited the conf/server.xml and webapps/DBTest/WEB-INF/web.xml files as indicated in the HOW-TO. When deploying the code in this sample webapp with Tomcat 4.1.27, I either get a 404 or an error that includes the following: An error occurred at line: 6 in the jsp file: /test.jsp Generated servlet error: [javac] Compiling 1 source file /home/ddegraff/packages/openreports-tomcat/work/Standalone/localhost/DBTest/ test_jsp.java:48: package foo does not exist foo.DBTest tst = new foo.DBTest(); The above error occurs if the jsp file and class file are in the $CATALINA_HOME/webapps/DBTest directory together. If I put the compiled class file (DBTest.class) in webapps/DBTest/WEB-INF/classes, I get a 404 when trying to access the jsp. The jsp file and class file source is copied below. Any insight would be much appreciated. Best, Dave De Graff JSP file text: html head titleDB Test/title /head body % foo.DBTest tst = new foo.DBTest(); tst.init(); % h2Results/h2 Foo %= tst.getFoo() %br/ Bar %= tst.getBar() % /body /html -- DBTest.java file text: package foo; import javax.naming.*;import javax.sql.*;import java.sql.*; public class DBTest { String foo = Not Connected; int bar = -1; public void init() {try{ Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup( java:comp/env/jdbc/TestDB); if (ds != null) {Connection conn = ds.getConnection(); if(conn != null) {foo = Got Connection +conn.toString(); Statement stmt = conn.createStatement();ResultSet rst = stmt.executeQuery( select id, foo, bar from testdata); if(rst.next()) { foo=rst.getString(2); bar=rst.getInt(3);} conn.close();} }}catch(Exception e) { e.printStackTrace();} } public String getFoo() { return foo; } public int getBar() { return bar;}} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk or jk2
Dean- thanks for sharing your material on your tested setup here. I wonder if you've got a distinct idea of how the syntax workers2.properties works. This is actually my single most pressing problem. There is this section like thing: [foo:bar] What does it mean? Is it a [type:instance] - eg. [uri:/context/*] scheme, perhaps? This might make sense. Then this [type:] - eg. [config:] could be a class or singleton-like thing. And then, the properties. Do they always refer to the preceding square-bracketed item? [type:obj] property1=value1 property2=value2 What is the group syntax like? Is a group something I define with the [lb:some_lb_name] statement? Do I need a shared memory file under all circumstances, or is it neccessary only when I have several tomcats? -Florian Dean Searle wrote: The Oreilly book is only for Tomcat and Tomcat as a Standalone web/application server. I have spent six months trying to figure out how everything works together and how to get things implemented. Both from FreeBSD and Windows. I do have documentation on how to get Apache2, Tomcat 4.1 and mod_jk2 to work together. Please keep in mind that this is old documentation that I have out there, some things are not optimized yet. I have just reconfigured my Apache2, Tomcat 4.1 and mod_jk2 installation. I currently have a test environment where I am running two instances of Apache2 from one binary install and three instances of Tomcat from one binary install. Each one running different configuration from straight static site to jsp site and jsp with SSL or Realm security with AD LDAP. But all using mod_jk2 when needed. I will provide a link to my old documentation to get you started. I will try and answer any other questions also. I am not an expert here though, just some things I have figured out from reading numerous posts here and from other sites. I will repost an updated documentation as soon as all my testing is done. http://www.computingoasis.com/apache download the PDF please. -Dean -Original Message- From: Florian Ebeling [mailto:[EMAIL PROTECTED] Sent: Thu 10/30/2003 09:42 To: Tomcat Users List Cc: Subject:Re: jk or jk2 Hi Bernhard, Here's a great book including mod_jk2: http://www.oreilly.de/catalog/tomcat/index.html I got this book right next to my laptop, and I also like it quite much. But I can't find it useful when it comes to using mod_jk2. It don't really understand the contents of workers2.perperties. And they show only an example of this file in their book. To give you an example: [config:] File=/usr/local/apache2/config/workers2.properties debug=0 debugEnv=0 I guess here they define some config instance. Ok. But where is the point in giving the path to a config file *in exactly this config file*?! No idea. Or, another example: [uri:/examples] info=Examples ... context=/examples worker=ajp13:localhost:8009 debug=0 This yields a deprecation warning in my apache2 error.log: [Thu Oct 30 13:13:48 2003] [notice] uriEnv.setAttribute() the worker directive is deprecated. Use 'group' instead. What is a group? I guess this could be a node group for load balancing purposes. But I don't know. And the books won't say, neither the ORA nor the Wrox one. I'm pretty stuck. Sorry, I'm upset. Thanks for your hint, anyway. -Florian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Basci Authentication... Please help me...
Dear friends, I have a problem that I can't solve. I'm trying to use BASIC authentication in TOMCAT 4.0.5 for a web application and its web.xml file is: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app security-constraint web-resource-collection web-resource-nameArea protetta/web-resource-name url-pattern/index.html/url-pattern /web-resource-collection auth-constraint role-nametomcat/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameBASIC AUTHENTICATION AREA/realm-name /login-config /web-app But when I call index.html page no authentication form is displayed! (index.html exists on both the applications). I tried it on a server with Tomcat 4.0.6 and everything goes well. So I tried to use, on TOMCAT 4.0.5, the same web.xml also for the ROOT application (that comes with TOMCAT) and everything goes well. On your opinion, why the authentication doesn't run on my application? Please, help me! I thank you in advance! Riccardo (Italy) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ssl problem with Tomcat 4.1.27
Hi I'm using the following connector definition in 4.1.27. Same works well in 4.1.24. Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8443" minProcessors="5" maxProcessors="75" enableLookups="true" acceptCount="100" debug="0" scheme="https" secure="true" useURIValidationHack="false" disableUploadTimeout="true" Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory" keystoreFile="keystore_location_which_is_generated_from_keytool" keystorePass="changeit" clientAuth="false" protocol="TLS" / /Connector Could you provide some leads? thanks, Naresh -Original Message-From: Yuriy Stul [mailto:[EMAIL PROTECTED]Sent: Wednesday, October 29, 2003 6:28 PMTo: Agarwal, NareshCc: [EMAIL PROTECTED]Subject: RE: ssl problem with Tomcat 4.1.27 Noproblem with SLL in 4.1.27 version, we use 4.1.27 version and SSL. -Original Message-From: Agarwal, Naresh [mailto:[EMAIL PROTECTED]Sent: Tuesday, October 28, 2003 5:11 PMTo: [EMAIL PROTECTED]Subject: ssl problem with Tomcat 4.1.27 Hi I successfully configured Tomcat 4.1.24 (using JDK 1.3) for SSL using keystore generated by keytool and used my webapp over HTTPS. However, when I did the same for Tomcat 4.1.27, I couldaccess my webapp over HTTPSonly twice, but after this, I'm getting the following error: [ERROR] Http11Protocol - -Error reading request, ignored org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.SimpleLog does not implement Logorg.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.SimpleLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395) at org.apache.tomcat.util.net.jsse.JSSESupport.init(JSSESupport.java:87) at org.apache.tomcat.util.net.jsse.JSSE13Factory.getSSLSupport(JSSE13Factory.java:84) at org.apache.tomcat.util.net.jsse.JSSEImplementation.getSSLSupport(JSSEImplementation.java:118) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:385) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:479) Is there any problem with 4.1.27 version? thanks, Naresh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connecting Apache 2.0.47 to Tomcat 4.0.6
Apache 2.0.47 will work with either mod_jk or mod_jk2. Subir -Original Message- From: Asif Chowdhary [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 8:04 AM To: Tomcat Users List Subject: RE: Connecting Apache 2.0.47 to Tomcat 4.0.6 Yes, that's what I have read in the Tomcat Definitive Guide from OReilly. You can give it a try but I think you will run into problems. My email from yesterday has instructions on how to make it work with mod_jk2. Bye -Original Message- From: Ahmad, Kashif [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 10:59 AM To: 'Tomcat Users List' Subject: RE: Connecting Apache 2.0.47 to Tomcat 4.0.6 Sorry, are you saying the Apache 2.0.47 works with mod_jk2 only? Because I know the instructions as provided work for Apache 2.0.43 and mod_jk1.2. Seems like you are saying that 2.0.x doesn't work with 1.2 at all. Just clarifying. Thanks ;-) Kashif -Original Message- From: Asif Chowdhary [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 10:50 AM To: Tomcat Users List Subject: RE: Connecting Apache 2.0.47 to Tomcat 4.0.6 I think Apache 2.0 works with mod_jk2. and the configuration is very different from mod_jk1.2. The directives such as JkWorkersFile JKMount dont work with mod_jk2. -Original Message- From: Ahmad, Kashif [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 10:42 AM To: '[EMAIL PROTECTED]' Subject: Connecting Apache 2.0.47 to Tomcat 4.0.6 Hi All: I have a question and hope someone can answer it. I have a client that is trying to install Apache 2.0.47 with Tomcat 4.0.6. The application he is trying to run comes with instructions on how to configure Apache 2.0.43 with Tomcat 4.0.4 with mod_jk_1.2. Do the same instructions apply to with the Apache 2.0.47 with Tomcat 4.0.6? I've been able to get him so far to the point where he can access the application on the Tomcat internal HTTP on the default port 8080. However, when he connects with Apache on port 80, he gets a mis-configuration error. Here are the instructions as provided for the application for configuring Apache 2.0.43 and Tomcat 4.0.4 *Start Configuration Instruction* 4.2.2 Configure the Apache HTTP Server for Teams Add the following lines at the end of httpd.conf in /opt/apache/conf: # # Configure mod_jk # LoadModule jk_module /opt/apache/modules/mod_jk.so JkWorkersFile /opt/tomcat/conf/jk/workers.properties JkLogFile /opt/tomcat/logs/mod_jk.log JkLogLevel error Alias /teams /opt/tomcat/webapps/teams JkMount /teams/*.do ajp13 JkMount /teams/*.jsp ajp13 Alias /teamsadmin /opt/tomcat/webapps/teamsadmin JkMount /teamsadmin/*.do ajp13 JkMount /teamsadmin/*.jsp ajp13 4.2.3 Configure Tomcat for TEAMS 4.2.3.1 Set Up Environment Variables * Set JAVA_HOME to the JDK or JRE installation directory. * Set TOMCAT_HOME to the Tomcat installation directory, e.g., /opt/tomcat. 4.2.3.2 Modify the Tomcat Startup Script 1. Add the following configuration information near the top of the file $TOMCAT_HOME/bin/catalina.sh right after the comment section. Note that it must be added as one line. Also, when copying from text editors, ensure that there are no hard returns in the entry between JAVA_OPTS= and DORBagentPort settings. # Define JAVA_OPTS JAVA_OPTS=-Xbootclasspath/p:/opt/teams/jars/vbjapp.jar:/ opt/teams/jars/vbjorb.jar:/opt/teams/jars/swingall.jar -Xss2m -Xmx128m -Dfile.encoding=ISO8859_1 -Djava.compiler=NONE -DSERVLET=true -DTEAMS_HOME=/opt/teams -DLOG_FILE=/opt/tomcat/logs/teams.log -DTEAMS_DEBUG_LEVEL=6 -DORBagentPort=15000 2. Also in the $TOMCAT_HOME/bin/catalina.sh file, append the following jar files to the second CLASSPATH setting: a. If you are using JRE 1.3, add: b. If you are using JDK 1.3 (see following example), add: CLASSPATH=$CLASSPATH:/opt/teams/jars/tools.jar:$ORACLE_HOME/jdbc/lib/ classes12.zip CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib/classes12.zip 4.2.3.3 Create AJP Connecter Workers File Create a file /opt/tomcat/conf/jk/workers.properties with the following content (note that the value of worker.ajp13.port is an example): The AJP Connector Port (5044) must also be put into the server.xml file, located in the$TOMCAT_HOME/conf directory, in the section called Define an AJP 1.3 Connector. # Setup for Solaris system # workers.tomcat_home=/opt/tomcat/ workers.java_home=/opt/jdk1.3.1 ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=5044 worker.ajp13.host=localhost worker.ajp13.type=ajp13 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
RE: Java/JSP/Servlet Programmer
I personally do not care much if the person I interview knows about such or such latest api. Rejecting a person because he/she gets stuck on a technical question is no relevant. You have to look at learning, abstraction, adaptation, communication abilities. You have probably already rejected great potential contributors. Hiring someone just because of a particular technical knowledge is asking for troubles. Once I had a developer who knew Java much better than anybody else in the team. The problem is that he could not understand where we wanted to go because he was just looking at the technology. His contributions ended up being less than the not-so-skilled java developers. Another time I gave the chance to a young guy out of high school. He knew about nothing about programming languages but he strucked me as a problem solver. After one month in the team he knew more that the senior developers about the project and even if he did not know about the lastest tech issues, he solved the different problems you have in daily IT work in a more efficient manner. Finally, even though I use JSP, I have the tendency of building frameworks asap to focus on real business issues. I will probably fail your tests although I built a framework on top of Tomcat to help my web developer focus on the customer issues. Of course, if you are trying to build technology such as a JSP and/or a J2EE, you do need deeper tech knowledge. Still I will argue that solving problems is more important than narrow tech knowledge. Thierry -Original Message- From: Ruben Gamez [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 3:34 PM To: Tomcat Users List Subject: RE: Java/JSP/Servlet Programmer Like I said, I'm not looking for a specific answer - just give me a smart answer! -Original Message- From: Hart, Justin [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:31 PM To: Tomcat Users List Subject: RE: Java/JSP/Servlet Programmer I heartilly disagree. You posted to a mailing list specifically about this topic, and got 5 different answers. -Original Message- From: Ruben Gamez [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:24 PM To: Tomcat Users List Subject: RE: Java/JSP/Servlet Programmer I don't want a programmer that wouldn't know that. If you've spent ANY amount of time writing Servlets, you SHOULD know doGet and doPost. That is very basic. -Original Message- From: Hart, Justin [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:21 PM To: Tomcat Users List Subject: RE: Java/JSP/Servlet Programmer It's not that it's difficult, but I wouldn't ask questions about specific functions/parameters/methods. I have written plenty of java, and couldn't tell you what methods most specific interfaces implement. I couldn't even tell you what methods the interfaces that I've written implement. Instead, I would look for conceptual knowledge. I think that just about anybody can spit up wrote knowledge like that after an hour of studying and not know how to implement a thing, but most people who understand the actual concepts couldn't tell you what methods or how many methods, or what their parameters are. Just my $.02. -Original Message- From: Ruben Gamez [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:17 PM To: Tomcat Users List Subject: RE: Java/JSP/Servlet Programmer Does anyone else think that what I'm asking for is so difficult? -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:54 PM To: Tomcat Users List Subject: RE: Java/JSP/Servlet Programmer On Fri, October 17, 2003 at 1:27 pm, Ruben Gamez sent the following The first is a written test which has J2SE, Servlet, and JSP questions. The second is a programming test, they must write a JSP page that form posts to a Servlet, that retrieves ANYTHING from a Bean and outputs it in the Servlet. I have a lab computer set up with everything except the code. They must also use notepad to do this. Wow, sounds like entry level coding to me! And you're having trouble getting people to pass these things? -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
where should i store a attribute
Hello folks, i´m trying to store a database connection in a session attribute or request attribute, but i must choose a name that just one thread per time would knowns. Any idea? Regards, Edson
Re: where should i store a attribute
Hi, I´m not sure if I understand your question, but hey, I´ll give it a shot: To get a unique name: String uniqueName = String.valueOf(System.currentTimeMillis()); This will give you unique name. Check out the jdk-javadoc for an explanation of this method. BR, Denny Edson Alves Pereira [EMAIL PROTECTED] 2003-10-31 10:08 Please respond to Tomcat Users List To: 'Tomcat-User List' [EMAIL PROTECTED] cc: Subject:where should i store a attribute Hello folks, i´m trying to store a database connection in a session attribute or request attribute, but i must choose a name that just one thread per time would knowns. Any idea? Regards, Edson
Which version of xerces, Tomcat 4.1.24 is using?
Hi Which version of xerces Tomcat 4.1.24 is using? I could not find out information in the manifest files of xerces jars, used by Tomcat 4.1.27. thanks, Naresh - Do you Yahoo!? Exclusive Video Premiere - Britney Spears
Debug Help with Apache Tomcat, on WinXP
Hey All I have both Apache 2.047 and Tomcat 4.1.27 configured on my XP machine as a localhost service using jk2 configs. I followed the directions on the following page: http://www.greenfieldresearch.ca/technical/jk2_config.html The two services work individually, all configs are done, but the two servers just don't tie together. My thought is that there is a problem with the way I put together the shm file. In my error.log, Apache is crapping on the shm.create() call: [Thu Oct 30 20:17:38 2003] [error] shm.init(): No file But the file is there, I'm not sure how to make it readable/writable to the service if that's the problem. Any help someone could give would be greatly appreciated, THANKS! Below here are my configs: My jk2.properties on Tomcat is a single line: #Shared memory directive shm.file=c:/Apache/Apache2/logs/jk2.shm My workers2.properties with Apache looks like the following: - #define the shared memory file [shm] file=c:/Apache/Apache2/logs/jk2.shm size=100 # Define the communication channel [channel.socket:localhost:8009] port=8009 #host=127.0.0.1 tomcatId=localhost:8009 debug=1 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] info=C:/Apache/Tomcat/webapps/examples/ [uri:/servlet/*] info=C:/Apache/Tomcat/webapps/ [status:status] info=Status worker, displays runtime information channel=channel.socket:localhost:8009 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: worker=status:status [uri:/status/*] worker=status:localhost:8009 group=status: For reference, I uploaded the bigger docs: servers.xml: http://torgler.net/docs/server.xml workers2.properties: http://torgler.net/docs/workers2.properties httpd.conf: http://torgler.net/docs/httpd.conf Also, not sure if these would help or not, the stderr.log outs from the Tomcat startup, which looked fine to me Created catalinaLoader in: C:\Apache\Tomcat\server\lib Oct 30, 2003 8:17:32 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Oct 30, 2003 8:17:32 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Oct 30, 2003 8:17:33 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Oct 30, 2003 8:17:35 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8009 Oct 30, 2003 8:17:39 PM org.apache.struts.util.PropertyMessageResources lt;initgt; INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Oct 30, 2003 8:17:39 PM org.apache.struts.util.PropertyMessageResources lt;initgt; INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Oct 30, 2003 8:17:40 PM org.apache.struts.util.PropertyMessageResources lt;initgt; INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Oct 30, 2003 8:17:45 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8009/font/p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where should i store a attribute
Edson Alves Pereira wrote: Hello folks, i´m trying to store a database connection in a session attribute or request attribute, but i must choose a name that just one thread per time would knowns. Any idea? If you put the attribute in your request, the name does not matter: only forwarded or included servlets / JSPs will have access to the object, even if the same name is always used. If you want each request to use a different instance of an object, request attributes are the correct place. Session attributes are best fitted for instances that must be shared among multiple requests from the same user (well, exactly from the same user session ;-). Anyway, consider also to execute your DB queries internally and put as attribute the results instead of the connection. It is usually better :-) Regards, Edson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom web app classloader
Jwahar Bammi wrote: Thanks for your quick reply glenn, I was thinking the same way. Please could you confirm the mechanics of hooking the classloader into Tomcat - once I write the class, I tell tomcat to use it by specifying it in the Loader tag of a Context in server.xml Yes. The next releases of Tomcat 4.1 and 5 will also allow a Loader to be nested inside the DefaultContext. - my class itself goes into $CATALINA_HOME/server/lib Yes, or in $CATALINA_HOME/common/lib the docs don't make it clear what the mechanics should be thanks again bammi -Original Message- From: Glenn Nielsen [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 10:20 PM To: Tomcat Users List Subject: Re: custom web app classloader I have done this but I started by extending org.apache.catalina.loader.WebappLoader, then overriding anything I needed to customize. Regards, Glenn Jwahar Bammi wrote: I want to write my own custom web application class loader, for Tomcat 4.1* (and hopefully it will continue to work for Tomcat 5*). From the precious little info that is available, I have gleaned the following: - the class I write should implement org.apache.catalina.Loader interface. - once I write the class, I tell tomcat to use it by specifying it in the Loader tag of a Context in server.xml - my class itself goes into $CATALINA_HOME/server/lib Are my assumptions above correct? It would be a real bonus to see an example. I am sure more than one person in this community has done this before. Any words of advice? Advanced Thanks, Jwahar Bammi Memento, Inc. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where should i store a attribute
Denny, Hello folks, i´m trying to store a database connection in a session attribute or request attribute, but i must choose a name that just one thread per time would knowns. Any idea? I´m not sure if I understand your question, but hey, I´ll give it a shot: To get a unique name: String uniqueName = String.valueOf(System.currentTimeMillis()); This will give you unique name. Check out the jdk-javadoc for an explanation of this method. I would not use System.currentTimeMillis, since it might not actually be unique, and its resolution is different on various platrofmr (i.e. Windows has only like a 10 or 100ms resolution, while Linux has 1000ms resolution). If you're looking for something unique to the Thread, why not use the thread's hashcode? String uniqueName = String.valueOf(Thread.currentThread().hashCode()); -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where should i store a attribute
The HttpServletRequest's life is only valid for the life of the request each request runs in its own thread. -Tim Edson Alves Pereira wrote: Hello folks, i´m trying to store a database connection in a session attribute or request attribute, but i must choose a name that just one thread per time would knowns. Any idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
repost: question on updates to cert store
I apologize for the repost, but I need to solve this problem pretty quickly, and I worry that with the volume on this list, anything unanswered for two days is lost. This is a question that I can't find the answer to anywhere: If I add a certifcate to my keystore, will Tomcat see it immediately (or soon) or do I have to bounce Tomcat to get it to reload it's internal keystore instance? If I have to bounce Tomcat, is there any programmatic way to make Tomcat reload its keystore or a way for some external program to tell it to bounce itself? Thanks in advance, Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: custom web app classloader
Howdy, I want to write my own custom web application class loader, for Tomcat 4.1* Out of curiosity, why? - the class I write should implement org.apache.catalina.Loader interface. - once I write the class, I tell tomcat to use it by specifying it in the Loader tag of a Context in server.xml - my class itself goes into $CATALINA_HOME/server/lib I believe you can also put it in common/lib.Your other two statements above are correct. It would be a real bonus to see an example. I am sure more than one person in this community has done this before. More than one person has tried, that's for sure. You can search the list archive. There hasn't been a message on this topic for a little while now. I say tried, not succeeded, as this is a notoriously difficult issue. Any words of advice? Yeah, don't do it unless you really have to. If you do it, keep in mind: - Reloadability (webapp restart) - Delegation according to servlet specification - Don't make anything tomcat specific, specifically the tomcat classloader hierarchy of of bootstrap-system-common-shared-webapp... Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Howdy, Hu! It's in early developments or is it suitable for production ? It's ready for production. People are already using it in production with tomcat 5. Of course, I'm biased ;) And, in a sysadmin point of view, what does that means: There two ways to use jsvc: via a Class that implements the Daemon interface or via calling a Class that have the required methods. For example Tomcat-4.1.x uses the Daemon interface and Tomcat-5.0.x provide a Class whose methods are called by jsvc directly.? It's a Developer, rather than Sysadmin, option. Chances are you won't need to worry about it as you'll use commons-daemon with tomcat, which already does the required jsvc invocation for you. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Howdy, Does anyone have an opinion of Tomcat running in a very high traffic environment, let's say, 100K - 500K unique visits/day? We've been doing it for a long time, since tomcat 4.0.1. The other thing you lose is performance. You rarely want Tomcat to serve your static content. All it does it tie up threads that could be serving Really? Care to prove that with some benchmarks? You might want to search the list archives for a post I sent a month or two ago demonstrating that the above is not necessarily true with current tomcat versions. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Who is knocking on what door?
Howdy, I'm glad you found it useful -- have a good weekend ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:33 PM To: Tomcat Users List Subject: RE: Who is knocking on what door? I was looking at the documentation. It wasn't really apparent to me, or perhaps I wasn't reading everything :) Under http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html Nested Components section, it didn't list Valve, so was confused, and in server.xml it is in the Host section. Didn't really look at that nicely blocked xml code that shows it in the context section :) Thank you once again for you quick and speedy answer to something I should have seen! -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:20 PM To: Tomcat Users List Subject: RE: Who is knocking on what door? Howdy, You can log per context. RTFM: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/valve.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:18 PM To: Tomcat Users List Subject: RE: Who is knocking on what door? Great! Thank you very much. Don't suppose I can get this to log per context? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 11:01 AM To: Tomcat Users List Subject: RE: Who is knocking on what door? Howdy, Yes, enable the AccessLogValve in server.xml. You probably want to change the pattern from common to combined. Yoav Shapira Millennium ChemInformatics -Original Message- From: Luc Foisy [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 10:52 AM To: Tomcat User List (E-mail) Subject: Who is knocking on what door? Is there something in any one of the tomcat management utilities or logging mechanisms or whatever where I can see who is hitting the tomcat server and what they are requesting? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sometimes HTTP ERROR: 500 General error, Why?
Howdy, Not enough information for us to help ;) What errors are in your logs? If the HTTP error page you get from tomcat or IIS? Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:25 PM To: Tomcat Users List Subject: Sometimes HTTP ERROR: 500 General error, Why? Hi, sometimes I get the following error: HTTP ERROR: 500 General error RequestURI=/pmhelp/frameinhalt.jsp after pressing the reload-button of the browser it works without an error. What may be the Problem? My Configuration is: Tomcat 4.1.27 - IIS 5 - isapi_redirector2 -- Gratis: Nokia Handy (bei Abschluss eines 24 Monats Vertrages) + d-Box 1 + PREMIERE START ! Hier bestellen http://www.freenet.de/tipp/shopping/handy_aktion/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Learning...
Hi Can you guys recommend a course (in the UK, London Area) where I can learn about the management of Tomcat as I am considering it for our upgrade of our web servers. Thanks - Chris Milner E: [EMAIL PROTECTED] - NOTE: The information in this email is confidential. If you are not the intended recipient, you must not read, use or disseminate this information. Although this email and any attachments are believed to be free of any virus, or any other defect which affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by London City Airport for any loss or damage rising in any way from receipt or use thereof. The contents of this message including any attachments does not necessarily reflect the view of London City Airport, unless expressly stated to the contrary the message is the work of a sender acting as an individual. www.londoncityairport.com This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Which version of xerces, Tomcat 4.1.24 is using?
Howdy, Which version of xerces Tomcat 4.1.24 is using? I could not find out information in the manifest files of xerces jars, used by Tomcat 4.1.27. So do you want 4.1.24 or 4.1.27? For tomcat 4.1.27, it's Xerces 2.4.0. How were you looking?? The manifest of xercesImpl.jar in $CATALINA_HOME/common/endorsed is very clear and complete: Name: org/apache/xerces/impl/Version Comment: @impl.name@ for http://xml.apache.org/xerces2-j Implementation-Title: org.apache.xerces.impl.Version Implementation-Version: 2.4.0 Implementation-Vendor: Apache Software Foundation Implementation-URL: http://xml.apache.org/xerces2-j Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Hu! It's in early developments or is it suitable for production ? It's ready for production. People are already using it in production with tomcat 5. Of course, I'm biased ;) Well, there is that beta flag in front of tomcat5 that tell me that your opinion is more than biased :). Of course, I saw a mail telling that the beta flag is related to specification instability (not code), anyway... It's a Developer, rather than Sysadmin, option. Chances are you won't need to worry about it as you'll use commons-daemon with tomcat, which already does the required jsvc invocation for you. Well, that does not help that much. I hope that there will be a configuration scheme that'll let easily define user/group/port and so on for the connectors. Just waiting for a sysadmin point of view :). Thanks, François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error Page
Is there any way to know which JSP page called an error page? I have one error page, and the errorPage tag is added automatically to each JSP in a template, so I can't pass it as a parameter. I need to know which page gererated the error so that it can be logged (and hopefully fixed) Any Ideas? Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error Page
Servlet spec ... SRV.9.9.1 Request Attributes Look for attribute javax.servlet.error.request_uri in the ServletRequest. -Tim Duncan wrote: Is there any way to know which JSP page called an error page? I have one error page, and the errorPage tag is added automatically to each JSP in a template, so I can't pass it as a parameter. I need to know which page gererated the error so that it can be logged (and hopefully fixed) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Howdy, Hu! It's in early developments or is it suitable for production ? It's ready for production. People are already using it in production with tomcat 5. Of course, I'm biased ;) Well, there is that beta flag in front of tomcat5 that tell me that your opinion is more than biased :). Of course, I saw a mail telling that the beta flag is related to specification instability (not code), anyway... Your question, and my answer regarding ready for production, was for commons-daemon itself. I also happen to believe* tomcat5 is fine: the only reason it's beta and not stable is the specs aren't out. * = I voted for beta, not stable, for this reason. Well, that does not help that much. I hope that there will be a configuration scheme that'll let easily define user/group/port and so on for the connectors. Just waiting for a sysadmin point of view :). Sorry I couldn't help you much. Beyond providing commons-daemon, that is. I hope more users contribute rather than just sit and wait for their desired features to magically get implemented, but hey, I'm not holding my breath and neither should you. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
instanceof drives me nuts!
Hi folks, It may be an off topic question but such weird things occurs in my tomcat project that posting here is my last chance... I took over a project for global authentication in my company extending standard tomcat authentication mecanism (extending AuthenticatorBase). As I didn't build the project, I am not so familiar with it and I couldn't avoid to put some of the classes in several places (server, common, shared, WEB-INF of my apps). Because I had to face the well known 'NoClassDefFoundError' thrown at tomcat startup. I have in my code something like : Callback callback = getTheCallBackObject(); if(callback instanceof ApplicationCallback) { ((ApplicationCallback) callback).doSomething(); } When I debug this part, the expression 'callback instanceof ApplicationCallback' is true, nevertheless if I step once, the code in the if block is not executed !!! I tried to replace the test by : if(callback.getClass().getName().equals(ApplicationCallback.class.getName())) { ((ApplicationCallback) callback).doSomething(); } then the code in the if block is executed but I throws a ClassCastException !!! I am not sure but I think that might be related to the fact that same class files are located in different directories of tomcat ?. Has anybody experienced this kind of weird behaviour? Any suggestion to understand what is really going on is welcome! Thanks, Thomas
RE: Opinions
Your question, and my answer regarding ready for production, was for commons-daemon itself. I also happen to believe* tomcat5 is fine: the only reason it's beta and not stable is the specs aren't out. * = I voted for beta, not stable, for this reason. OK. Sorry I couldn't help you much. Beyond providing commons-daemon, that is. I hope more users contribute rather than just sit and wait for their desired features to magically get implemented, but hey, I'm not holding my breath and neither should you. Well, I'd LOVE to try to use jsvc and make the appropriate documentation for it, I just CAN'T see where I should declare them, use them, and so on. I suppose it replaces Coyote Connectors, and I should try to define the jsvc classes there (in server.xml), but, it is really to thin for me to start a test. Well, it's Friday, I will sleep on it on two or three nights and try to understand it :). François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: instanceof drives me nuts!
Howdy, As I didn't build the project, I am not so familiar with it and I couldn't avoid to put some of the classes in several places (server, common, shared, WEB-INF of my apps). Don't do this, as it can lead to unpredictable classloading errors. Keep everything you can in WEB-INF/lib, the rest in common/lib, but no jar should be in both places. And you probably don't need to put anything at all of yours in the server classloader directories. Callback callback = getTheCallBackObject(); if(callback instanceof ApplicationCallback) { ((ApplicationCallback) callback).doSomething(); } When I debug this part, the expression 'callback instanceof ApplicationCallback' is true, nevertheless if I step once, the code in the if block is not executed !!! If the doSomething is not executed, how do you know if clause evaluates to true? From the debugger I suppose? You can also try the other way around, callback.getClass().isAssignableFrom(ApplicationCallback.class), to see what would happen. Has anybody experienced this kind of weird behaviour? Strange. I think I've had that happen once or twice, but I can't recall the solution ;( Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Threads
hi, how the threads can be activated on tomcat? regards Prince - Original Message - From: Lukas Bradley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 15, 2003 3:05 AM Subject: Re: HttpsURLConnection, Tomcat 4.1.27, and jsse.jar A good guess, and only if the JSSE functions REQUIRED 1.3. But I'm trying to access the JSSE classes included with 1.4. Lukas Yuriy Stul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] May be problem is that Tomcat 4.1.27 was compiled under Java 1.4... and JSSE under Java 1.3? Yuriy. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Probably OT: keytool: IOException: X509.ObjectIdentifier
This is probably off-topic, but I've seen it asked in more appropiate fora with no reply, so I'll try here: Trying to import my ceritifcate I get: # $JAVA_HOME/bin/keytool -import -alias tomcat -trustcacerts -file /tmp/X-cert.pem Enter keystore password: keytool error: java.security.cert.CertificateException: IOException: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48) openssl x509 -text shows it allright. Thanks in advance. Fernando. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Howdy, Well, I'd LOVE to try to use jsvc and make the appropriate documentation for it, I just CAN'T see where I should declare them, use them, and so on. I suppose it replaces Coyote Connectors, and I should try to define the jsvc classes there (in server.xml), but, it is really to thin for me to start a test. Well, it's Friday, I will sleep on it on two or three nights and try to understand it :). JSVC does not replace Coyote connectors. It is merely an invocation mechanism for another class. I assume you've read the JSVC page at http://jakarta.apache.org/commons/daemon/jsvc.html. I also assume you've downloaded, installed tomcat5 (5.0.14 preferably), so you can see how jsvc is used there. What, beyond the above information, would you find most useful in understanding jsvc? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
I assume you've read the JSVC page at http://jakarta.apache.org/commons/daemon/jsvc.html. Yes. I also assume you've downloaded, installed tomcat5 (5.0.14 preferably), so you can see how jsvc is used there. No, I hope to find it the doc before. I'll try. What, beyond the above information, would you find most useful in understanding jsvc? Time :). François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: instanceof drives me nuts!
Thomas, As I didn't build the project, I am not so familiar with it and I couldn't avoid to put some of the classes in several places (server, common, shared, WEB-INF of my apps). Don't do this, as it can lead to unpredictable classloading errors. Keep everything you can in WEB-INF/lib, the rest in common/lib, but no jar should be in both places. And you probably don't need to put anything at all of yours in the server classloader directories. I couldn't agree more. If possible, try and change the configuration so that you have fewer application dependencies in the server/lib and common/lib directories. If the doSomething is not executed, how do you know if clause evaluates to true? From the debugger I suppose? You can also try the other way around, callback.getClass().isAssignableFrom(ApplicationCallback.class), to see what would happen. Has anybody experienced this kind of weird behaviour? Strange. I think I've had that happen once or twice, but I can't recall the solution ;( Don't forget that (object instanceof MyClass) only works when: - The object actually inherits from MyClass and - object.getClass() was loaded by the same classloader as MyClass Remember that the same class can be loaded twice by different class loaders. The instances they create are not assignable (d'oh)! This is why ClassLoading issues are so hairy. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Howdy, No, I hope to find it the doc before. I'll try. Not so much doc as example. What, beyond the above information, would you find most useful in understanding jsvc? Time :). OK. If you find that a specific document would be helpful, we can work on it together and I'll get into the CVS/release-docs/commons web site, etc. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: instanceof drives me nuts!
This is definitely due to the class being loaded twice in two different classloaders. An object's type is in fact not only its class name, but a combination of its class name and the class loader from which the class was loaded. Note that class loaders can be heirarchical, but if classloader A delegates the loading of a class to classloader B, the class is considered loaded from classloader B. Now, the classloader chosen when you refer to a class by name is the class loader of the current class. So in class Bar { public void someFunction (Object obj) { if (obj instanceof FooClass) { ... } } } we are comparing obj.getClass () to Bar.class.getClassLoader ().loadClass (FooClass). If obj was an instance of FooClass instantiated using the class definition from a different classloader, then this won't work. The reason for this kind of behavior is that you can load two different versions of the same class for example (or two completely different classes of the same name) within two different classloaders without them conflicting. Also, static variables are specific only to the actual class instance, therefore if the same class has been loaded in two different classloaders, each one will have its own instances of static members. That's why, for example, two different web apps can be loaded into tomcat with different versions of the same library and not conflict. Now you understand why it's evil to keep your jars in two places. Cheers, Erik Shapira, Yoav wrote: Howdy, As I didn't build the project, I am not so familiar with it and I couldn't avoid to put some of the classes in several places (server, common, shared, WEB-INF of my apps). Don't do this, as it can lead to unpredictable classloading errors. Keep everything you can in WEB-INF/lib, the rest in common/lib, but no jar should be in both places. And you probably don't need to put anything at all of yours in the server classloader directories. Callback callback = getTheCallBackObject(); if(callback instanceof ApplicationCallback) { ((ApplicationCallback) callback).doSomething(); } When I debug this part, the expression 'callback instanceof ApplicationCallback' is true, nevertheless if I step once, the code in the if block is not executed !!! If the doSomething is not executed, how do you know if clause evaluates to true? From the debugger I suppose? You can also try the other way around, callback.getClass().isAssignableFrom(ApplicationCallback.class), to see what would happen. Has anybody experienced this kind of weird behaviour? Strange. I think I've had that happen once or twice, but I can't recall the solution ;( Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The New Online Source for Live Music in Montreal .::514.286.1699::.
what's need to move an app from 4.1.2x to 5?
I was wondering if someone knows of some documentation on what is needed to move an application from version 4.x to 5? I would like to be able to do jsp debugging in development, but still need to deploy on 4.x.I have an app that I have tried to install on 5 using the same configuration (context, jars, etc.), but tomcat 5 won't start. I get the following error in catalina.out and then tomcat quits...(see below). Any ideas or documentation on porting is greatly appreciated. -nathan [EMAIL PROTECTED] /Library/Tomcat/Home/logs] $ cat catalina.out Oct 31, 2003 9:14:20 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Oct 31, 2003 9:14:20 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 4025 ms Oct 31, 2003 9:14:20 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 31, 2003 9:14:20 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.12 java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:392) Caused by: java.lang.ExceptionInInitializerError at org.apache.catalina.core.StandardContext.start(StandardContext.java:4058 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125) at org.apache.catalina.core.StandardHost.start(StandardHost.java:792) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:502) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2343) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) ... 6 more Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp l.java:532) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp l.java:272) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp l.java:246) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395) at org.apache.catalina.startup.TldConfig.clinit(TldConfig.java:109) ... 14 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA ccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons tructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp l.java:525) ... 18 more Caused by: java.lang.NoClassDefFoundError: javax/mail/Multipart at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) at java.lang.Class.getConstructor0(Class.java:1762) at java.lang.Class.newInstance0(Class.java:276) at java.lang.Class.newInstance(Class.java:259) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionCo nverter.java:319) at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverte r.java:112) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator .java:620) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator .java:603) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConf igurator.java:500) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j ava:406) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j ava:432) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConver ter.java:460) at org.apache.log4j.LogManager.clinit(LogManager.java:113) at org.apache.log4j.Category.getInstance(Category.java:514) at org.apache.commons.logging.impl.Log4JCategoryLog.init(Log4JCategoryLog .java:104) ... 23 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
Re: Opinions
Francois, can you tell me more about this: Tomcat 4.1.27 bug when running at the MaxConnector limit I am certainly experiencing this problem and really banging my head against it. Is there documentation about this bug? What is your workaround? I was planning to make the MaxConnector limit really high and implement my own bounded semaphore within doGet. Thanks! I'm so happy to know I'm not crazy! The bug really exists! ;) -Erik Francois JEANMOUGIN wrote: -Message d'origine- De : Robert Charbonneau [mailto:[EMAIL PROTECTED] Envoyé : vendredi 31 octobre 2003 06:17 À : Tomcat Users Mailing List Objet : Opinions Does anyone have an opinion of Tomcat running in a very high traffic environment, let's say, 100K - 500K unique visits/day? I'm also wondering about the possibility of running a Tomcat server standalone as opposed to using mod_jk.so with Apache to mount webapps with. Would this be more stable, and is there any loss to me if I *don't* use Apache? I have several tomcat standalone applications with more than one connection per second. It works well. I had to be carefull with: o JITC bug in IBM 1.4.1 Jvm on hyperthreaded machines (SIG11) o Silly name lookup at IBM Jvm startup (it needs to know the name for all the interfaces up on the machine or it SIG11. Even if your tomcat has nothing to do with the interfaces, event if you need administrative unnamed (DNS, Hosts) interfaces). This does not happen with Sun Jvm. o Memory leaks (in java servlets or Jvm or both) o Tomcat 4.1.27 bug when running at the MaxConnector limit (workaroundable) Those applications are wap and web applications, mainly. Total traffic is about 30Mb/s (up to 40) all day. I am in the process of migrating to a LinuxVirtualServer architecture for load balancing and failover. It works well. I have to say that tomcat is not so easy to share between nodes. I had to do at least one modification to catalina.sh (introducing a CATALINA_LOGS). The CATALINA_BASE is shared netween nodes (via NFS) and I need one catalina.out for each node. So... Oh, and last but not least, I didn't find a privilege separation method in tomcat (like in apache or ssh or postfix, or...). Perhaps am I wrong, but, if you want tomcat to run in unpriviledge environment, you have to make it bind to a public port (say 8080). I use iptables to redirect connections from 80 to 8080: If you have only one tomcat running on the server, you can use: /sbin/iptables -t nat -A PREROUTING -i lo -p tcp --dport 80 -j REDIRECT --to-ports 8080 For more than one (one IP for one tomcat is required), you have to deal with DNAT: /sbin/iptables -t nat -A PREROUTING -d 1.2.3.4 -p tcp -m tcp --dport 80 -j DNAT --to-destination 1.2.3.4:8080 This way, you don't have to put any port number in URLs. Ho. I just see that it is all linux related... I don't have any experience in Windows. Sorry. In fact, with a minimal of Unix/Linux sysadmin knowledge, tomcat become spretty scalable. François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The New Online Source for Live Music in Montreal .::514.286.1699::.
RE: Opinions
Weather.com uses Tomcat to handle a very healthy pile of traffic: http://www.pcmag.com/print_article/0,3048,a=38494,00.asp. The article says that 70% of the content is dynamic. It sounds like they use a separate Apache web tier. - Tim Craycroft www.842technology.com -Original Message- From: Robert Charbonneau [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 9:17 PM To: Tomcat Users Mailing List Subject: Opinions Does anyone have an opinion of Tomcat running in a very high traffic environment, let's say, 100K - 500K unique visits/day? I'm also wondering about the possibility of running a Tomcat server standalone as opposed to using mod_jk.so with Apache to mount webapps with. Would this be more stable, and is there any loss to me if I *don't* use Apache? Thanks folks, -- Robert Charbonneau [EMAIL PROTECTED] -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Tomcat 4.1.29 Stable and Apache Tomcat 5.0.14 Beta released
I speak for many: THANK YOU Remy Maucherat wrote: The Tomcat Team announces the immediate availability of Apache Tomcat 4.1.29 Stable and Apache Tomcat 5.0.14 Beta. Please refer to the changelog for the list of changes. Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi Sources: http://jakarta.apache.org/site/sourceindex.cgi The Apache Tomcat Team -- Victor Cekvenich, Struts Instructor (215) 321-9146 Advanced Struts Training http://basebeans.com/do/cmsPg?content=TRAINING Server Side Java training with Rich UI, mentoring, designs, samples and project recovery in North East. Simple best practice basic Portal, a Struts CMS, Membership, Forums, Shopping and Credit processing, http://basicportal.com software, ready to develop/customize; requires a db to run. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions
Francois, can you tell me more about this: Tomcat 4.1.27 bug when running at the MaxConnector limit http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763 I have to check the changelog but it should be closed in (freshly released) 4.1.29. François. (Where the hell did 4.1.28 gone ???) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Virtual Files
Don't know if this is possible with tomcat but; I need people to be able to request virtual files in a directory of a web application. As in: A user would request a file (which doesn't exist). This would call a jsp page which would return output based on the name of the file requested, but the user would still see the filename as the one which they originally requested. I thought that perhaps changing the 404 error page to my jsp file may work, but is it possible to set the 404 error page for just one directory? I would prefer a differant method if there is one. Thanks for any help anyone can give. Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual Files
In my opinion you have several choiches: - map a filter / servlet ON the url that cover the folder containing the files Or - map a struts action on that url In the filter / action you can process the request as you want. -Original Message- From: Duncan [mailto:[EMAIL PROTECTED] Sent: 31 octombrie 2003 18:02 To: Tomcat Users List Subject: Virtual Files Don't know if this is possible with tomcat but; I need people to be able to request virtual files in a directory of a web application. As in: A user would request a file (which doesn't exist). This would call a jsp page which would return output based on the name of the file requested, but the user would still see the filename as the one which they originally requested. I thought that perhaps changing the 404 error page to my jsp file may work, but is it possible to set the 404 error page for just one directory? I would prefer a differant method if there is one. Thanks for any help anyone can give. Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jk or jk2
Florian, From my latest experience with my reconfiguration of Tomcat, Apache2 and mod_jk2 I have somewhat figured things out. I think the bracketed items are a type:attribute sort of like tags in XLM or HTML. They are necessary to identify the individual pieces within the properties file. They are neccesary for when you have mulitple Web applications running on either one instance of tomcat or multiple instances of Tomcat. I am including my newly revised workers2.properties file. As you can see I have defined 3 ports that tomcat will listen on, i.e. [channel.socket:localhost:8###] these need to be unique. Then further down you can see where I have assigned the workers to the individual listen ports, i.e [uri:www.session1.com/*jsp] worker=ajp13:localhost:8109 Now if you are only running one instance of Tomcat you only need one port and one worker. But in my case I have each web application running on a seperate instance of tomcat that I can turn on/off without affecting the other instances. I hope that this helps clarify some thing for you. Dean BEGIN CODE # only in the beginning. In production uncomment it out [logger.apache2] level=DEBUG [shm] file=z:/tomcat/logs/jk2.shm size=1048576 # Example socket channel, override port and host. [channel.socket:localhost:8109] port=8109 host=127.0.0.1 [channel.socket:localhost:8110] port=8110 host=127.0.0.1 [channel.socket:localhost:8111] port=8111 host=127.0.0.1 #[channel.jni:jni] #info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations #[vm:] #info=Parameters used to load a JVM in the server process #JVM=C:\jdk\jre\bin\hotspot\jvm.dll #OPT=-Djava.class.path=Z:/Tomcat/bin/tomcat-jni.jar;Z:/Tomcat/server/lib/commons-logging.jar #OPT=-Dtomcat.home=${TOMCAT_HOME} #OPT=-Dcatalina.home=${TOMCAT_HOME} #OPT=-Xmx128M #OPT=-Djava.compiler=NONE #disabled=0 #[worker1.jni:onStartup] #info=Command to be executed by the VM on startup. This one will start tomcat. #class=org/apache/jk/apr/TomcatStarter #ARG=start #disabled=0 #stdout=Z:/tomcat/logs/stdout.log #stderr=Z:/tomcat/logs/stderr.log #[worker1.jni:onShutdown] #info=Command to be executed by the VM on shutdown. This one will stop tomcat. #class=org/apache/jk/apr/TomcatStarter #ARG=stop #disabled=0 # Define the worker # First Web Application Worker [ajp13:localhost:8109] channel=channel.socket:localhost:8109 # Second Web Application Worker [ajp13:localhost:8110] channel=channel.socket:localhost:8110 # Third Web Application Worker [ajp13:localhost:8111] channel=channel.socket:localhost:8111 Uri mapping [uri:127.0.0.1/*.jsp] worker=ajp13:localhost:8109 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. worker=status:status [uri:www.session1.com/*.jsp] worker=ajp13:localhost:8109 [uri:www.session2.com/*.jsp] worker=ajp13:localhost:8110 [uri:www.session3.com/*.jsp] worker=ajp13:localhost:8111 END CODE -Original Message- From: Florian Ebeling [mailto:[EMAIL PROTECTED] Sent: Fri 10/31/2003 05:40 To: Tomcat Users List Cc: Subject:Re: jk or jk2 Dean- thanks for sharing your material on your tested setup here. I wonder if you've got a distinct idea of how the syntax workers2.properties works. This is actually my single most pressing problem. There is this section like thing: [foo:bar] What does it mean? Is it a [type:instance] - eg. [uri:/context/*] scheme, perhaps? This might make sense. Then this [type:] - eg. [config:] could be a class or singleton-like thing. And then, the properties. Do they always refer to the preceding square-bracketed item? [type:obj] property1=value1 property2=value2 What is the group syntax like? Is a group something I define with the [lb:some_lb_name] statement? Do I need a shared memory file under all circumstances, or is it neccessary only when I have several tomcats? -Florian Dean Searle wrote: The Oreilly book is only for Tomcat and Tomcat as a Standalone web/application server. I have spent six months trying to figure out how everything works together and how to get things implemented. Both from FreeBSD and Windows. I do have documentation on how to get Apache2, Tomcat 4.1 and mod_jk2 to work together. Please keep in mind that this is old documentation that I have out there, some things are not optimized yet. I have just reconfigured my Apache2, Tomcat 4.1 and mod_jk2 installation. I currently have a test environment where I am running two instances of Apache2 from one binary install and three instances of Tomcat from one binary install. Each one running different configuration from straight static site to jsp site and jsp with SSL or Realm security with AD LDAP. But all using mod_jk2 when needed. I will provide a link to my old documentation to get you started. I will try and answer any other questions also. I am not an expert here though, just some things I have figured
Re: Virtual Files
Try to create a servlet-mapping in your web.xml that directs all requests in a directory to your servlet / JSP. For example, if you put: servlet-mapping servlet-nameVirtualFileServlet/servlet-name url-pattern/vfiles/*/url-pattern /servlet-mapping All URLs beginning with [context]/vfiles will be redirected to the VirtualFileServlet. Consult the servlet specification for details on the pattern matching algorithm, to know which mappings will be overriden by this declaration :-) HTH, Rodrigo Duncan wrote: Don't know if this is possible with tomcat but; I need people to be able to request virtual files in a directory of a web application. As in: A user would request a file (which doesn't exist). This would call a jsp page which would return output based on the name of the file requested, but the user would still see the filename as the one which they originally requested. I thought that perhaps changing the 404 error page to my jsp file may work, but is it possible to set the 404 error page for just one directory? I would prefer a differant method if there is one. Thanks for any help anyone can give. Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Virtual Files
You can set up mappings to jsp pages servlet servlet-nameorg.apache.jps.MyPage_jsp/servlet-name servlet-classorg.apache.jps.MyPage_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jps.MyPage_jsp/servlet-name url-pattern/some/dir/you/would/like/to/use/*/url-pattern /servlet-mapping Any page called from /some/dir/you/would/like/to/use/ Ie /some/dir/you/would/like/to/use/itworks.jsp Would go to the MyPage.jsp -Original Message- From: Duncan [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 11:02 AM To: Tomcat Users List Subject: Virtual Files Don't know if this is possible with tomcat but; I need people to be able to request virtual files in a directory of a web application. As in: A user would request a file (which doesn't exist). This would call a jsp page which would return output based on the name of the file requested, but the user would still see the filename as the one which they originally requested. I thought that perhaps changing the 404 error page to my jsp file may work, but is it possible to set the 404 error page for just one directory? I would prefer a differant method if there is one. Thanks for any help anyone can give. Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading a class from a zip file , present outside Tomcat directories
Hi geeks, Problem :- I have a zip file which contains a .class file . I need to create an instance of this class during runtime. Below is the snippet from the actual code which does the same. I was able to successfully load the classes when running test routine using the same code through the command line. But when i call the same API from the GUI [running in Tomcat 3.3.1] , I am unable to load the class.It was giving me java.lang.ClassFormatError: (Bad magic number) NOTE : The zip file is not under the Tomcat directory. I understand that the classloader mechanism for Tomcat is different.I tried the following approach - I tried loading it from the webapp classloader's parent, ie. right upto the same system classloader as used by command line, by using getParent() .(myPkg.tryMe.class.getClassLoader().getParent() ) .. ... but am still in same square, as am getting the same exception. Any help on this is welcome. ===code snippet= package myPkg; public class tryMe{ public static void loadMyClass(){ URL[] urls = { new File(C:\\tmp\\abcd.zip).toURL() }; String classFile= com.xxx.yy.myClassToBeLoaded; // the class to be loaded from the abcd.zip file ClassLoader tempClassLoader =myPkg.tryMe.class.getClassLoader(); ClassLoader cl = new URLClassLoader(urls,tempClassLoader); System.out.println(DEBUG: :Before calling loadclass..:); Object o = cl.loadClass(classFile).newInstance(); System.out.println( DEBUG:: successfully loaded class ..); } } //EOC ===End of code snippet=== Thanks in advance, ~ ~Javed --- Mohammed Javed P [EMAIL PROTECTED] wrote: Hi! Is it possible to load a class from a zip file , which is located outside the Tomcat directories ? I mean, the zip file can be anywhere in the hard disk, and not under the installed Tomcat directory structure. Please provide any pointers on how to go about it . Thnkx in advance! regards, ~Javed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Virtual Files
Well, if you don't precompile JSPs,there is another way to map a JSP: servlet servlet-nameMyServlet/servlet-name jsp-file/MyPage.jsp/jsp-file /servlet jakarta wrote: You can set up mappings to jsp pages servlet servlet-nameorg.apache.jps.MyPage_jsp/servlet-name servlet-classorg.apache.jps.MyPage_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jps.MyPage_jsp/servlet-name url-pattern/some/dir/you/would/like/to/use/*/url-pattern /servlet-mapping Any page called from /some/dir/you/would/like/to/use/ Ie /some/dir/you/would/like/to/use/itworks.jsp Would go to the MyPage.jsp -Original Message- From: Duncan [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 11:02 AM To: Tomcat Users List Subject: Virtual Files Don't know if this is possible with tomcat but; I need people to be able to request virtual files in a directory of a web application. As in: A user would request a file (which doesn't exist). This would call a jsp page which would return output based on the name of the file requested, but the user would still see the filename as the one which they originally requested. I thought that perhaps changing the 404 error page to my jsp file may work, but is it possible to set the 404 error page for just one directory? I would prefer a differant method if there is one. Thanks for any help anyone can give. Duncan Smith Decker Telecom Ltd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: custom web app classloader (KMM78682673V18722L0KM)
Hallo, vielen Dank fuer Ihre E-Mail. Unter Ihrer E-Mail-Absenderadresse [EMAIL PROTECTED] liegt uns leider keine Anmeldung vor. Wenn Sie sich mit einer anderen E-Mail-Adresse angemeldet haben, senden Sie uns Ihre Anfrage bitte von dort, damit wir Ihnen weiterhelfen koennen. Vielen Dank! Mit freundlichen Gruessen Todd Dunker eBay Customer Support eBay - Der weltweite Online-Marktplatz! ** Nutzen Sie unseren Telefon-Support http://pages.ebay.de/telefon Sie erreichen uns taeglich von 9.00 bis 20.00 Uhr unter 0900 1 / 46 32 29 bzw. 0900 1 GO EBAY. Diese Telefonnummer ist kostenpflichtig (59 Cent/Minute) und nur aus dem Festnetz der Deutschen Telekom zu erreichen. ** Bei Fragen per E-Mail nutzen Sie bitte unser Kontaktformular: http://pages.ebay.de/help/basics/select-support.html Bitte nennen Sie uns bei Ihren Anfragen auch immer Ihren Mitgliedsnamen und die der Beteiligten, oder die Artikelnummer, zu der Sie eine Frage haben. Vielen Dank. ** Bitte beachten Sie unsere aktuellen eBay-Mitteilungen auf http://www2.ebay.com/aw/marketing-de.shtml ** 31802084 10/31/03 Original Message Follows: - Jwahar Bammi wrote: Thanks for your quick reply glenn, I was thinking the same way. Please could you confirm the mechanics of hooking the classloader into Tomcat - once I write the class, I tell tomcat to use it by specifying it in the Loader tag of a Context in server.xml Yes. The next releases of Tomcat 4.1 and 5 will also allow a Loader to be nested inside the DefaultContext. - my class itself goes into $CATALINA_HOME/server/lib Yes, or in $CATALINA_HOME/common/lib the docs don't make it clear what the mechanics should be thanks again bammi -Original Message- From: Glenn Nielsen [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 10:20 PM To: Tomcat Users List Subject: Re: custom web app classloader I have done this but I started by extending org.apache.catalina.loader.WebappLoader, then overriding anything I needed to customize. Regards, Glenn Jwahar Bammi wrote: I want to write my own custom web application class loader, for Tomcat 4.1* (and hopefully it will continue to work for Tomcat 5*). From the precious little info that is available, I have gleaned the following: - the class I write should implement org.apache.catalina.Loader interface. - once I write the class, I tell tomcat to use it by specifying it in the Loader tag of a Context in server.xml - my class itself goes into $CATALINA_HOME/server/lib Are my assumptions above correct? It would be a real bonus to see an example. I am sure more than one person in this community has done this before. Any words of advice? Advanced Thanks, Jwahar Bammi Memento, Inc. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session size
Is session size an issue Tomcat? If there is some sort of size limitation, is it on the magnitude of 10K? 100K? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
generate images on the fly
Hi, slightly off topic but does anybody know an Java open source framework or class library which makes it possible to generate images (gif, jpg, png) on the fly on server side and send them to the client (or store them on the web app context)? Thanks, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Which version of xerces, Tomcat 4.1.24 is using?
I'm sorry it was a typo. I want xerces version used by Tomcat 4.1.24 manifest file of xercesImpl.jar in $CATALINA_HOME/common/endorsed contains only following text --- Manifest-Version: 1.0 Created-By: Apache Ant 1.5 --- thanks, Naresh -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 7:40 PM To: Tomcat Users List Subject: RE: Which version of xerces, Tomcat 4.1.24 is using? Howdy, Which version of xerces Tomcat 4.1.24 is using? I could not find out information in the manifest files of xerces jars, used by Tomcat 4.1.27. So do you want 4.1.24 or 4.1.27? For tomcat 4.1.27, it's Xerces 2.4.0. How were you looking?? The manifest of xercesImpl.jar in $CATALINA_HOME/common/endorsed is very clear and complete: Name: org/apache/xerces/impl/Version Comment: @impl.name@ for http://xml.apache.org/xerces2-j Implementation-Title: org.apache.xerces.impl.Version Implementation-Version: 2.4.0 Implementation-Vendor: Apache Software Foundation Implementation-URL: http://xml.apache.org/xerces2-j Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session size
Howdy, Tomcat doesn't impose a size limit on sessions. The more stuff you put in the session, the more memory required. Session serialization and deserialization time will be affected as well. Yoav Shapira Millennium ChemInformatics -Original Message- From: Tom Kerigan [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 8:00 AM To: [EMAIL PROTECTED] Subject: Session size Is session size an issue Tomcat? If there is some sort of size limitation, is it on the magnitude of 10K? 100K? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: generate images on the fly
Howdy, You mean something like GifEncoder? http://www.acme.com/java/software/Acme.JPM.Encoders.ImageEncoder.html Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 8:33 AM To: Tomcat Users List Subject: generate images on the fly Hi, slightly off topic but does anybody know an Java open source framework or class library which makes it possible to generate images (gif, jpg, png) on the fly on server side and send them to the client (or store them on the web app context)? Thanks, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: generate images on the fly
You could try the JAI (Java Advanced Imaging) API. http://java.sun.com/products/java-media/jai/ You can generate jpegs and pngs but not gifs because the gif image format is commercial. I think you must have a license to create gif images. -Original Message- From: Thorsten Möller [mailto:[EMAIL PROTECTED] Sent: 31 October 2003 13:33 To: Tomcat Users List Subject: generate images on the fly Hi, slightly off topic but does anybody know an Java open source framework or class library which makes it possible to generate images (gif, jpg, png) on the fly on server side and send them to the client (or store them on the web app context)? Thanks, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: generate images on the fly
And if you specifically are interested in graphs, then there's two packages that work together. http://www.jfree.org/jfreechart/index.html which does the server-side graph generation http://cewolf.sourceforge.net/ Taglib that wraps Jfreechart quite nicely. On the bottom of the first page I linked, there is a list of other free charting packages. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 7:33 AM To: Tomcat Users List Subject: generate images on the fly Hi, slightly off topic but does anybody know an Java open source framework or class library which makes it possible to generate images (gif, jpg, png) on the fly on server side and send them to the client (or store them on the web app context)? Thanks, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat won't start
One of our servers running Tomcat as started experiencing an odd problem. Tomcat will not start, it is complaining about not being able to find some classes. The problem started shortly after applying some updates using YAST. The exception it throws is shown below. We are running Tomcat 4.1.24 on JDK 1.4.1-b21 on SUSE 8. We have another server with a very similar config that works perfectly (only difference is the distribution it runs on, RH vs SUSE) I have checked CATALINA_HOME and JAVA_HOME and they both point to the correct locations. I modified catalina.sh to display the CLASSPATH it uses when starting catalina and included it as well. There are a couple references to this problem in the mailing list archives, but it was never answered. JAVA_HOME=/usr/lib/java CATALINA_HOME=/opt/jakarta CLASSPATH=/usr/lib/java/lib/tools.jar:/opt/jakarta/bin/bootstrap.jar Any ideas? ERROR reading /opt/jakarta/conf/server.xml At Line 5 /Server/Listener/ className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0 Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.mbeans.ServerLifecycleListener java.lang.ClassNotFoundException: org.apache.catalina.mbeans.ServerLifecycleListener Nathan McMinn Application Developer NequalsOne - HealthCare marketing tools mailto:[EMAIL PROTECTED] http://www.NequalsOne.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: GIF
Hi You can generate jpegs and pngs but not gifs because the gif image format is commercial. I think you must have a license to create gif images. rumour is the GIF license is free again. Compuserve gave it up. Free software will (in time) be able to support it again ... if they wish... I can't really confirm that rumour though. anyone ? cu *pike = Microsoft: HOWTO: Read the Fucking Manual This article demonstrates how to read the fucking manual http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: GIF
They didn't exactly give it up, the patent expired. Nathan McMinn Application Developer NequalsOne - HealthCare marketing tools mailto:[EMAIL PROTECTED] http://www.NequalsOne.com -Original Message- From: Pike [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 11:09 AM To: Tomcat Users List Subject: OT: GIF Hi You can generate jpegs and pngs but not gifs because the gif image format is commercial. I think you must have a license to create gif images. rumour is the GIF license is free again. Compuserve gave it up. Free software will (in time) be able to support it again ... if they wish... I can't really confirm that rumour though. anyone ? cu *pike = Microsoft: HOWTO: Read the Fucking Manual This article demonstrates how to read the fucking manual http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate images on the fly
Of course, there is always java.awt. In order to write the images out, you need to use javax.imageio, which is included in recent JDKs and can write to a variety of formats. I use this combination to accept image uploads, determine their size, store them in a database, and then serve them back at any resolution. I.E, the url for the image may specify the size the image should be scaled to. The system looks in a disk cache to find if the file has already been generated, and if not, generates it using the JDK. The JDK can read gifs but not write them, which is inconvenient but not the end of the world. In my case, I do use transparent images, but I work around this problem by accepting transparent gifs, and then (at request time) accepting a parameter for the background color onto which the gif will be drawn (in my case the bg is always solid). I then draw the gif onto a java.awt.Graphics that has been filled in with that color, and render the final scaled product as a JPG. I suspect I could make my life a lot easier by using PNGs but I haven't gotten around to it yet... -Erik Thorsten Möller wrote: Hi, slightly off topic but does anybody know an Java open source framework or class library which makes it possible to generate images (gif, jpg, png) on the fly on server side and send them to the client (or store them on the web app context)? Thanks, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The New Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: generate images on the fly
What do you mean by generating ? There are several solutions - some where you can draw images - some where you can create images from data - some where you can process images Drawing solutions: http://www.eteks.com/pja/en/ AWT (Link not at hand) Charting solutions: http://cewolf.sourceforge.net/ http://jsci.sourceforge.net/ (http://www-106.ibm.com/developerworks/java/library/j-2dgraphics/) http://www.jfree.org/jfreechart/index.html (http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-opensourceprofile.html) Processing solutions: http://rivit.cs.byu.edu/jigl/ http://java.sun.com/products/java-media/jai/docs/index.html For some kind of applications you can chain Drawing solutions with the Processing solutions. -Original Message- From: Thorsten Möller [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:33 PM To: Tomcat Users List Subject: generate images on the fly Hi, slightly off topic but does anybody know an Java open source framework or class library which makes it possible to generate images (gif, jpg, png) on the fly on server side and send them to the client (or store them on the web app context)? Thanks, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Virtual Files
jakarta, servlet servlet-nameorg.apache.jps.MyPage_jsp/servlet-name servlet-classorg.apache.jps.MyPage_jsp/servlet-class /servlet Unfortunately, this is pretty container and version-specific. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Which version of xerces, Tomcat 4.1.24 is using?
Naresh, I'm sorry it was a typo. I want xerces version used by Tomcat 4.1.24 If you really have to know, try this:do this: [step 1] (or zero if you like ;) $ md5sum /path/to/xerces.jar prints the target md5 signature [step 2] $ $ wget [URL for Xerces-suspected-version.tar.gz] $ tar xvzf Xerces-suspected-version.tar.gz $ md5sum Xerces-suspected-version/xerces.jar prints the MD5 signature if (!md5sum.equals(target)) goto [step 2] -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] How do you do a release with known bugs?
Do I want to tell the clients or just let them to figure it out themselves? My clients aren't really computer-oriented. So not sure if they will understand the bugs without any detailed explaination. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: GIF
Pike, rumour is the GIF license is free again. Compuserve gave it up. Free software will (in time) be able to support it again ... if they wish... I didn't know that. That's great, if it's true. Another thing to consider: one of the important benefits of the GIF file format (transparency) is also part of the PNG format. PNG also supports 24-bit color, while GIF supports a measly 8-bit maximum (paletted) color depth. I do not believe that standard PNG supports animations, though. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Which version of xerces, Tomcat 4.1.24 is using?
What does the invocation of this static java method return? org.apache.xerces.impl.Version.getVersion(); http://xml.apache.org/xerces2-j/javadocs/xerces2/index.html HTH, Jon Agarwal, Naresh wrote: I'm sorry it was a typo. I want xerces version used by Tomcat 4.1.24 manifest file of xercesImpl.jar in $CATALINA_HOME/common/endorsed contains only following text --- Manifest-Version: 1.0 Created-By: Apache Ant 1.5 --- thanks, Naresh -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 7:40 PM To: Tomcat Users List Subject: RE: Which version of xerces, Tomcat 4.1.24 is using? Howdy, Which version of xerces Tomcat 4.1.24 is using? I could not find out information in the manifest files of xerces jars, used by Tomcat 4.1.27. So do you want 4.1.24 or 4.1.27? For tomcat 4.1.27, it's Xerces 2.4.0. How were you looking?? The manifest of xercesImpl.jar in $CATALINA_HOME/common/endorsed is very clear and complete: Name: org/apache/xerces/impl/Version Comment: @impl.name@ for http://xml.apache.org/xerces2-j Implementation-Title: org.apache.xerces.impl.Version Implementation-Version: 2.4.0 Implementation-Vendor: Apache Software Foundation Implementation-URL: http://xml.apache.org/xerces2-j Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: GIF
It's Unisys' patent on LZW that was the problem, or at least that was my understanding. --mikej -=-- mike jackson [EMAIL PROTECTED] -Original Message- From: Pike [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:09 AM To: Tomcat Users List Subject: OT: GIF Hi You can generate jpegs and pngs but not gifs because the gif image format is commercial. I think you must have a license to create gif images. rumour is the GIF license is free again. Compuserve gave it up. Free software will (in time) be able to support it again ... if they wish... I can't really confirm that rumour though. anyone ? cu *pike = Microsoft: HOWTO: Read the Fucking Manual This article demonstrates how to read the fucking manual http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GIF
http://www.unisys.com/about__unisys/lzw mike jackson wrote: It's Unisys' patent on LZW that was the problem, or at least that was my understanding. --mikej -=-- mike jackson [EMAIL PROTECTED] -Original Message- From: Pike [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:09 AM To: Tomcat Users List Subject: OT: GIF Hi You can generate jpegs and pngs but not gifs because the gif image format is commercial. I think you must have a license to create gif images. rumour is the GIF license is free again. Compuserve gave it up. Free software will (in time) be able to support it again ... if they wish... I can't really confirm that rumour though. anyone ? cu *pike = Microsoft: HOWTO: Read the Fucking Manual This article demonstrates how to read the fucking manual http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirecting request.
Hello, All! How I can redirect incoming request from one virtual host to another. For example I have : host.dm, www.host.dm, www1.host.dm I need to redirect all incoming requests to host.dm Alias doesn't work for me, because we have SSL certificate only for host.dm Is there are any default way to redirect the requests ? P.S. Posting it again, the previous one didn't get thru. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Greetings
Greetings all I am new to the list. I just had a quick question as to getting Tomcat to process some Perl/CGI stuff. It runs great for my JSP stuff. I renamed the two files and edited the web.xml But it's a no go. Any help/ideas? Thanks John John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirecting request.
Hello, All! How I can redirect incoming request from one virtual host to another. For example I have : host.dm, www.host.dm, www1.host.dm I need to redirect all incoming requests to host.dm Alias doesn't work for me, because we have SSL sertificat only for host.dm Is there are any default way to redirect the requests ? --- Regards Ivan[a]yourmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Greetings
Did you get any errors? -Original Message- From: John Greco [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:23 PM To: '[EMAIL PROTECTED]' Subject: Greetings Greetings all I am new to the list. I just had a quick question as to getting Tomcat to process some Perl/CGI stuff. It runs great for my JSP stuff. I renamed the two files and edited the web.xml But it's a no go. Any help/ideas? Thanks John John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Greetings
All I get is The Page Could Not Be Displayed. John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:27 PM To: 'Tomcat Users List' Subject: RE: Greetings Did you get any errors? -Original Message- From: John Greco [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:23 PM To: '[EMAIL PROTECTED]' Subject: Greetings Greetings all I am new to the list. I just had a quick question as to getting Tomcat to process some Perl/CGI stuff. It runs great for my JSP stuff. I renamed the two files and edited the web.xml But it's a no go. Any help/ideas? Thanks John John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to disable info and warning messages at tomcat startup?
I have searched through the mailing list archive and the FAQ and I can't seem to fins a way to disable the INFO and WARNING messages that tomcat outputs at startup. Here are some of the messages Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Oct 31, 2003 1:43:54 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.27 Oct 31, 2003 1:43:55 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Depends-On Oct 31, 2003 1:43:55 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Depends-On Also, if anyone how to fix the WARNING: Duplicate name in Manifest: Depends-On message that would be much appreciated. -- Rick
RE: Greetings
Can you also post the relevant part of web.xml? -Original Message- From: John Greco [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:35 PM To: 'Tomcat Users List' Subject: RE: Greetings All I get is The Page Could Not Be Displayed. John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:27 PM To: 'Tomcat Users List' Subject: RE: Greetings Did you get any errors? -Original Message- From: John Greco [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:23 PM To: '[EMAIL PROTECTED]' Subject: Greetings Greetings all I am new to the list. I just had a quick question as to getting Tomcat to process some Perl/CGI stuff. It runs great for my JSP stuff. I renamed the two files and edited the web.xml But it's a no go. Any help/ideas? Thanks John John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to disable info and warning messages at tomcat startup?
This might work... http://marc.theaimsgroup.com/?l=tomcat-userm=106623436423859w=2 You can either replace the package names in the file, with org.apache.commons.modeler Or, just use the root category and set it to 'warn' -Original Message- From: Rick Sansburn [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 1:37 PM To: [EMAIL PROTECTED] Subject: how to disable info and warning messages at tomcat startup? I have searched through the mailing list archive and the FAQ and I can't seem to fins a way to disable the INFO and WARNING messages that tomcat outputs at startup. Here are some of the messages Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Oct 31, 2003 1:43:53 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Oct 31, 2003 1:43:54 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Starting service Tomcat-Standalone Apache Tomcat/4.1.27 Oct 31, 2003 1:43:55 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Depends-On Oct 31, 2003 1:43:55 PM java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Depends-On Also, if anyone how to fix the WARNING: Duplicate name in Manifest: Depends-On message that would be much appreciated. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Greetings
?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app /web-app servlet servlet-namecgi /servlet-name servlet-class org.apache.catalina. servlets.CGIServlet /servlet-class init-param param-name clientInputTimeout /param-name param-value100 /param-value /init-param init-param param-namedebug /param-name param-value6 /param-value /init-param init-param param-name cgiPathPrefix /param-name param-value WEB-INF/cgi /param-value /init-param load-on-startup5 /load-on-startup /servlet servlet-mapping servlet-namecgi /servlet-name url-pattern/cgi-bin/* /url-pattern /servlet-mapping John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:42 PM To: 'Tomcat Users List' Subject: RE: Greetings Can you also post the relevant part of web.xml? -Original Message- From: John Greco [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:35 PM To: 'Tomcat Users List' Subject: RE: Greetings All I get is The Page Could Not Be Displayed. John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:27 PM To: 'Tomcat Users List' Subject: RE: Greetings Did you get any errors? -Original Message- From: John Greco [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:23 PM To: '[EMAIL PROTECTED]' Subject: Greetings Greetings all I am new to the list. I just had a quick question as to getting Tomcat to process some Perl/CGI stuff. It runs great for my JSP stuff. I renamed the two files and edited the web.xml But it's a no go. Any help/ideas? Thanks John John Greco I.T. Department RAB Electric Manufacturing, Inc. 170 Ludlow Avenue Northvale, NJ 07647 Tel: 888 RAB-1000 Fax: 888 RAB-1232 Web: www.rabweb.com Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Realms JSPs
Hi, I'm kind of new to JSP programming. I was wondering, is there a way to extract the username used to log in(I am using JNDIRealm for authentication), and use that data within the web application from the perspective of the JSP? Any help would be great! Thanks. Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Realms JSPs
request.getRemoteUser() -Tim Hart, Justin wrote: Hi, I'm kind of new to JSP programming. I was wondering, is there a way to extract the username used to log in(I am using JNDIRealm for authentication), and use that data within the web application from the perspective of the JSP? Any help would be great! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]