RE: site slow problems
Well, I would guess that it loads quickly when you're not connected if it's cached on your disk. I've had intermittent problems with tomcat running slow before and usually re-deploying does the trick. If that fails I restart tomcat. If that still doesn't work I suggest checking that any connections you open (eg. for SQL Database or for file-writing) are closed. Of course I'm not sure that explains why it worked under RedHat but it's worth I try and RedHat can be a bit strange sometimes... Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OracleConnectionPoolDataSource creates too many connections
Hi All, My web application is using up all connections after running for a while. It's quite obvious that I'm not using the connection pool as it was designed to be used. The only way I can get these connections back is by restarting the Tomcat. I have ojdbc14.jar in the following directories: $CATALINA_HOME/commons/lib directory $CATALINA_HOME/webapps/myWebApp/WEB-INF/lib. This code creates my connection Pool private void createConnectionPool( ) { try { // Create a OracleConnectionPoolDataSource instance. connectionPoolDS = new OracleConnectionPoolDataSource( ); String url = jdbc:oracle:thin:@194.26.151.17:1521:mosaic; connectionPoolDS.setURL( url ); // Set the user name. connectionPoolDS.setUser(mosaicuser); // Set the password. connectionPoolDS.setPassword(mosa1c); } catch ( SQLException ex ) { // Catch SQL errors. //context.log( ex.toString( ) ); // log errors. } } This code creates a PooledConnection. - public static synchronized PooledConnection getPooledConnection(){ try{ pooledconn = connectionPoolDS.getPooledConnection(); }catch(SQLException sqle){ sqle.printStackTrace(); } return pooledconn; } In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); On an JSP Page: ServletContext ctx = getServletContext(); PooledConnection pc = (PooledConnection)ctx.getAttribute(pooled_conn); Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } Any help to solve this mystery would be very much appreciated. Kind Regards, Rudi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OracleConnectionPoolDataSource creates too many connections
Hi, You still need to create a connection cache with that datasource, so something like : OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource(); ... OracleConnectionCache oracleConnectionCache = new OracleConnectionCacheImpl(ocpds); You can then call the following to get connections from the pool : oracleConnectionCache.getConnection(); Be sure to close all your connection when you are done so they are returned to the pool. Ryan. -Original Message- From: Rudi Doku [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 09:04 To: Tomcat Users List Subject: OracleConnectionPoolDataSource creates too many connections Importance: High Hi All, My web application is using up all connections after running for a while. It's quite obvious that I'm not using the connection pool as it was designed to be used. The only way I can get these connections back is by restarting the Tomcat. I have ojdbc14.jar in the following directories: $CATALINA_HOME/commons/lib directory $CATALINA_HOME/webapps/myWebApp/WEB-INF/lib. This code creates my connection Pool private void createConnectionPool( ) { try { // Create a OracleConnectionPoolDataSource instance. connectionPoolDS = new OracleConnectionPoolDataSource( ); String url = jdbc:oracle:thin:@194.26.151.17:1521:mosaic; connectionPoolDS.setURL( url ); // Set the user name. connectionPoolDS.setUser(mosaicuser); // Set the password. connectionPoolDS.setPassword(mosa1c); } catch ( SQLException ex ) { // Catch SQL errors. //context.log( ex.toString( ) ); // log errors. } } This code creates a PooledConnection. - public static synchronized PooledConnection getPooledConnection(){ try{ pooledconn = connectionPoolDS.getPooledConnection(); }catch(SQLException sqle){ sqle.printStackTrace(); } return pooledconn; } In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); On an JSP Page: ServletContext ctx = getServletContext(); PooledConnection pc = (PooledConnection)ctx.getAttribute(pooled_conn); Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } Any help to solve this mystery would be very much appreciated. Kind Regards, Rudi - 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: OracleConnectionPoolDataSource creates too many connections
Probably you are not closing all the objects. It depends on pool used and app server but is a good idea (and more portable) to close all the objects. Many pools crash if you only close (return) the connections. after using the rs object (ResultSet) -- rs.close() after using the st object (Statement) -- st.close() after using the pst object (PreparedStatement) -- pst.close() after using ... (all the jdbc objects) You must close, to avoid errors, in reverse order as they were instantiated. Try it, i have no read your code and could be other problems. Hope this help Marcos -Mensaje original- De: Rudi Doku [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 03 de marzo de 2004 10:04 Para: Tomcat Users List Asunto: OracleConnectionPoolDataSource creates too many connections Importancia: Alta Hi All, My web application is using up all connections after running for a while. It's quite obvious that I'm not using the connection pool as it was designed to be used. The only way I can get these connections back is by restarting the Tomcat. I have ojdbc14.jar in the following directories: $CATALINA_HOME/commons/lib directory $CATALINA_HOME/webapps/myWebApp/WEB-INF/lib. This code creates my connection Pool private void createConnectionPool( ) { try { // Create a OracleConnectionPoolDataSource instance. connectionPoolDS = new OracleConnectionPoolDataSource( ); String url = jdbc:oracle:thin:@194.26.151.17:1521:mosaic; connectionPoolDS.setURL( url ); // Set the user name. connectionPoolDS.setUser(mosaicuser); // Set the password. connectionPoolDS.setPassword(mosa1c); } catch ( SQLException ex ) { // Catch SQL errors. //context.log( ex.toString( ) ); // log errors. } } This code creates a PooledConnection. - public static synchronized PooledConnection getPooledConnection(){ try{ pooledconn = connectionPoolDS.getPooledConnection(); }catch(SQLException sqle){ sqle.printStackTrace(); } return pooledconn; } In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); On an JSP Page: ServletContext ctx = getServletContext(); PooledConnection pc = (PooledConnection)ctx.getAttribute(pooled_conn); Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } Any help to solve this mystery would be very much appreciated. Kind Regards, Rudi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] **AVISO LEGAL** Este mensaje es privado y confidencial y solamente para la persona a la que va dirigido. Si usted ha recibido este mensaje por error, no debe revelar, copiar, distribuir o usarlo en ningún sentido. Le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. No hay renuncia a la confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal funcionamiento. Cualquier opinión expresada en este mensaje pertenece únicamente al autor remitente, y no representa necesariamente la opinión de Santander Central Hispano, a no ser que expresamente se diga y el remitente esté autorizado para hacerlo. Los correos electrónicos no son seguros, no garantizan la confidencialidad ni la correcta recepción de los mismos, dado que pueden ser interceptados, manipulados, destruidos, llegar con demora, incompletos, o con virus. Santander Central Hispano no se hace responsable de las alteraciones que pudieran hacerse al mensaje una vez enviado. Este mensaje sólo tiene una finalidad de información, y no debe interpretarse como una oferta de venta o de compra de valores ni de instrumentos financieros relacionados. En el caso de que el destinatario de este mensaje no consintiera la utilización del correo electrónico via Internet, rogamos lo ponga en nuestro conocimiento. **DISCLAIMER** This message is private and confidential and it is intended exclusively for the addressee. If you receive this message by mistake, you should not disseminate, distribute or copy this e-mail. Please inform the sender and delete the message and attachments from your system. No confidentiality nor any privilege regarding the information is waived or lost by any mistransmission or malfunction. Any views or opinions contained in this message are solely those of the author, and do not necessarily represent those
Re: RE: OracleConnectionPoolDataSource creates too many connections
Hi, I'm a newbie, and I need to learn more about connection pool. Can you suggest a tutorial or a web site where I can find more information? TIA Giuseppe Hi, You still need to create a connection cache with that datasource, so something like : OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource(); ... OracleConnectionCache oracleConnectionCache = new OracleConnectionCacheImpl(ocpds); You can then call the following to get connections from the pool : oracleConnectionCache.getConnection(); Be sure to close all your connection when you are done so they are returned to the pool. Ryan. -- Giuseppe Briotti [EMAIL PROTECTED] Alme Sol, curru nitido diem qui promis et celas aliusque et idem nasceris, possis nihil urbe Roma visere maius. (Orazio) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where to store log files from packed WAR file apps
Hello Now that I've got my Ant build/deploy scripts working nicely, I'm tempted to start running my applications out of packed WAR files. I cannot figure out if there is a *portable* way to specify paths for where my Log4J log files should be saved. I assume I could use the 'catalina.home' property to save the logs under the Tomcat installation directory - but that's Tomcat specific. Has anyone got around this, somehow, or is it a case of getting Ant to glue things with some hard-coded values at build time? Many thanks for any contributions. Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegExp issues with Tomcat 5
On a side note, try using bind variables (prepared statements) in your sql statements. This way, you don't have to escape anything, gain performance and avoid sql-injection attacks. Slavik. -Original Message- From: Karl Coleman [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 10:01 PM To: Tomcat Users List Subject: RE: RegExp issues with Tomcat 5 Either. I'll look at the java.util.regex one. I posted at taglib-user earlier and still waiting for response. Thanks again. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 2:52 PM To: Tomcat Users List Subject: RE: RegExp issues with Tomcat 5 Hi, Is there a regexp library people recommend? I saw there is one on the Jakarta site. Library in general or JSP tag library specifically? I've been fine with java.util.regex, which I think requires JDK 1.4. If you must use a JDK older than 1.4, use jakarta-regexp (which tomcat uses). For a JSP tag library to handle regular expressions: I don't know and don't have time to research, but it does seem Glenn is actively working on the regexp taglib and I can't imagine its next release not working on tomcat 5. As I said previously, ask on taglib-user, and I'm sure he'll respond. 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] --- This message contains information that may be confidential or privileged. If you are not the intended recipient, you may not use, copy or disclose to anyone any of the information in this message. If you have received this message and are not the intended recipient, kindly notify the sender and delete this message from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
addShutdownHook in Tomcat does not seem to get called on shutdown
Hi, I added a shutdown hook in my app, which works fine when I run it in standalone mode, but which does not seem to get called when Tomcat stops. The shutdown hook operates according to following the following semantics: __ class MyApp{ public void doSomething(){ ShutdownHook sdh = new ShutdownHook(); synchronized(Runtime.getRuntime()){ Runtime.getRuntime().addShutdownHook(sdh); } // //do something here // logger.info(Finished doing something); //remove shutdown hook once process has finished sdh.setFinished(); if (!sdh.isInitialised()){ synchronized(Runtime.getRuntime()){ Runtime.getRuntime().removeShutdownHook(sdh); } } } private class ShutdownHook extends Thread { private boolean INITIALISED = false; private boolean FINISHED = false; public void run() { this.INITIALISED = true; this.setPriority(2); logger.debug(Shutdown hook: shutdown thread started - a shutdown has been requested); out : while (true) { //keep on looping until the claaing app has finished synchronized(this.FINISHED){ if (this.FINISHED == true) { logger.debug(Shutdown hook: parent program finished, allowing shutdown process to complete); return; } } } } public synchronized boolean isInitialised() { return this.INITIALISED; } public synchronized void setFinished() { this.FINISHED = true; } } } __ The log does not show any trace of the shutdown hook being called, and the process does indeed not complete before Tomcat shuts down, which to me sounds like the hook is not getting registered properly for some reason. Any ideas why this might be happening? I am running Tomcat 4.1.18 on Windows 2K (no advice about switching to Linux please). Thanks, Elie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where to store log files from packed WAR file apps
Might be wrong on this but why not setup environment variables and reflect those in ant? That way you should be portable, providing those env vars exist. BTW, take off the tomcat greeting page from your machine ;) -Original Message- From: Harry Mantheakis [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 09:34 To: Tomcat Users List Subject: Where to store log files from packed WAR file apps Hello Now that I've got my Ant build/deploy scripts working nicely, I'm tempted to start running my applications out of packed WAR files. I cannot figure out if there is a *portable* way to specify paths for where my Log4J log files should be saved. I assume I could use the 'catalina.home' property to save the logs under the Tomcat installation directory - but that's Tomcat specific. Has anyone got around this, somehow, or is it a case of getting Ant to glue things with some hard-coded values at build time? Many thanks for any contributions. Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
RE: OracleConnectionPoolDataSource creates too many connections
Possible problems could be: - Connnections not getting closed - The max concurrent request for tomcat had been reached (check the number of connections in server.xml) - AC -Original Message- From: Rudi Doku [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:34 PM To: Tomcat Users List Subject: OracleConnectionPoolDataSource creates too many connections Importance: High Hi All, My web application is using up all connections after running for a while. It's quite obvious that I'm not using the connection pool as it was designed to be used. The only way I can get these connections back is by restarting the Tomcat. I have ojdbc14.jar in the following directories: $CATALINA_HOME/commons/lib directory $CATALINA_HOME/webapps/myWebApp/WEB-INF/lib. This code creates my connection Pool private void createConnectionPool( ) { try { // Create a OracleConnectionPoolDataSource instance. connectionPoolDS = new OracleConnectionPoolDataSource( ); String url = jdbc:oracle:thin:@194.26.151.17:1521:mosaic; connectionPoolDS.setURL( url ); // Set the user name. connectionPoolDS.setUser(mosaicuser); // Set the password. connectionPoolDS.setPassword(mosa1c); } catch ( SQLException ex ) { // Catch SQL errors. //context.log( ex.toString( ) ); // log errors. } } This code creates a PooledConnection. - public static synchronized PooledConnection getPooledConnection(){ try{ pooledconn = connectionPoolDS.getPooledConnection(); }catch(SQLException sqle){ sqle.printStackTrace(); } return pooledconn; } In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); On an JSP Page: ServletContext ctx = getServletContext(); PooledConnection pc = (PooledConnection)ctx.getAttribute(pooled_conn); Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } Any help to solve this mystery would be very much appreciated. Kind Regards, Rudi - 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: addShutdownHook in Tomcat does not seem to get called on shutdown
Hi There, Why not use the ServletContextListener interface to do all of your cleanup stuff when the contextDestroyed method is called ? Pete -Original Message- From: Elie Medeiros [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 10:44 To: [EMAIL PROTECTED] Subject: addShutdownHook in Tomcat does not seem to get called on shutdown Hi, I added a shutdown hook in my app, which works fine when I run it in standalone mode, but which does not seem to get called when Tomcat stops. The shutdown hook operates according to following the following semantics: __ class MyApp{ public void doSomething(){ ShutdownHook sdh = new ShutdownHook(); synchronized(Runtime.getRuntime()){ Runtime.getRuntime().addShutdownHook(sdh); } // //do something here // logger.info(Finished doing something); //remove shutdown hook once process has finished sdh.setFinished(); if (!sdh.isInitialised()){ synchronized(Runtime.getRuntime()){ Runtime.getRuntime().removeShutdownHook(sdh); } } } private class ShutdownHook extends Thread { private boolean INITIALISED = false; private boolean FINISHED = false; public void run() { this.INITIALISED = true; this.setPriority(2); logger.debug(Shutdown hook: shutdown thread started - a shutdown has been requested); out : while (true) { //keep on looping until the claaing app has finished synchronized(this.FINISHED){ if (this.FINISHED == true) { logger.debug(Shutdown hook: parent program finished, allowing shutdown process to complete); return; } } } } public synchronized boolean isInitialised() { return this.INITIALISED; } public synchronized void setFinished() { this.FINISHED = true; } } } __ The log does not show any trace of the shutdown hook being called, and the process does indeed not complete before Tomcat shuts down, which to me sounds like the hook is not getting registered properly for some reason. Any ideas why this might be happening? I am running Tomcat 4.1.18 on Windows 2K (no advice about switching to Linux please). Thanks, Elie - 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]
GlobalNamingResources global how?
Could someone please help and explain to stupid me? I'm developing using ant deploying/undeploying a lot at the moment and I want to have access to my MySql connectionpool that I've registerd as a GlobalNamingResource in server.xml. The problem is that I can't access it (Cannot load JDBC driver class 'null') when the app I'm working on is not registered as a Context in server.xml but rather deplyed with the Manager webb application. I've also registered an exact copy of the resource with the /examples context to verify that the connection parameters and the java code is ok. So that's not the problem. (but accessing the global resource didn't work there ither...) In the web.xml for the app I'm developing I have the resource-ref set up like: resource-ref res-ref-namejdbc/mysql_devdb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the Resource under GlobalNamingResources is named jdbc/mysql_tdb. Question: Is what I'm trying even possible, or do I *have* to put the app I'm developing as a Context in server.xml? Thanks for any pointers! /David Apache Tomcat/4.1.24 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: OracleConnectionPoolDataSource creates too many connections
You need to use the .close method for every connection. If your new connection is called conn then it's conn.close(); Check your max connections in server.xml (probably for port 8009) but if you're not closing your connections this will only delay a crash not stop it. I suggest the java.sun.com site for info on Java classes and methods. You could use this link: http://java.sun.com/j2se/1.3/docs/api/ Adam. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GlobalNamingResources global how?
sorry, correction: the Resource under GlobalNamingResources is named jdbc/mysql_devdb. David Tiselius wrote: Could someone please help and explain to stupid me? I'm developing using ant deploying/undeploying a lot at the moment and I want to have access to my MySql connectionpool that I've registerd as a GlobalNamingResource in server.xml. The problem is that I can't access it (Cannot load JDBC driver class 'null') when the app I'm working on is not registered as a Context in server.xml but rather deplyed with the Manager webb application. I've also registered an exact copy of the resource with the /examples context to verify that the connection parameters and the java code is ok. So that's not the problem. (but accessing the global resource didn't work there ither...) In the web.xml for the app I'm developing I have the resource-ref set up like: resource-ref res-ref-namejdbc/mysql_devdb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the Resource under GlobalNamingResources is named jdbc/mysql_tdb. Question: Is what I'm trying even possible, or do I *have* to put the app I'm developing as a Context in server.xml? Thanks for any pointers! /David Apache Tomcat/4.1.24 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: addShutdownHook in Tomcat does not seem to get called on shutdown
mainly because i was trying to write a single class for both the tomcat and standalone versions, and also to avoid making the business logic dependent on a web environment. (ie to provide fail-safeness within the business logic, rather than it being an external service that needs to be checked) Elie Hi There, Why not use the ServletContextListener interface to do all of your cleanup stuff when the contextDestroyed method is called ? Pete -Original Message- From: Elie Medeiros [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 10:44 To: [EMAIL PROTECTED] Subject: addShutdownHook in Tomcat does not seem to get called on shutdown Hi, I added a shutdown hook in my app, which works fine when I run it in standalone mode, but which does not seem to get called when Tomcat stops. The shutdown hook operates according to following the following semantics: __ class MyApp{ public void doSomething(){ ShutdownHook sdh = new ShutdownHook(); synchronized(Runtime.getRuntime()){ Runtime.getRuntime().addShutdownHook(sdh); } // //do something here // logger.info(Finished doing something); //remove shutdown hook once process has finished sdh.setFinished(); if (!sdh.isInitialised()){ synchronized(Runtime.getRuntime()){ Runtime.getRuntime().removeShutdownHook(sdh); } } } private class ShutdownHook extends Thread { private boolean INITIALISED = false; private boolean FINISHED = false; public void run() { this.INITIALISED = true; this.setPriority(2); logger.debug(Shutdown hook: shutdown thread started - a shutdown has been requested); out : while (true) { //keep on looping until the claaing app has finished synchronized(this.FINISHED){ if (this.FINISHED == true) { logger.debug(Shutdown hook: parent program finished, allowing shutdown process to complete); return; } } } } public synchronized boolean isInitialised() { return this.INITIALISED; } public synchronized void setFinished() { this.FINISHED = true; } } } __ The log does not show any trace of the shutdown hook being called, and the process does indeed not complete before Tomcat shuts down, which to me sounds like the hook is not getting registered properly for some reason. Any ideas why this might be happening? I am running Tomcat 4.1.18 on Windows 2K (no advice about switching to Linux please). Thanks, Elie - 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: OracleConnectionPoolDataSource creates too many connections
Really, I have looked in web.xml and I can't seem to locate anything that is related to database connections. The only settings related to connections that I can see are related to JDBC realms. -Original Message- From: Arnab Chakravarty [mailto:[EMAIL PROTECTED] Sent: 03 March, 2004 11:53 AM To: Tomcat Users List Subject: RE: OracleConnectionPoolDataSource creates too many connections Possible problems could be: - Connnections not getting closed - The max concurrent request for tomcat had been reached (check the number of connections in server.xml) - AC -Original Message- From: Rudi Doku [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:34 PM To: Tomcat Users List Subject: OracleConnectionPoolDataSource creates too many connections Importance: High Hi All, My web application is using up all connections after running for a while. It's quite obvious that I'm not using the connection pool as it was designed to be used. The only way I can get these connections back is by restarting the Tomcat. I have ojdbc14.jar in the following directories: $CATALINA_HOME/commons/lib directory $CATALINA_HOME/webapps/myWebApp/WEB-INF/lib. This code creates my connection Pool private void createConnectionPool( ) { try { // Create a OracleConnectionPoolDataSource instance. connectionPoolDS = new OracleConnectionPoolDataSource( ); String url = jdbc:oracle:thin:@194.26.151.17:1521:mosaic; connectionPoolDS.setURL( url ); // Set the user name. connectionPoolDS.setUser(mosaicuser); // Set the password. connectionPoolDS.setPassword(mosa1c); } catch ( SQLException ex ) { // Catch SQL errors. //context.log( ex.toString( ) ); // log errors. } } This code creates a PooledConnection. - public static synchronized PooledConnection getPooledConnection(){ try{ pooledconn = connectionPoolDS.getPooledConnection(); }catch(SQLException sqle){ sqle.printStackTrace(); } return pooledconn; } In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); On an JSP Page: ServletContext ctx = getServletContext(); PooledConnection pc = (PooledConnection)ctx.getAttribute(pooled_conn); Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } Any help to solve this mystery would be very much appreciated. Kind Regards, Rudi - 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: OracleConnectionPoolDataSource creates too many connections
Hi Ryan, Thanks for the solution. I believe it's resolved my problem. Rudi -Original Message- From: Ryan Lissack [mailto:[EMAIL PROTECTED] Sent: 03 March, 2004 10:15 AM To: 'Tomcat Users List' Subject: RE: OracleConnectionPoolDataSource creates too many connections Hi, You still need to create a connection cache with that datasource, so something like : OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource(); ... OracleConnectionCache oracleConnectionCache = new OracleConnectionCacheImpl(ocpds); You can then call the following to get connections from the pool : oracleConnectionCache.getConnection(); Be sure to close all your connection when you are done so they are returned to the pool. Ryan. -Original Message- From: Rudi Doku [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 09:04 To: Tomcat Users List Subject: OracleConnectionPoolDataSource creates too many connections Importance: High Hi All, My web application is using up all connections after running for a while. It's quite obvious that I'm not using the connection pool as it was designed to be used. The only way I can get these connections back is by restarting the Tomcat. I have ojdbc14.jar in the following directories: $CATALINA_HOME/commons/lib directory $CATALINA_HOME/webapps/myWebApp/WEB-INF/lib. This code creates my connection Pool private void createConnectionPool( ) { try { // Create a OracleConnectionPoolDataSource instance. connectionPoolDS = new OracleConnectionPoolDataSource( ); String url = jdbc:oracle:thin:@194.26.151.17:1521:mosaic; connectionPoolDS.setURL( url ); // Set the user name. connectionPoolDS.setUser(mosaicuser); // Set the password. connectionPoolDS.setPassword(mosa1c); } catch ( SQLException ex ) { // Catch SQL errors. //context.log( ex.toString( ) ); // log errors. } } This code creates a PooledConnection. - public static synchronized PooledConnection getPooledConnection(){ try{ pooledconn = connectionPoolDS.getPooledConnection(); }catch(SQLException sqle){ sqle.printStackTrace(); } return pooledconn; } In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); On an JSP Page: ServletContext ctx = getServletContext(); PooledConnection pc = (PooledConnection)ctx.getAttribute(pooled_conn); Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } Any help to solve this mystery would be very much appreciated. Kind Regards, Rudi - 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: re-newbie help
You are probably using the invoker http://jakarta.apache.org/tomcat/faq/misc.html#invoker -Tim crombie wrote: hi, i'm re-introducing myself to tomcat after 2 yrs. for some reason i cannot get my servlet apps to run. i installed tomcat, got the welcome screen at port 8080 but when i put my class files in the /webapps dir, it won't run. um, can i get some pointers on where to get docs and etc. the docs at sun.com are not doing me any good. does anyone have tomcat set up with intellj idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cgi-bin
You have the servlet declaration but you are missing the servlet mapping. See conf/web.xml for an example/ -Tim George Hester wrote: In my webapp in /WEB-INF/lib I put servlets-cgi.jar. I then added just this to the web.xml in \WEB-INF servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param load-on-startup5/load-on-startup /servlet Then I made a \cgi-bin folder and put a cgi file in there I know works over the web. Call it test.cgi. I then tried http://localhost/jsp-files/cgi-bin/test.cgi C\Inetpub\jsp-files The reuslt was the cgi code returned as a text file. What did I do wrong? Can I get this to work? ActiveState Perl is installed in C:\Perl. Is there a test different than what I have done to see if what I set up works? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Active Session Count
Hello All, I try to get the number of active sessions for a particular application with the getActiveSessions(). My problem is, that I get allways a 0 back. What am I doing wrong? Here is the sourcecode : StandardManager manager = new StandardManager(); manager.setPathname(/app); System.out.println ( +manager.getActiveSessions()+ / +manager.getPathname()+ / +manager.getSessionCounter()); Kind Regards, Andre Jahn -- Mr. Andre Jahn Jahn Software Consulting URL: www.JahnSoftware.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need help regarding tomcat configuration to support (https)
Hi, We need to configure SSL on Tomcat4 server. The web service has to authenticate the client using certificate. We followed the document which has been attached along this mail. 1. If we use the admin tool to add new connecter for https (port 8443) tomcat is starting properly but the same https:\\localhost:8443 is not working, I mean the page cannot be displayed error message is coming. 2. If we modify the server.xml manually then also we are getting the same problem. 3. If we comment the non-SSL part in the server.xml after step 2, the page is displaying but the tomcat is not starting properly. Our requirement is that, we have to make 8443 as default port and have to remove the 8080 support. Please help me out to solve this problem. Thanks Regards Saravanan Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache2/mod_jk/tomcat4 - file download / special characters in filename
Problem: In my tomcat webapp a servlet manages a filedownload. Clicking on a file-link results in the browser's save as dialog. Using tomcat alone (port 8080) everything works fine. Special characters (like German umlaut) are shown in ISO-8859-1. Apache2/mod_jk seems to change the charset to UTF-8, e.g. täst.txt looks like tät.txt. Code: response.setHeader(Content-Disposition, attachment; filename= + file.getName()); response.setContentLength((int)file.length()); response.setContentType(application/octet-stream); response.setHeader(Content-Transfer-Encoding, binary); I tried also: response.setContentType(application/octet-stream; charset=ISO-8859-1); or String tmpName = new String(f.getName().getBytes(),ISO-8859-1); response.setHeader(Content-Disposition, attachment; charset=ISO8859-1; filename=+tmpName); or response.setHeader(Content-Transfer-Encoding, ISO-8859-1); Configuration: - Suse 8.2 - Apache2.0.48 - Tomcat4.1.18 - mod_jk - $tomcat_home/bin/catalina.sh: export CATALINA_OPTS=-Dfile.encoding=ISO-8859-1 -Duser.language=de -Duser.country=DE Who can help ? Thank's in advance ! Andreas _ Schützen Sie Ihren Posteingang vor unerwünschten E-Mails. http://www.msn.de/antispam/prevention/junkmailfilter Jetzt Hotmail-Junk-Filter aktivieren! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems Invalidating session
Hi All, I create a session when a user is authenticated using the following code: HttpSession session = request.getSession(true); I do this in a loginservlet When a user quits the application, there are redirected to a LogoutServlet which redirects them to a jsp page, logout.jsp. I have one line of code in logout.jsp : session.invalidate(). Problem is that when I use the tomcat manager application to view the number of sessions connected to the application, there is still a session, which in my opinion, means that the session has not been invalidated. Please help. Met vriendelijke groet/Kind Regards, Experian Nederland B.V. Rudi Doku Database Developer Verheeskade 25 2521 BE Den Haag phone: +31 (0) 70 440 4423 fax: +31 (0) 70 440 4040 e-mail: [EMAIL PROTECTED] http://www.experian.nl === Information in this e-mail and any attachments are confidential and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this e-mail. Experian Netherlands BV. Registered office: Verheeskade 25, 2521 BE The Hague. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to get or build a mod_jk module for Cygwin Apache ?
Hello, i try to configure Apache 1.3.xx from cygwin and Tomcat 5.0 from windows to work together with JK. But i have a problem getting a binary version of mod_jk. At this URL : http://apache.crihan.fr/dist/jakarta/tomcat-connectors/jk/binaries/ the freebsd directory is empty. For cygwin i don't know if i must use a win32 mod_jk.dll (version 1 or 2) or build a mod_jk.so. I tried to build it but the make command failed. Flo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems Invalidating session - II
Following my previous posting, I think I need to set the scope of my session to application. How can I do this? Met vriendelijke groet/Kind Regards, Experian Nederland B.V. Rudi Doku Database Developer Verheeskade 25 2521 BE Den Haag phone: +31 (0) 70 440 4423 fax: +31 (0) 70 440 4040 e-mail: [EMAIL PROTECTED] http://www.experian.nl === Information in this e-mail and any attachments are confidential and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this e-mail. Experian Netherlands BV. Registered office: Verheeskade 25, 2521 BE The Hague. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems Invalidating session - II
I recommend reading chapters 9 13. They will help you get a good understanding of how data get's saved across state in a server side java app. http://pdf.coreservlets.com/ On Wednesday 03 March 2004 08:22 am, Rudi Doku wrote: Following my previous posting, I think I need to set the scope of my session to application. How can I do this? Met vriendelijke groet/Kind Regards, Experian Nederland B.V. Rudi Doku Database Developer Verheeskade 25 2521 BE Den Haag phone: +31 (0) 70 440 4423 fax: +31 (0) 70 440 4040 e-mail: [EMAIL PROTECTED] http://www.experian.nl === Information in this e-mail and any attachments are confidential and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this e-mail. Experian Netherlands BV. Registered office: Verheeskade 25, 2521 BE The Hague. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems running JSPs--fixed
I had a bunch of jar files under $JAVA_HOME/jre/lib/ext like IBM xml4j parser etc. I removed them all, set $CLASSPATH to blank, and set $CATALINA_HOME in /etc/profile. This fixed my problem. Vijay Kandy -Original Message- From: Vijay Kandy Sent: Friday, February 27, 2004 2:11 PM To: 'Tomcat Users List' Subject: RE: Problems running JSPs Theres no jar file associated with examples webapp but I put examples/WEB-INF/classes in classpath but that did not help - I still get the same stack trace. Any other suggestions please? Vijay Kandy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 27, 2004 12:02 PM To: Tomcat Users List Subject: Re: Problems running JSPs Have you added the jar that contains the num.NumberGuessBean under the examples/WEB-INF/lib Or add the num.NumberGuessBean to the examples/WEB-INF/classes RS Vijay Kandy [EMAIL PROTECTED]To: 'Tomcat Users List' com [EMAIL PROTECTED] cc: 02/27/2004 10:57 Subject: Problems running JSPs AM Please respond to Tomcat Users List Hello All, I am having trouble running JSPs in examples context (that with Tomcat). Below is my stack trace: org.apache.jasper.JasperException: Unable to compile class for JSP/var/tomcat/work/Standalone/localhost/examples/_0002fjsp_0002fnum_0002fnu mguess_0002ejspnumguess_jsp_0.java:15: Class num.NumberGuessBean not found in import. import num.NumberGuessBean; ^ 1 error at org.apache.jasper.compiler.Compiler.compile(Compiler.java) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java) I thought it was something to do with classpath and set JAVA_HOME, CATALINA_HOME and even added all the jars in the classpath. Also, I followed some suggestions found in the archives including setting _RUN atributes, upgraded from Tomcat 4.1.24, 4.1.27, 4.1.30 Please let me know if there is ANYTHING else that I can do. The environment is Red hat linux 2.4.3-6smp #1, PII, JDK 1.3.1 Thank you, Vijay Kandy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission is intended to be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. - 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: addShutdownHook in Tomcat does not seem to get called on shutdown
Hi, You're probably removing the shutdown hook too early. Why are you removing it at all? Yoav Shapira Millennium ChemInformatics -Original Message- From: Elie Medeiros [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 5:44 AM To: [EMAIL PROTECTED] Subject: addShutdownHook in Tomcat does not seem to get called on shutdown Hi, I added a shutdown hook in my app, which works fine when I run it in standalone mode, but which does not seem to get called when Tomcat stops. The shutdown hook operates according to following the following semantics: ___ ___ class MyApp{ public void doSomething(){ ShutdownHook sdh = new ShutdownHook(); synchronized(Runtime.getRuntime()){ Runtime.getRuntime().addShutdownHook(sdh); } // //do something here // logger.info(Finished doing something); //remove shutdown hook once process has finished sdh.setFinished(); if (!sdh.isInitialised()){ synchronized(Runtime.getRuntime()){ Runtime.getRuntime().removeShutdownHook(sdh); } } } private class ShutdownHook extends Thread { private boolean INITIALISED = false; private boolean FINISHED = false; public void run() { this.INITIALISED = true; this.setPriority(2); logger.debug(Shutdown hook: shutdown thread started - a shutdown has been requested); out : while (true) { //keep on looping until the claaing app has finished synchronized(this.FINISHED){ if (this.FINISHED == true) { logger.debug(Shutdown hook: parent program finished, allowing shutdown process to complete); return; } } } } public synchronized boolean isInitialised() { return this.INITIALISED; } public synchronized void setFinished() { this.FINISHED = true; } } } ___ ___ The log does not show any trace of the shutdown hook being called, and the process does indeed not complete before Tomcat shuts down, which to me sounds like the hook is not getting registered properly for some reason. Any ideas why this might be happening? I am running Tomcat 4.1.18 on Windows 2K (no advice about switching to Linux please). Thanks, Elie - 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: Active Session Count
Hi, I don't know, but consider using an HttpSessionListener to track this, instead of tomcat's Manager, for a portable solution. Yoav Shapira Millennium ChemInformatics -Original Message- From: Andre Jahn [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 7:32 AM To: [EMAIL PROTECTED] Subject: Active Session Count Hello All, I try to get the number of active sessions for a particular application with the getActiveSessions(). My problem is, that I get allways a 0 back. What am I doing wrong? Here is the sourcecode : StandardManager manager = new StandardManager(); manager.setPathname(/app); System.out.println ( +manager.getActiveSessions()+ / +manager.getPathname()+ / +manager.getSessionCounter()); Kind Regards, Andre Jahn -- Mr. Andre Jahn Jahn Software Consulting URL: www.JahnSoftware.de - 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: Problems Invalidating session
Hi, session.invalidate(). Problem is that when I use the tomcat manager application to view the number of sessions connected to the application, there is still a session, which in my opinion, means that the session has not been invalidated. Your opinion is wrong. The session objects aren't destroyed as soon as they're invalidated. Ben recommended the proper Servlet Spec chapters if you're interested in the details. 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]
problem in configuring a Datasource in Tomcat 5.0
Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 01) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard ContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:509) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) I attach my server.xml, anyone can help? Thanx in advance and regards Marco !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to
RE: Where to store log files from packed WAR file apps
Hi, Might be wrong on this but why not setup environment variables and reflect those in ant? That way you should be portable, providing those env vars exist. BTW, take off the tomcat greeting page from your machine ;) That's one possible solution. Another is to setup a build.properties file with tokens, e.g. @logfile@ and have the ant deploy script populate your web.xml (or whatever configuration file you want) with the appropriate value of this token. (See Ant's copy filter token mechanisms). Yet another approach, and probably the most enterprise like, is to specify the log file location via JNDI. Have an env-entry-ref in your web.xml (this is constant, will not changed, so you don't need to change your WAR), and have the server administrator fill in the appropriate value for their server (e.g. in server.xml for tomcat). 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]
FW: problem in configuring a Datasource in Tomcat 5.0
Hi all, Do not want to spam, I forgot to mention that I was trying to connect to a MYSQL database running on my machine I found that there was a bug in previous releases regarding configuration of datasource, so I created The datasource as global resource Thanx and regards marco -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 14:10 To: '[EMAIL PROTECTED]' Subject: problem in configuring a Datasource in Tomcat 5.0 Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 01) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard ContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:509) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) I attach my server.xml, anyone can help? Thanx in advance and regards Marco !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB
RE: problem in configuring a Datasource in Tomcat 5.0
Hi, Try moving your TestDB datasource to your context declaration and out of GlobalNamingResources. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 9:10 AM To: [EMAIL PROTECTED] Subject: problem in configuring a Datasource in Tomcat 5.0 Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 01) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard ContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:509) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:151) I attach my server.xml, anyone can help? Thanx in advance and regards Marco 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: Problems Invalidating session
Actually, the link was to the online version of the core servlets book. I found it was a little easier to digest at first but in the end, there is no substitute for reading the actual specs. http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html On Wednesday 03 March 2004 09:07 am, Shapira, Yoav wrote: Hi, session.invalidate(). Problem is that when I use the tomcat manager application to view the number of sessions connected to the application, there is still a session, which in my opinion, means that the session has not been invalidated. Your opinion is wrong. The session objects aren't destroyed as soon as they're invalidated. Ben recommended the proper Servlet Spec chapters if you're interested in the details. 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RegExp issues with Tomcat 5
Karl, Using the regexp tag library I think it is still at version 1.0. Because INSERT into tablename (field1) values ('I CAN'T DO THIS') generates an error in SQL Server. If you use a PreparedStatement, then you can send any string to the statement object and it will do it's own escaping. -chris signature.asc Description: PGP signature signature.asc Description: OpenPGP digital signature
Re: Global URL Redirect Tomcat 5
Nathan, I am trying to migrate to Tomcat 5 from a different app server. Is there a way to define url redirects? i.e. if a page moved off your server to a different location and you do not want to make a redirect page. You could write a servlet that's mapped to /*, and then have that servlet replace the hostname (and part of the path?), then send a redirect back to the browser. Would this meet your needs? -chris signature.asc Description: PGP signature signature.asc Description: OpenPGP digital signature
Re: ClassNotDefError problems within JAR files under Tomcat 4.1.12
Nathan, I am developing an imaging servlet under Tomcat 4.1.12 using JAI 1.1.2. Every time I update my code to add new features, it will return with a NoClassDefFoundError until I restart Tomcat. At that point, it finds the 'missing' class and everything works as expected. I'm no expert on JAI, but I believe that it uses JNI and a native library to do some of it's dirty work. If that's the case, then you should make sure that the JAI JAR file and native library are loaded by a classloader outside (higher than) your webapp. There's documentation on the Tomcat site (and probably other servlet containers, too) that says that native libraries should only be loaded one time. IF they get loaded multiple times (as would happen if they were loaded by the webapp), strange behavior can result. Try putting jai.jar (or whatever) into TOMCAT_HOME/common/lib and jai.so (or whatever) in a convenient place where it can be found. (Sorry, dunno where that might be. Anyone else?) Hope that helps, -chris signature.asc Description: PGP signature signature.asc Description: OpenPGP digital signature
RE: addShutdownHook in Tomcat does not seem to get called on shutdown
A-ha - it seems the shutdown hook does not get called when tomcat is run as a service, but does seems to get called when run as standalone. In that case it would seem that the problem would lie with the way the service is configured (ie what it does to stop) compared to the standalone version, I haven't had time to look at that yet. I was removing the shutdown hook because once the sensitive task has run, it doesn't need to be there anymore - the idea was to allow the app to exit gracefully if it was doing something sensitive (eg inserting a bunch of related data into a DB) by looping through the shutdown thread until the business object was done, rather than shutdown the app in a way which might affect data integrity. I was trying to avoid a flurry of unnecessary shutdown hooks staying registered even though the calling logic had long since completed. I'm not sure how good an idea it is to use a shutdown hook to do this in tomcat though - I'm not sure how things work when the context gets destroyed. From what I understand, in theory all the objects required by the logic should be keep alive until all references to them disappear (from the object requesting the shutdown hook for instance). In practice though, I get a lifecycle error: CL stopped Exception from tomcat on shutdown and the shutdown hook in my example keeps on running in an infinite loop. I read somewhere that it had to do with classloader issues in some version of tomcat 4 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3888), but i'm not sure that applies here. In any case it would seem that the shutdown hook might not be the best solution here, and that i will probably have to provide separate standalone and tomcat wrappers to the business logic :( oh well... thanks for your help Elie Hi, You're probably removing the shutdown hook too early. Why are you removing it at all? Yoav Shapira Millennium ChemInformatics -Original Message- From: Elie Medeiros [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 5:44 AM To: [EMAIL PROTECTED] Subject: addShutdownHook in Tomcat does not seem to get called on shutdown Hi, I added a shutdown hook in my app, which works fine when I run it in standalone mode, but which does not seem to get called when Tomcat stops. The shutdown hook operates according to following the following semantics: ___ ___ class MyApp{ public void doSomething(){ ShutdownHook sdh = new ShutdownHook(); synchronized(Runtime.getRuntime()){ Runtime.getRuntime().addShutdownHook(sdh); } // //do something here // logger.info(Finished doing something); //remove shutdown hook once process has finished sdh.setFinished(); if (!sdh.isInitialised()){ synchronized(Runtime.getRuntime()){ Runtime.getRuntime().removeShutdownHook(sdh); } } } private class ShutdownHook extends Thread { private boolean INITIALISED = false; private boolean FINISHED = false; public void run() { this.INITIALISED = true; this.setPriority(2); logger.debug(Shutdown hook: shutdown thread started - a shutdown has been requested); out : while (true) { //keep on looping until the claaing app has finished synchronized(this.FINISHED){ if (this.FINISHED == true) { logger.debug(Shutdown hook: parent program finished, allowing shutdown process to complete); return; } } } } public synchronized boolean isInitialised() { return this.INITIALISED; } public synchronized void setFinished() { this.FINISHED = true; } } } ___ ___ The log does not show any trace of the shutdown hook being called, and the process does indeed not complete before Tomcat shuts down, which to me sounds like the hook is not getting registered properly for some reason. Any ideas why this might be happening? I am running Tomcat 4.1.18 on Windows 2K (no advice about switching to Linux please). Thanks, Elie - 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
Re: apache2/mod_jk/tomcat4 - file download / special characters in filename
try converting the filename to ISO-8859-1 as well eg filename = new String(file.getName(), ISO-8859-1); Your Code (modified): response.setHeader(Content-Disposition, attachment; filename= + new String(file.getName(), ISO-8859-1)); response.setContentLength((int)file.length()); response.setContentType(application/octet-stream); response.setHeader(Content-Transfer-Encoding, binary); Hope that helps. John Sidney-Woollett Andreas Hartstack said: Problem: In my tomcat webapp a servlet manages a filedownload. Clicking on a file-link results in the browser's save as dialog. Using tomcat alone (port 8080) everything works fine. Special characters (like German umlaut) are shown in ISO-8859-1. Apache2/mod_jk seems to change the charset to UTF-8, e.g. täst.txt looks like tät.txt. Code: response.setHeader(Content-Disposition, attachment; filename= + file.getName()); response.setContentLength((int)file.length()); response.setContentType(application/octet-stream); response.setHeader(Content-Transfer-Encoding, binary); I tried also: response.setContentType(application/octet-stream; charset=ISO-8859-1); or String tmpName = new String(f.getName().getBytes(),ISO-8859-1); response.setHeader(Content-Disposition, attachment; charset=ISO8859-1; filename=+tmpName); or response.setHeader(Content-Transfer-Encoding, ISO-8859-1); Configuration: - Suse 8.2 - Apache2.0.48 - Tomcat4.1.18 - mod_jk - $tomcat_home/bin/catalina.sh: export CATALINA_OPTS=-Dfile.encoding=ISO-8859-1 -Duser.language=de -Duser.country=DE Who can help ? Thank's in advance ! Andreas _ Schützen Sie Ihren Posteingang vor unerwünschten E-Mails. http://www.msn.de/antispam/prevention/junkmailfilter Jetzt Hotmail-Junk-Filter aktivieren! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reclaiming memory problem PS
Jerald, session.setMaxInactiveTimeout(-1); Yeah, this is a bad idea. The session will never go away by itself. This *requires* the user to press a logout button, and for you to explicitly call session.invalidate(). Users frequently do not log themselves out, and their sessions will never die. You will eventually run out of memory. If you need a long timeout, just make it really long (like a couple of hours). There's usually no good reason to make it -1. PS is the session time out linked wirth inactivity? My session attribute only persists as long as I am using the app. That's exactly how the 'inactive' timeout works. -chris signature.asc Description: OpenPGP digital signature
Re: OracleConnectionPoolDataSource creates too many connections
Rudi, I have two things to add that nobody seems to have mentioned. In my LoginServlet, I create a new PooledConnection, which I add to the Servlet Context: PooledConnection pc = ConnectionFactory.getInstance.getPooledConnection(); ServletContext ctx = getServletContext(); ctx.setAttribute(pooled_conn, pc); Gah! Why are you putting a database connection into the application context? This sounds like a concurrency nightmare! I think you want to put the /pool/ into the application scope, not a single connection. Connection con = pc.getConnection //do a few things with the connection try{ if (con != null){ con.close(); } // I'm assumingthis returns the connection to the Pool }catch(SQLException sqle){ sqle.printStackTrace(); } You need more try/catch blocks. conn.close should /always/ be in a finally block: Connection conn = null; // Declare your statements and resultsets, here, too try { conn = // whatever // Do stuff with connection } finally { // Close your statements and result sets, here, too if(null != conn) try { conn.close(); } catch (SQLException sqle) { /* log this exception somewhere */ } } Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: how to get or build a mod_jk module for Cygwin Apache ?
Flo, i try to configure Apache 1.3.xx from cygwin and Tomcat 5.0 from windows to work together with JK. Okay. Isn't there a win32 binary? http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/win32/ (Look for files with 1.3.27 in their name -- those are for Apache 1.3.27). But i have a problem getting a binary version of mod_jk. At this URL : http://apache.crihan.fr/dist/jakarta/tomcat-connectors/jk/binaries/ the freebsd directory is empty. Maybe I'm confused. Why are you looking in the freebsd directory for cygwin binaries? For cygwin i don't know if i must use a win32 mod_jk.dll (version 1 or 2) or build a mod_jk.so. It will be a .dll file. However, I'm not sure cygwin has anything to do with this. You'll be running Apache-win32 and mod_jk-win32, and I assume Java/Tomcat will be running on JDK-win32, so where does cygwin come in? -chris signature.asc Description: OpenPGP digital signature
Need help - Data Source problem
I am using TOMCAT 5.0.19 and Apache 1.3.x. I configured my server.xml and web.xml to use data source. When ever I excecute a servlet from browser I get the folloeing message. For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated . org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: null - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need help - Data Source problem
Hi! Mathew wrote: For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated. If sure looks that way, but without further information one can't be sure. It would really help matters if you could post the relevant parts of your server.xml. Perhaps there's just a typo or something. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help - Data Source problem
Supply more information. What does your server.xml and web.xml look like? (don't post the whole file, just relevant parts). Where is your driver jar located? (it should be common/lib) That class of error (class '' for URL 'null') is fairly common, and normally it's mis-configuration. -Original Message- From: Mathew [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 9:42 AM To: [EMAIL PROTECTED] Subject: Need help - Data Source problem I am using TOMCAT 5.0.19 and Apache 1.3.x. I configured my server.xml and web.xml to use data source. When ever I excecute a servlet from browser I get the folloeing message. For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated . org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: null - 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: Cross context c:import not working?
For the archives : this is bug 27309 ( http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27309 ) and has been fixed in head. -a Aadi Deshpande wrote: Hi, I'm not sure if this or the taglibs-user is the right place for posting this, but it looks to be a Tomcat error. When trying to use a c:import in the vein of : c:import url=/test.jsp context=/profile/ Hi, Not sure if this is the right place or taglibs-user for this issue ( it seems to be a tomcat problem ), but it looks like cross context c:imports don't work if a page is session-enabled. This used to work in Tomcat 5.0.16 but is broken in 5.0.19 For example : Both / and /profile contexts have crossContext=true c:import url=/cross_context_import.jsp context=/profile/ if cross_context_import.jsp has %@ page session=false %, everything works well. if cross_context_import doesn't have that ( or %@ page session=true % ), then it gives me a NullPointerException ( stack trace at the end ) The problem it seems is that inside ApplicationHttpRequest.getSession(), the call to context.getManager().findSession(id) returns null ( this is for the first time that the context is accessed ). However, before checking to see if the session is null, the .access() method is called on it ( presumably to update the access time ) . The whole thing is wrapped in an IOException, but which gets ignored since NullPointerException is a RuntimeException. What's odd is that the check for the ( localSession == null ) follows immediately after the try block, so it looks like some sort of oversight in my eyes. What I've done is take the source code, and refactor it so that the access comes in an else block ( it looks like other session management code was put in place after 5.0.16 ) I'd like to make sure I didn't miss anything before erroneously reporting a bug. java.lang.NullPointerException at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:546) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:512) at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:192) at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:167) at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:149) at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:106) at org.apache.jsp.index_jsp._jspService(index_jsp.java:55) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:750) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:636) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:546) at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:179) at org.apache.jsp.cross_005fcontext_005fimport_jsp._jspx_meth_c_import_0(cross_005fcontext_005fimport_jsp.java:85) at org.apache.jsp.cross_005fcontext_005fimport_jsp._jspService(cross_005fcontext_005fimport_jsp.java:59) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at clubmom.framework.PersistentHibernateSession.doFilter(PersistentHibernateSession.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at
RE: Need help - Data Source problem
Thak you for your response.. I appreciate your time .. This is my server.xml --- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=sunil docBase=sunil debug=0 crossContext=true reloadable=true Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.2.101:1521:oralin/value /parameter parameter nameusername/name valuewebuser/value /parameter parameter namepassword/name valueoralin/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context My Web.xml is -- web-app servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/servlet/MyServlet/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Supply more information. What does your server.xml and web.xml look like? (don't post the whole file, just relevant parts). Where is your driver jar located? (it should be common/lib) That class of error (class '' for URL 'null') is fairly common, and normally it's mis-configuration. -Original Message- From: Mathew [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 9:42 AM To: [EMAIL PROTECTED] Subject: Need help - Data Source problem I am using TOMCAT 5.0.19 and Apache 1.3.x. I configured my server.xml and web.xml to use data source. When ever I excecute a servlet from browser I get the folloeing message. For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated . org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: null - 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: [OT] Re: Process Died | Production
Christopher Schultz wrote: I've experienced even more random crashes (SEGV). It turned out to be bad memory (or bus), and it only showed up under pretty heavy load. :( This is a little OT, but just out of curiosity, has anybody been successful in gaining root/tomcat/whatever-uid shell by capitalizing on a JVM's (not necessarily tomcat's) core dump? I've always wondered if that was possible. I know its extremely hard (impossible?) to consistently overflow JVM's stack, but has it ever been done? I've never heard of anything like this before. However, Java's stack is not what gets overflowed, here. IF the JVM goes down, it's the JVM code that faults, not the Java code itself. Java's stack and heap are pretty far away from anything that's executing. Notice I said overflowing of the JVM's stack not Java's (bytecode) stack. I am well aware of the fact that you can't smash a Java stack - that's just how the language is architected. -- A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem in configuring a Datasource in Tomcat 5.0
Hi, i am still trying to configure a datasource with tomcat.. I have a mysql instance running on my machine, (I can use without any problem mysql console and mysql gui client), but in tomcat I am still getting Following exception.. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory, cause: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is ther e a MySQL server running on the machine/port you are trying to connect to? (java .net.ConnectException) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.Driver.connect(Unknown Source) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv erConnectionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable ConnectionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 01) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) I attach again my server.xml... Thanx in advance and regards Marco -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 15:58 To: 'Shapira, Yoav' Subject: RE: problem in configuring a Datasource in Tomcat 5.0 Hi Yoav, Thanx, but it worked for half :-( Now I am getting this exception : org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory, cause: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is ther e a MySQL server running on the machine/port you are trying to connect to? (java .lang.NumberFormatException) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) this would mean that there is no mysql server running at localhost.. however, I have just started one instance, and here is mysql output.. InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 040303 13:43:50 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 040303 13:43:50 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 040303 13:43:51 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 040303 13:43:54 InnoDB: Started; log sequence number 0 0 mysqld: ready for connections. Version: '4.1.1a-alpha-max-debug' socket: '' port: 3306 Any suggestions? Thanx in advance and regards marco -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 14:12 To: Tomcat Users List Subject: RE: problem in configuring a Datasource in Tomcat 5.0 Hi, Try moving your TestDB datasource to your context declaration and out of GlobalNamingResources. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 9:10 AM To: [EMAIL PROTECTED] Subject: problem in configuring a Datasource in Tomcat 5.0 Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at
Re: problem in configuring a Datasource in Tomcat 5.0
I am also having the same problem. I just posted my sever.xml and web.xml to the group. Any help is really appreciated Hi, i am still trying to configure a datasource with tomcat.. I have a mysql instance running on my machine, (I can use without any problem mysql console and mysql gui client), but in tomcat I am still getting Following exception.. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory, cause: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is ther e a MySQL server running on the machine/port you are trying to connect to? (java .net.ConnectException) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.Driver.connect(Unknown Source) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv erConnectionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable ConnectionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 01) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) I attach again my server.xml... Thanx in advance and regards Marco -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 15:58 To: 'Shapira, Yoav' Subject: RE: problem in configuring a Datasource in Tomcat 5.0 Hi Yoav, Thanx, but it worked for half :-( Now I am getting this exception : org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory, cause: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is ther e a MySQL server running on the machine/port you are trying to connect to? (java .lang.NumberFormatException) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) this would mean that there is no mysql server running at localhost.. however, I have just started one instance, and here is mysql output.. InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 040303 13:43:50 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 040303 13:43:50 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 040303 13:43:51 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 040303 13:43:54 InnoDB: Started; log sequence number 0 0 mysqld: ready for connections. Version: '4.1.1a-alpha-max-debug' socket: '' port: 3306 Any suggestions? Thanx in advance and regards marco -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 14:12 To: Tomcat Users List Subject: RE: problem in configuring a Datasource in Tomcat 5.0 Hi, Try moving your TestDB datasource to your context declaration and out of GlobalNamingResources. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 9:10 AM To: [EMAIL PROTECTED] Subject: problem in configuring a Datasource in Tomcat 5.0 Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at
Listener Jar File
Under which directory should I place the jar file containing an HttpSessionListener referenced in my web.xml? I currently have this in a jar under web-inf/lib, but I am getting exceptions saying that this class is not in my path. Justin
RE: Listener Jar File
Hi, Under which directory should I place the jar file containing an HttpSessionListener referenced in my web.xml? I currently have this in a jar under web-inf/lib, but I am getting exceptions saying that this class is not in my path. WEB-INF/lib is the right place for all servlet spec listeners. Check your spelling or package naming maybe? 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: Listener Jar File
Ty. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 11:53 AM To: Tomcat Users List Subject: RE: Listener Jar File Hi, Under which directory should I place the jar file containing an HttpSessionListener referenced in my web.xml? I currently have this in a jar under web-inf/lib, but I am getting exceptions saying that this class is not in my path. WEB-INF/lib is the right place for all servlet spec listeners. Check your spelling or package naming maybe? 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]
JSP whitespace removal
Hi We want to achieve a 10-15% data reduction of the HTML being served by our webserver (generated by JSP pages). This will have an impact on our bandwidth charges from our ISP... We can achieve this by by simply removing all the \n\r, \t characters and replacing repeated occurences of(double space) by (single space). But we don't want to do this in our source JSP files as they will become unmaintainable/unreadable. eg table tr tdColumn 1/td tdColumn 2/td tr /table (69 characters) becomes tabletrtdColumn 1/tdtdColumn 2/tdtr/table (57 characters), that's an 17% saving for that text block... I know that we could: i) write/implement a filter to process the outputstream - BUT we use OSCache (www.opensymphony.com) to cache (included) JSP pages, and we don't want to reprocess cached data using another filter. ii) use a script to transform or preprocess our JSP pages before they are deployed - simple, but may have code breaking (between dev and live system) or maintenance implications? iii) create a tag library to process a text block (or another JSP), BUT we've heard a rumour that taglibs can be inefficient (is that true?) Question: is it possible to use a directive in a JSP page to force the compiler to remove these characters to achieve our desired data reduction? Are there any other techniques or solutions that anyone else is using? Thanks John Sidney-Woollett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP whitespace removal
have you tried turning gzip compression? that should produce similar bandwidth savings to stripping out extra carraige returns and double spaces. you could always use the jasper plugin architecture to strip out excess stuff peter lin John Sidney-Woollett [EMAIL PROTECTED] wrote: Hi We want to achieve a 10-15% data reduction of the HTML being served by our webserver (generated by JSP pages). This will have an impact on our bandwidth charges from our ISP... We can achieve this by by simply removing all the \n\r, \t characters and replacing repeated occurences of (double space) by (single space). But we don't want to do this in our source JSP files as they will become unmaintainable/unreadable. eg Column 1 Column 2 (69 characters) becomes Column 1Column 2 (57 characters), that's an 17% saving for that text block... I know that we could: i) write/implement a filter to process the outputstream - BUT we use OSCache (www.opensymphony.com) to cache (included) JSP pages, and we don't want to reprocess cached data using another filter. ii) use a script to transform or preprocess our JSP pages before they are deployed - simple, but may have code breaking (between dev and live system) or maintenance implications? iii) create a tag library to process a text block (or another JSP), BUT we've heard a rumour that taglibs can be inefficient (is that true?) Question: is it possible to use a directive in a JSP page to force the compiler to remove these characters to achieve our desired data reduction? Are there any other techniques or solutions that anyone else is using? Thanks John Sidney-Woollett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
RE: JSP whitespace removal
Hi We want to achieve a 10-15% data reduction of the HTML being served by our webserver (generated by JSP pages). This will have an impact on our bandwidth charges from our ISP... I cannot help you on this, but you should realise, that if you archive to reduce you jsps output by 10%, this will affect you traffic only by about 2%. We do have a server, which generated (according to access_log_*) 2.183.339.056 byte in 261.018 requests. But out provider counted about 9GB of traffic. [Actually he is accounting on switch port level and therefor including even ARP-requests, but anyway a lot of this traffic is based on out tomcat server.] cu Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP whitespace removal
Peter Lin said: have you tried turning gzip compression? that should produce similar bandwidth savings to stripping out extra carraige returns and double spaces. We running Apache 1.3.x + JK + TC 5.0.x What's better the gzip valve/filter in Tomcat, or try doing the compression with an Apache module (if that's even possible for JSP rendered pages)? Also, is there a threshold below which the penalty for processing the compression outweighs the data payload reductuion? We want to be low bandwidth + responsive... you could always use the jasper plugin architecture to strip out excess stuff Is there a link to some docs for this? Thanks John Sidney-Woollett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP whitespace removal
Steffen Heil said: I cannot help you on this, but you should realise, that if you archive to reduce you jsps output by 10%, this will affect you traffic only by about 2%. We do have a server, which generated (according to access_log_*) 2.183.339.056 byte in 261.018 requests. But out provider counted about 9GB of traffic. [Actually he is accounting on switch port level and therefor including even ARP-requests, but anyway a lot of this traffic is based on out tomcat server.] That's a good point - we're also charged at the switch port level! We have a traffic shaper so we can control the amount of bandwidth (Mbit/sec) we use for outbound traffic, and we're trying to cram as much data per second as we can within our (managed/shaped) limit. In fact it seems that (gzip) compression is a better strategy for HTML/CSS pages because it offers compression of 80%. But it's still better to compress the pages after you strip the whitespace for a small final text size. Unfortunately we also have a lot of graphics (but at least once they are cached by the browser) then we only have to deal with a HEAD request to see if they have been updated... Thanks for the feedback. John Sidney-Woollett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP whitespace removal
the reduction depends on your html right? if you use a lot of tables, you're likely to see 5-10x compression. The easiest trick is to save a couple of your biggest pages and zip them up. Compare the file size. Now, if you have regular log reports, you can see which pages get requested the most and how many bytes it is. from that you can get a fairly accurate estimate in total bytes sent per week/month. Stripping out carriage returns and tabs most likely won't give you as much as compression. Here is an easy way to test it on other sites. Load a site that uses gzip with a browser that support gzip and without. Compare the actual bytes sent and how much faster the page loads. I know from first hand experience verizon SuperPages reduced 60K+ to 6K when they started using compression. The user's perception is the page was 2-4x faster. peter lin John Sidney-Woollett [EMAIL PROTECTED] wrote: Peter Lin said: have you tried turning gzip compression? that should produce similar bandwidth savings to stripping out extra carraige returns and double spaces. We running Apache 1.3.x + JK + TC 5.0.x What's better the gzip valve/filter in Tomcat, or try doing the compression with an Apache module (if that's even possible for JSP rendered pages)? Also, is there a threshold below which the penalty for processing the compression outweighs the data payload reductuion? We want to be low bandwidth + responsive... you could always use the jasper plugin architecture to strip out excess stuff Is there a link to some docs for this? Thanks John Sidney-Woollett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
Blocking SNMP calls?
I have an app. that uses Adventnet SNMP classes. If I perform a snmpSet() call from inside a Tomcat or JBoss server, my application gets a timeout error (I mean, the application is unable to communicate with a remote network device via SNMP and the SNMP error is Request Timed Out to w.x.y.z). But if I run the exact same class I wrote, as a Java console application, from the same host, it works perfectly. Any ideas? Best regards, E. Robles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem in configuring a Datasource in Tomcat 5.0
did you dowloaded java conecter j from mysl and copied it under under your tomcat_home comon/lib +alowed a user connection into mysql ? [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Marco Mistroni [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: problem in configuring a Datasource in Tomcat 5.0 Date: Wed, 3 Mar 2004 16:32:15 - Hi, i am still trying to configure a datasource with tomcat.. I have a mysql instance running on my machine, (I can use without any problem mysql console and mysql gui client), but in tomcat I am still getting Following exception.. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory, cause: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is ther e a MySQL server running on the machine/port you are trying to connect to? (java .net.ConnectException) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.Driver.connect(Unknown Source) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv erConnectionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable ConnectionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 01) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) I attach again my server.xml... Thanx in advance and regards Marco -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 15:58 To: 'Shapira, Yoav' Subject: RE: problem in configuring a Datasource in Tomcat 5.0 Hi Yoav, Thanx, but it worked for half :-( Now I am getting this exception : org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFact ory, cause: java.sql.SQLException: Cannot connect to MySQL server on localhost:3306. Is ther e a MySQL server running on the machine/port you are trying to connect to? (java .lang.NumberFormatException) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) this would mean that there is no mysql server running at localhost.. however, I have just started one instance, and here is mysql output.. InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 040303 13:43:50 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 040303 13:43:50 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 040303 13:43:51 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 040303 13:43:54 InnoDB: Started; log sequence number 0 0 mysqld: ready for connections. Version: '4.1.1a-alpha-max-debug' socket: '' port: 3306 Any suggestions? Thanx in advance and regards marco -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 14:12 To: Tomcat Users List Subject: RE: problem in configuring a Datasource in Tomcat 5.0 Hi, Try moving your TestDB datasource to your context declaration and out of GlobalNamingResources. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 9:10 AM To: [EMAIL PROTECTED] Subject: problem in configuring a Datasource in Tomcat 5.0 Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
What is the problem with tomcat 5.0
I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDelegate.java:65) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBeanServerDelegateImpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanServer.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerBuilder.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) Any idea of what is happening? JOao, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is the problem with tomcat 5.0
did you set the java_home environnement variable? [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Joao Araujo [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 Date: Wed, 03 Mar 2004 13:39:45 -0500 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDelegate.java:65) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBeanServerDelegateImpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanServer.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerBuilder.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) Any idea of what is happening? JOao, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to store log files from packed WAR file apps
You should never log to within the directory structure of your webapp if you want your app to be portable. Provide configuration in web.xml as to where you want the log file to go which an admin can override via proprietary configuration. For instance, in Tomcat... Context ... Parameter name=log4j-log-location value=C:\logs override=false description=Location for logs to be written/ /Context Then in your Log4j initialization, use value of the log4j-log-location context-param and set a system property with that value to a name that you reference in your log4j.xml file such as appender name=File class=org.apache.log4j.RollingFileAppender param name=File value=${log.location} / .. .. .. /appender Or, check out the logging-log4j-sandbox project and grab the alpha_2 (I think that's the tag name) tag. Then look into ServletContextLogAppender which will allow you to specify this in log4j.xml appender name=ServletContext class=org.apache.log4j.servlet.ServletContextLogAppender param name=servletContextPath value=/mycontext / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=[%-5p][%-8.8t]: %39.39c{3} - %m/ /layout /appender The output will be routed through your server's context.log() mechanism. In Tomcat, just set up Context path=/mycontext docBase=mycontext.war debug=5 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_mycontext_servlet_log. suffix=.txt timestamp=true / /Context Now you don't need to configure any file to do the logging. It will just show up in your container's log directly which you know for a fact will exist and the container will create it for you. Or, use Chainsaw2... http://logging.apache.org/log4j/docs/chainsaw.html Jake Quoting Harry Mantheakis [EMAIL PROTECTED]: Hello Now that I've got my Ant build/deploy scripts working nicely, I'm tempted to start running my applications out of packed WAR files. I cannot figure out if there is a *portable* way to specify paths for where my Log4J log files should be saved. I assume I could use the 'catalina.home' property to save the logs under the Tomcat installation directory - but that's Tomcat specific. Has anyone got around this, somehow, or is it a case of getting Ant to glue things with some hard-coded values at build time? Many thanks for any contributions. Harry Mantheakis London, UK - 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]
default mime type for tomcat 5
I have some plain text files that are formated but when tomcat 5 serves the pages it loses all formating. This only happens on older browser such as netscape 4.79. I assume that tomcat sets the default mime type to text/html but I need it to be text/plain. Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the problem with tomcat 5.0
did you set the java_home environnement variable? Yes. All off the variables described and possible of use. It even displays the correct information. Joao, [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Joao Araujo [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 Date: Wed, 03 Mar 2004 13:39:45 -0500 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDelegate.java:65) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBeanServerDelegateImpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanServer.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerBuilder.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) Any idea of what is happening? JOao, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - 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: What is the problem with tomcat 5.0
did you copy tool .jar file from inside your java_home? [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Joao Araujo [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: What is the problem with tomcat 5.0 Date: Wed, 03 Mar 2004 14:28:32 -0500 did you set the java_home environnement variable? Yes. All off the variables described and possible of use. It even displays the correct information. Joao, [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Joao Araujo [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 Date: Wed, 03 Mar 2004 13:39:45 -0500 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDelegate.java:65) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBeanServerDelegateImpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanServer.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerBuilder.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) Any idea of what is happening? JOao, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - 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] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpURLConnection behind a proxie
Hello dudes, do you know how can i authenticate a java programm to use HTTP proxie throught a windows network? I´ve already done JavaPlugin and built a java programm to make the job, but it didn´t workout, my HTTP proxie is WebSense. Regards, Edson
RE: re-newbie help
yeah, i am. what is a good way to do abt this? create a index.html to invoke the function and then edit the server.xml file and place the lines notifying tomcat of the existence of the .class java files? = -Original Message- = From: Tim Funk [mailto:[EMAIL PROTECTED] = Sent: Wednesday, March 03, 2004 4:29 AM = To: Tomcat Users List = Subject: Re: re-newbie help = = = You are probably using the invoker = = http://jakarta.apache.org/tomcat/faq/misc.html#invoker = = -Tim = = crombie wrote: = = hi, = = i'm re-introducing myself to tomcat after 2 yrs. for some = reason i cannot get my servlet apps to = run. i installed tomcat, got the welcome screen at port 8080 = but when i put my class files in the = /webapps dir, it won't run. um, can i get some pointers on = where to get docs and etc. the docs = at sun.com are not doing me any good. does anyone have tomcat = set up with intellj idea? = = = = - = 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 get or build a mod_jk module for Cygwin Apache ?
I thought FreeBSD works like cygwin but it seems wrong. I tried the mod_jk_1_2_5_2_0_47.dll I got errors launching httpd : Win32 error 126 (The specified module could not be found) I needed to add ApacheCore.dll Win9xConHook.dll to the PATH Then i got another error message : Win32 error 127 (The specified procedure could not be found). Then I tried mod_jk2-1.3.27.dll but I get this error : Syntax error on line 1020 of /etc/apache/httpd.conf: Can't locate API module structure `jk_module' in file /usr/lib/apache/mod_jk2-1. 3.27.dll: dlsym: Win32 error 127 So I thought to build any mod_jk but how ? I would like to find a better and easier solution. -Message d'origine- De : Christopher Schultz Envoyé : mercredi 3 mars 2004 16:18 À : Tomcat Users List Objet : Re: how to get or build a mod_jk module for Cygwin Apache ? Flo, i try to configure Apache 1.3.xx from cygwin and Tomcat 5.0 from windows to work together with JK. Okay. Isn't there a win32 binary? http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/win32/ (Look for files with 1.3.27 in their name -- those are for Apache 1.3.27). But i have a problem getting a binary version of mod_jk. At this URL : http://apache.crihan.fr/dist/jakarta/tomcat-connectors/jk/binaries/ the freebsd directory is empty. Maybe I'm confused. Why are you looking in the freebsd directory for cygwin binaries? For cygwin i don't know if i must use a win32 mod_jk.dll (version 1 or 2) or build a mod_jk.so. It will be a .dll file. However, I'm not sure cygwin has anything to do with this. You'll be running Apache-win32 and mod_jk-win32, and I assume Java/Tomcat will be running on JDK-win32, so where does cygwin come in? -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is the problem with tomcat 5.0
If you've set JAVA_HOME properly, you should not need to copy tools.jar. -Original Message- From: FRANCOIS Dufour [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 1:31 PM To: [EMAIL PROTECTED] Subject: Re: What is the problem with tomcat 5.0 did you copy tool .jar file from inside your java_home? [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Joao Araujo [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: What is the problem with tomcat 5.0 Date: Wed, 03 Mar 2004 14:28:32 -0500 did you set the java_home environnement variable? Yes. All off the variables described and possible of use. It even displays the correct information. Joao, [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Joao Araujo [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 Date: Wed, 03 Mar 2004 13:39:45 -0500 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDele gate.java:65) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBea nServerDelegateImpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelega te(JmxMBeanServer.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate( MBeanServerBuilder.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanSer verFactory.java:316) at javax.management.MBeanServerFactory.createMBeanServer(MBean ServerFactory.java:227) at javax.management.MBeanServerFactory.createMBeanServer(MBean ServerFactory.java:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry .java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUti ls.java:1700) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener .clinit(GlobalResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Nativ eConstructorAccessorImpl.java:39) Any idea of what is happening? JOao, --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - 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] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - 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: re-newbie help
It seems like you need more education about servlets and jsps. Sun has a tutorial at: java.sun.com/webservices/docs/1.3/tutorial/doc/ By topic, look at chapters 3,4,15-19 -Tim tsaiching wong wrote: yeah, i am. what is a good way to do abt this? create a index.html to invoke the function and then edit the server.xml file and place the lines notifying tomcat of the existence of the .class java files? = -Original Message- = From: Tim Funk [mailto:[EMAIL PROTECTED] = Sent: Wednesday, March 03, 2004 4:29 AM = To: Tomcat Users List = Subject: Re: re-newbie help = = = You are probably using the invoker = = http://jakarta.apache.org/tomcat/faq/misc.html#invoker = = -Tim = = crombie wrote: = = hi, = = i'm re-introducing myself to tomcat after 2 yrs. for some = reason i cannot get my servlet apps to = run. i installed tomcat, got the welcome screen at port 8080 = but when i put my class files in the = /webapps dir, it won't run. um, can i get some pointers on = where to get docs and etc. the docs = at sun.com are not doing me any good. does anyone have tomcat = set up with intellj idea? = = = = - = 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: What is the problem with tomcat 5.0
Hi, What jars that didn't ship with tomcat are in your runtime classpath? Yoav Shapira Millennium ChemInformatics -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDelegate.java:65 ) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBeanServerDeleg ateI mpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanS erve r.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerB uild er.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.j ava: 316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactor y.ja va:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactor y.ja va:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700 ) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(Gl obal ResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor Acce ssorImpl.java:39) Any idea of what is happening? JOao, - 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: Need help - Data Source problem
I am still trying to fix this problem. I looked at TOMCAT_HOME/commons/lib dircory and found out that I have commons-dbcp-1.1.jar instead of commons-dbcp.jar. Do Ihave to remane to commons-dbcp.jar. Same thing for commons-pool-1.1.jar too. I am using TOMCAT 5.0.19 and Apache 1.3.x. I configured my server.xml and web.xml to use data source. When ever I excecute a servlet from browser I get the folloeing message. For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated . my set up is like this :- This is my server.xml --- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=sunil docBase=sunil debug=0 crossContext=true reloadable=true Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.2.101:1521:oralin/value /parameter parameter nameusername/name valuewebuser/value /parameter parameter namepassword/name valueoralin/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context My Web.xml is -- web-app servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/servlet/MyServlet/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE : how to get or build a mod_jk module for Cygwin Apache ?
Flo, I thought FreeBSD works like cygwin but it seems wrong. FreeBSD is a 'real' UNIX flavor, while cygwin provider UNIX-like services and libraries on win32. I tried the mod_jk_1_2_5_2_0_47.dll I got errors launching httpd : Win32 error 126 (The specified module could not be found) I needed to add ApacheCore.dll Win9xConHook.dll to the PATH Then i got another error message : Win32 error 127 (The specified procedure could not be found). You shouldn't have used mod_sk_1_2_5__2_0_47.dll -- that's for Apache 2.0, not Apache 1.3. Then I tried mod_jk2-1.3.27.dll but I get this error : Syntax error on line 1020 of /etc/apache/httpd.conf: Can't locate API module structure `jk_module' in file /usr/lib/apache/mod_jk2-1. 3.27.dll: dlsym: Win32 error 127 You probably have the dll in the wrong place. The standard location for Apache modules is in the 'modules' directory in the Apache installation. So I thought to build any mod_jk but how? You'll have the same problems if you build it yourself. You still need to put it in the right place. I would like to find a better and easier solution. Are you using Apache as a package that was installed via Cygwin? You might have better luck with the 'standard' distribution, which comes with a very simple installer, from httpd.apache.org. -chris signature.asc Description: OpenPGP digital signature
Re: What is the problem with tomcat 5.0
Shapira, Hi, What jars that didn't ship with tomcat are in your runtime classpath? I;ve nothing set on my classpath. I saw that tomcat override whatever you set . The script setclasspath.sh does the job. It does this. CLASSPATH=$JAVA_HOME/lib/tools.jar Those are my settiings Using CATALINA_BASE: /export/tomcat Using CATALINA_HOME: /export/tomcat Using CATALINA_TMPDIR: /export/tomcat/temp Using JAVA_HOME: /usr/java/j2sdk Thanks in advance, joao, Yoav Shapira Millennium ChemInformatics -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.init(MBeanServerDelegate.java:65 ) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(MBeanServerDeleg ateI mpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanS erve r.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerB uild er.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.j ava: 316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactor y.ja va:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactor y.ja va:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700 ) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(Gl obal ResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor Acce ssorImpl.java:39) Any idea of what is happening? JOao, - 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: Need help - Data Source problem
where is the oracle connection driver jar file ? It needs to be in common/lib as well -Original Message- From: Mathew [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:18 PM To: [EMAIL PROTECTED] Subject: RE: Need help - Data Source problem I am still trying to fix this problem. I looked at TOMCAT_HOME/commons/lib dircory and found out that I have commons-dbcp-1.1.jar instead of commons-dbcp.jar. Do Ihave to remane to commons-dbcp.jar. Same thing for commons-pool-1.1.jar too. I am using TOMCAT 5.0.19 and Apache 1.3.x. I configured my server.xml and web.xml to use data source. When ever I excecute a servlet from browser I get the folloeing message. For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated . my set up is like this :- This is my server.xml --- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=sunil docBase=sunil debug=0 crossContext=true reloadable=true Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.2.101:1521:oralin/value /parameter parameter nameusername/name valuewebuser/value /parameter parameter namepassword/name valueoralin/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context My Web.xml is -- web-app servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/servlet/MyServlet/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - 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: Need help - Data Source problem
As for naming, you could name that jar file dirty_laundry.jar and it wouldn't matter. It's the classes that are found inside of it that matter. the -1.1 is merely a help for you to know what version of commons-dbcp you are using, which is, I understand, a matter of some religious debate around here. ;) -Original Message- From: Mathew [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:18 PM To: [EMAIL PROTECTED] Subject: RE: Need help - Data Source problem I am still trying to fix this problem. I looked at TOMCAT_HOME/commons/lib dircory and found out that I have commons-dbcp-1.1.jar instead of commons-dbcp.jar. Do Ihave to remane to commons-dbcp.jar. Same thing for commons-pool-1.1.jar too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the problem with tomcat 5.0
Hello, Joao: jmx.jar contains javax/management/ListenerNotFoundException.class and (for me) jmx.jar is in $TOMCAT_HOME/common/lib; perhaps it's not installed on your system. Here's a very simple yet useful Bourne shell script: for jar in `ls *jar` do echo checking $jar... jar tvf $jar |grep -i listenernotfoundexception done btw: you can install either Cygwin on a Windows PC or uwin (if you prefer ksh)... Cordially, Oswald Joao Araujo [EMAIL PROTECTED] wrote: Shapira, Hi, What jars that didn't ship with tomcat are in your runtime classpath? I;ve nothing set on my classpath. I saw that tomcat override whatever you set . The script setclasspath.sh does the job. It does this. CLASSPATH=$JAVA_HOME/lib/tools.jar Those are my settiings Using CATALINA_BASE: /export/tomcat Using CATALINA_HOME: /export/tomcat Using CATALINA_TMPDIR: /export/tomcat/temp Using JAVA_HOME: /usr/java/j2sdk Thanks in advance, joao, Yoav Shapira Millennium ChemInformatics -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: What is the problem with tomcat 5.0 I''ve been trying to start tomcat without success. I dont know why every time I run startup.sh I get the following error: java.lang.NoClassDefFoundError: javax/management/ListenerNotFoundException at javax.management.MBeanServerDelegate.(MBeanServerDelegate.java:65 ) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.(MBeanServerDeleg ateI mpl.java:93) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(JmxMBeanS erve r.java:1356) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerB uild er.java:61) at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.j ava: 316) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactor y.ja va:227) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactor y.ja va:188) at org.apache.commons.modeler.Registry.getMBeanServer(Registry.java:665) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1700 ) at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:160) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(Gl obal ResourcesLifecycleListener.java:112) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor Acce ssorImpl.java:39) Any idea of what is happening? JOao, - 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] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
RE: What is the problem with tomcat 5.0
Hi, What jars that didn't ship with tomcat are in your runtime classpath? I;ve nothing set on my classpath. I saw that tomcat override whatever you set . The script setclasspath.sh does the job. It does this. I'm aware of this script and what it does -- thanks ;) But that's not what I asked. By what's in your runtime classpath, I mean exactly that: your runtime classpath includes the WEB-INF/classes directory of your webapp, WEB-INF/lib, common/lib, shared/lib, the bootstrap classloader, system endorsed directories, and others possibly. (See tomcat's classloader howto if you're not sure what I'm talking about). If one of these directories that comes before common/lib in the runtime classpath has an older JMX jar without the exception, you'd get the error you're getting. 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: Need help - Data Source problem
Hi guys, I'm pretty much a newbie when it comes to configuring Tomcat, and also with building JSPs, although thanks to the useful examples and documentation, I've been able to pick it up pretty quickly. Anyways, I am interested in using the utilties provided in the commons-fileupload-1.0.jar file. I downloaded it to the $CATALINA_HOME/common/lib folder. When I tried to import org.apache.commons.fileupload.*, I get an error stating that the package doesn't exist. For the hell of it, I made a standalone java program with the same import statement, and it worked fine. Does anyone have any thoughts as to what else I can do to troubleshoot this problem further? I am running Tomcat-4.1.27. Thanks, Arun -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 3:31 PM To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: Need help - Data Source problem As for naming, you could name that jar file dirty_laundry.jar and it wouldn't matter. It's the classes that are found inside of it that matter. the -1.1 is merely a help for you to know what version of commons-dbcp you are using, which is, I understand, a matter of some religious debate around here. ;) -Original Message- From: Mathew [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:18 PM To: [EMAIL PROTECTED] Subject: RE: Need help - Data Source problem I am still trying to fix this problem. I looked at TOMCAT_HOME/commons/lib dircory and found out that I have commons-dbcp-1.1.jar instead of commons-dbcp.jar. Do Ihave to remane to commons-dbcp.jar. Same thing for commons-pool-1.1.jar too. - 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: Need help - Data Source problem
Hi, same import statement, and it worked fine. Does anyone have any thoughts as to what else I can do to troubleshoot this problem further? I am running Tomcat-4.1.27. I have a thought: start your own thread for your question and don't hijack other peoples' ;) 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: FAIL - Application at context path /[context] could not be started ???
What's the console output? how far did you get before you encounter that specific error? Sounds to me like a mis-configuration of the context path problem. You sure you have the right deploy descriptor in your war file? -Original Message- From: Timothy Stone [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:11 PM To: Tomcat Users List Subject: Re: FAIL - Application at context path /[context] could not be started ??? Timothy Stone wrote: List, I did an archive search. Nothing meaningful returned, so I'm posting what must be a regular question. I can get a development tree to install via the Manager interface, but I can't get it started. This seems to be a UNIX problem at the moment. For example on Windoze: Install directory or WAR file located on server Context Path (optional): /foobar XML Configuration file URL: WAR or Directory URL: file:c:/path/to/foobar/dev will load and start. The very same application on Linux/Mac OS X: Install directory or WAR file located on server Context Path (optional): /foobar XML Configuration file URL: WAR or Directory URL: file:/home/user/path/to/foobar/dev will load, but consistently fails to start. The error, not explained in the Manager documentation anywhere BTW : FAIL - Application at context path /foobar could not be started What I can't figure out is this very application will work with the catalina.ant tasks! Windoze or Unix. So the problem seems to be with the HTML interface. So, what's the trick? Anyone? Oh, I did 777 the dev tree. Didn't help. :( Many thanks, Tim No one can field this? Maybe I'm too close. Nothing is working now. Not the ant task not the manager interface. Nothing. The answer is not obvious to me. Nothing seems to be logging anywhere for me to debug it. Many thanks again, Tim - 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: FAIL - Application at context path /[context] could not be started ???
Hi, The error, not explained in the Manager documentation anywhere BTW : FAIL - Application at context path /foobar could not be started Errors aren't typically explained in the documentation, as we rely on stack traces and other information to diagnose and correct problems. Feel free to inspect the relevant code, document the possible error messages, and submit a documentation enhancement patch. The answer is not obvious to me. Nothing seems to be logging anywhere for me to debug it. A few general tips for cases like this: - Add debug=99 to the Engine and Host elements of your server.xml file. This will output more information. - Try to deploy the WAR by simply copying it to the webapps directory (assuming autoDeploy is on for your Host). Do any errors occur? If so, fix these before you try ant/manager deployment. - Comment out/remove all unneeded webapps and elements from server.xml, making your deployment as simple as possible. - If you're still having trouble, start stripping things that execute on startup from your web.xml: filters that do stuff on init(), servlets that have load-on-startup enabled, listeners, 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: cross context include
I've been struggling with the same problem. I read the bug report, but it only adresses part of the problem, the part that doesn't retrieve the session properly. I actually patched the code independently and have discovered another problem, that somehow sessions are either getting lost or mixed up when you do cross context imports in at least one advanced scenario : 1) page Z in context 'a' import a page X from context 'b' 2) page X in context 'b' imports a page Y in context 'a' in this case, the session that was created when you import page X in context b is the session that's available in page Y in context a. here's my test case --- test_page1.jsp ( context '/profile' ) : %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % Test of cross context imports : % request.getSession().setAttribute(test_attrib, 12345); % % out.println(test_attrib in ( test_page1.jsp ) is + session.getAttribute(test_attrib) ); %br/ % out.println(session id ( in test_page1.jsp) is : + request.getSession().getId() ); % br/ c:import url=/test_other.jsp context=/ / test_other.jsp ( context '/' ) : %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % % request.getSession().setAttribute(test_other_attrib, 54321 ); % % out.println(test attrib ( in test_other.jsp ) is : + request.getSession().getAttribute(test_attrib) ); %br/ % out.println(test other attrib ( in test_other.jsp) is : + request.getSession().getAttribute(test_other_attrib) ); %br/ % out.println(session id ( in test_other.jsp) is : + request.getSession().getId() ); % br/ c:import url=/test_page2.jsp context=/profile/ test_page2.jsp ( context '/profile' ) : %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % % out.println(test_attrib ( in test_page2.jsp ) is + session.getAttribute(test_attrib) ); % br/ % out.println(test other attrib ( in test_page2.jsp) is : + request.getSession().getAttribute(test_other_attrib) ); % br/ % out.println(session id ( in test_page2.jsp) is : + request.getSession().getId() ); % br/ The output i get when I hit test_page1.jsp is : Test of cross context imports : test_attrib in ( test_page1.jsp ) is 12345 session id ( in test_page1.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F test attrib ( in test_other.jsp ) is : null test other attrib ( in test_other.jsp) is : 54321 session id ( in test_other.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F test_attrib ( in test_page2.jsp ) is null test other attrib ( in test_page2.jsp) is : 54321 session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F The output I get when i hit test_other.jsp is : test attrib ( in test_other.jsp ) is : null test other attrib ( in test_other.jsp) is : 54321 session id ( in test_other.jsp) is : 55B2068D3011D727DF15068ADAD713E2 test_attrib ( in test_page2.jsp ) is null test other attrib ( in test_page2.jsp) is : null session id ( in test_page2.jsp) is : 55B2068D3011D727DF15068ADAD713E2 the output that i get when i hit test_page2.jsp : test_attrib ( in test_page2.jsp ) is 12345 test other attrib ( in test_page2.jsp) is : null session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F Any hints on how to resolve it? Asim Alp wrote: If indeed we need to put it on all pages, then yes, it's no problem. We do have a couple perl geniuses on staff :) I'm sure we'll find a way to get around it. My main concern right now is to to understand the reason of the problem first. I read the bug report, but still can't understand why an extra session prevents our c:imports from working? Asim On Mar 2, 2004, at 1:46 PM, Mike Curwen wrote: If you have a perl genius on staff, he can do ALL pages with a single command. Scary stuff, but cool when it works. :) -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 12:33 PM To: Tomcat Users List Subject: Re: cross context include I guess we'll have to find a way of going over the 10,000+ pages. Maybe we can write a small program to automate it. I don't like dirty solutions :) If this is indeed a bug in our software, it should better be fixed. One last question though. As much as I know, setting page session to false only means that there is no need to create an additional session. What's this have to do with c:imports? Why does an additional session prevent our c:imports? Asim On Mar 2, 2004, at 1:15 PM, Remy Maucherat wrote: Asim Alp wrote: Thank you for your prompt replies. I just read the bug, and understood what the problem was. Now, though, I have another question. Is there a way of setting page session to false at a higher level. For example somewhere from the server.xml file? My problem is that we have over 100 websites with tens of thousands of jsp pages. Every single one of these JSP pages rely on these c:imports... It's almost impossible for us to manually go over each one of these jsp pages and add the %@ page session=false%
RE: Need help - Data Source problem
My apologies. I forgot to change the subject before posting. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 4:04 PM To: Tomcat Users List Subject: RE: Need help - Data Source problem Hi, same import statement, and it worked fine. Does anyone have any thoughts as to what else I can do to troubleshoot this problem further? I am running Tomcat-4.1.27. I have a thought: start your own thread for your question and don't hijack other peoples' ;) 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]
Uploading a file using JSPs
Hi guys, I'm pretty much a newbie when it comes to configuring Tomcat, and also with building JSPs, although thanks to the useful examples and documentation, I've been able to pick it up pretty quickly. Anyways, I am interested in using the utilties provided in the commons-fileupload-1.0.jar file. I downloaded it to the $CATALINA_HOME/common/lib folder. When I tried to import org.apache.commons.fileupload.*, I get an error stating that the package doesn't exist. For the hell of it, I made a standalone java program with the same import statement, and it worked fine. Does anyone have any thoughts as to what else I can do to troubleshoot this problem further? I am running Tomcat-4.1.27. Thanks, Arun
RE: Uploading a file using JSPs
Hi, Anyways, I am interested in using the utilties provided in the commons-fileupload-1.0.jar file. I downloaded it to the $CATALINA_HOME/common/lib folder. When I tried to import org.apache.commons.fileupload.*, I get an error stating that the package If you're just starting out with tomcat, consider using tomcat 5 (5.0.19 is the latest stable build) rather than tomcat 4: there are many improvements. Tomcat 5 already comes with fileupload: it's in $CATALINA_HOME/server/lib. The error you're getting (BTW, if helps if you post the exact error) is likely masking a conflict between the jar you downloaded to common/lib and the one in server/lib. Move the jar out of common/lib and either: - Put it in your webapp's WEB-INF/lib directory - Or move the one from server/lib to common/lib 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: FAIL - Application at context path /[context] could not be started ???
Yansheng Lin wrote: What's the console output? how far did you get before you encounter that specific error? Sounds to me like a mis-configuration of the context path problem. You sure you have the right deploy descriptor in your war file? well, it some sort of directory problem. damn if I can figure it out. ... 2004-03-03 16:26:21 HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-03-03 16:30:01 HTMLManager: install: Installing web application at '/foo' from 'file:///home/tstone/jwerk/blojsom/war' 2004-03-03 16:30:01 StandardHost[localhost]: Installing web application at context path /foo from URL file:/home/tstone/jwerk/blojsom/war 2004-03-03 16:30:01 StandardContext[/foo]: Resources start failed: java.lang.IllegalArgumentException: Document base /home/tstone/jwerk/blojsom/war does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext. java:193) ... *The very same app runs from /tmp* Any ideas... as I said, I 777 the dev tree, no luck. Many thanks, Tim -Original Message- From: Timothy Stone [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:11 PM To: Tomcat Users List Subject: Re: FAIL - Application at context path /[context] could not be started ??? Timothy Stone wrote: List, I did an archive search. Nothing meaningful returned, so I'm posting what must be a regular question. I can get a development tree to install via the Manager interface, but I can't get it started. This seems to be a UNIX problem at the moment. For example on Windoze: Install directory or WAR file located on server Context Path (optional): /foobar XML Configuration file URL: WAR or Directory URL: file:c:/path/to/foobar/dev will load and start. The very same application on Linux/Mac OS X: Install directory or WAR file located on server Context Path (optional): /foobar XML Configuration file URL: WAR or Directory URL: file:/home/user/path/to/foobar/dev will load, but consistently fails to start. The error, not explained in the Manager documentation anywhere BTW : FAIL - Application at context path /foobar could not be started What I can't figure out is this very application will work with the catalina.ant tasks! Windoze or Unix. So the problem seems to be with the HTML interface. So, what's the trick? Anyone? Oh, I did 777 the dev tree. Didn't help. :( Many thanks, Tim No one can field this? Maybe I'm too close. Nothing is working now. Not the ant task not the manager interface. Nothing. The answer is not obvious to me. Nothing seems to be logging anywhere for me to debug it. Many thanks again, Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Serialization issue
I'm trying to grab the current session ID and the request parameter map from the current request and serialize them into a base64 string to pass to a PHP application. Problem is, I keep running into the following exception everytime I try to serialize anything imlementing the Map interface: java.io.NotSerializableException: org.apache.coyote.tomcat5.CoyoteWriter at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13 32) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1 247) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13 32) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1 247) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) at com.enertiasoft.util.Base64.encodeObject(Base64.java:348) at com.enertiasoft.session.SessionServlet$SessionProxy.toString(SessionServ let.java:125) at com.enertiasoft.session.SessionServlet.service(SessionServlet.java:50) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 63) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 63) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 63) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 63) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78 1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:666) at java.lang.Thread.run(Thread.java:534) What is the CoyoteWriter object I keep running inot, and how can I mark it as transient? Thanks Sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to store log files from packed WAR file apps
Thanks to everyone for the replies to my question! Lots there for me to look into - JNDI, Alpha_2, and Chainsaw. Phew! Sorry, for *my* slow response: my ISP has dropped all my mail today, of all days - so I went online to get your answers. Regards Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to store log files from packed WAR file apps
Thanks to everyone for the replies to my question! Lots there for me to look into - JNDI, Alpha_2, and Chainsaw. Phew! Sorry, for *my* slow response: my ISP has dropped all my mail today, of all days - so I went online to get your answers. Regards Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[CLOSED] Re: FAIL - Application at context path /[context] could not be started ???
Timothy Stone wrote: Yansheng Lin wrote: What's the console output? how far did you get before you encounter that specific error? Sounds to me like a mis-configuration of the context path problem. You sure you have the right deploy descriptor in your war file? well, it some sort of directory problem. damn if I can figure it out. ... 2004-03-03 16:26:21 HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-03-03 16:30:01 HTMLManager: install: Installing web application at '/foo' from 'file:///home/tstone/jwerk/blojsom/war' 2004-03-03 16:30:01 StandardHost[localhost]: Installing web application at context path /foo from URL file:/home/tstone/jwerk/blojsom/war 2004-03-03 16:30:01 StandardContext[/foo]: Resources start failed: java.lang.IllegalArgumentException: Document base /home/tstone/jwerk/blojsom/war does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext. java:193) ... *The very same app runs from /tmp* Any ideas... as I said, I 777 the dev tree, no luck. My home directory is correctly set by default to 700. Meaning /home is neither world readable or executable. Opps! Setting /home/tstone to 755 fixed the problem. Doh! But that is not a recommended solution. :D Moving the dev tree somewhere safer for 755. Many thanks again! Thanks for the patience as well. Tim Many thanks, Tim -Original Message- From: Timothy Stone [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:11 PM To: Tomcat Users List Subject: Re: FAIL - Application at context path /[context] could not be started ??? Timothy Stone wrote: List, I did an archive search. Nothing meaningful returned, so I'm posting what must be a regular question. I can get a development tree to install via the Manager interface, but I can't get it started. This seems to be a UNIX problem at the moment. For example on Windoze: Install directory or WAR file located on server Context Path (optional): /foobar XML Configuration file URL:WAR or Directory URL: file:c:/path/to/foobar/dev will load and start. The very same application on Linux/Mac OS X: Install directory or WAR file located on server Context Path (optional): /foobarXML Configuration file URL: WAR or Directory URL: file:/home/user/path/to/foobar/dev will load, but consistently fails to start. The error, not explained in the Manager documentation anywhere BTW : FAIL - Application at context path /foobar could not be started What I can't figure out is this very application will work with the catalina.ant tasks! Windoze or Unix. So the problem seems to be with the HTML interface. So, what's the trick? Anyone? Oh, I did 777 the dev tree. Didn't help. :( Many thanks, Tim No one can field this? Maybe I'm too close. Nothing is working now. Not the ant task not the manager interface. Nothing. The answer is not obvious to me. Nothing seems to be logging anywhere for me to debug it. Many thanks again, Tim - 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: Serialization issue
Hi, What is the CoyoteWriter object I keep running inot, and how can I mark it as transient? It's the HTTP connector's writer, and you can't mark it as transient. You would have to manually remove non-serializable attributes from a copy of the Map before you try to serialize the copy. 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]
Can't access session id
I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help - Data Source problem
I have a classes111.jar file common/lib . Any other suggestion where is the oracle connection driver jar file ? It needs to be in common/lib as well -Original Message- From: Mathew [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:18 PM To: [EMAIL PROTECTED] Subject: RE: Need help - Data Source problem I am still trying to fix this problem. I looked at TOMCAT_HOME/commons/lib dircory and found out that I have commons-dbcp-1.1.jar instead of commons-dbcp.jar. Do Ihave to remane to commons-dbcp.jar. Same thing for commons-pool-1.1.jar too. I am using TOMCAT 5.0.19 and Apache 1.3.x. I configured my server.xml and web.xml to use data source. When ever I excecute a servlet from browser I get the folloeing message. For me it looks like my program is not able to read tags in server.xml to get driver class info. Any help is really appreciated . my set up is like this :- This is my server.xml --- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=sunil docBase=sunil debug=0 crossContext=true reloadable=true Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/myoracle parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@192.168.2.101:1521:oralin/value /parameter parameter nameusername/name valuewebuser/value /parameter parameter namepassword/name valueoralin/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context My Web.xml is -- web-app servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/servlet/MyServlet/url-pattern /servlet-mapping resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - 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: re-newbie help
thanks a bunch! :) and to all who replied. :) = -Original Message- = From: Tim Funk [mailto:[EMAIL PROTECTED] = Sent: Wednesday, March 03, 2004 11:48 AM = To: Tomcat Users List = Subject: Re: re-newbie help = = = It seems like you need more education about servlets and jsps. = = Sun has a tutorial at: = java.sun.com/webservices/docs/1.3/tutorial/doc/ = = By topic, look at chapters 3,4,15-19 = = -Tim = = tsaiching wong wrote: = = yeah, i am. what is a good way to do abt this? create a index.html to = invoke the function and then edit the server.xml file and = place the lines = notifying tomcat of the existence of the .class java files? = = = -Original Message- = = From: Tim Funk [mailto:[EMAIL PROTECTED] = = Sent: Wednesday, March 03, 2004 4:29 AM = = To: Tomcat Users List = = Subject: Re: re-newbie help = = = = = = You are probably using the invoker = = = = http://jakarta.apache.org/tomcat/faq/misc.html#invoker = = = = -Tim = = = = crombie wrote: = = = = hi, = = = = i'm re-introducing myself to tomcat after 2 yrs. for some = = reason i cannot get my servlet apps to = = run. i installed tomcat, got the welcome screen at port 8080 = = but when i put my class files in the = = /webapps dir, it won't run. um, can i get some pointers on = = where to get docs and etc. the docs = = at sun.com are not doing me any good. does anyone have tomcat = = set up with intellj idea? = = = = = = = = = - = = 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: Serialization issue
Right now I get the exception even when I try to serialize a HashMap I just created, without any data in it. I would guess that any request parameters stored in the map returned by request.getParameterMap() should be serializable right? I don't understand how, f I'm serializing a new serializable object, the CyoteWriter get's involved. Sean On Wednesday, March 3, 2004, at 03:03 PM, Shapira, Yoav wrote: Hi, What is the CoyoteWriter object I keep running inot, and how can I mark it as transient? It's the HTTP connector's writer, and you can't mark it as transient. You would have to manually remove non-serializable attributes from a copy of the Map before you try to serialize the copy. 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: reclaiming memory problem PS
Hello, and thank you for that, Yes, I am timing the session out and trying to handle the result. I have: HttpSession objSession = request.getSession(true); String sessionStatus = (String) objSession.getAttribute(sessionStatus); if (sessionStatus == null) { forward off to JSP } Now sessionStatus is getting caught fine, but when I try and redirect to a JSP after that, nothing happens. I originally tried mapping.findForward (Struts), response.sendRedirect and forwarding using RequestDispatcher. I have tried getSession(true) and false. What implications (if any) does session timeout have in terms of forwarding after the session is invalidated? Many thanks G. Jerald, session.setMaxInactiveTimeout(-1); Yeah, this is a bad idea. The session will never go away by itself. This *requires* the user to press a logout button, and for you to explicitly call session.invalidate(). Users frequently do not log themselves out, and their sessions will never die. You will eventually run out of memory. If you need a long timeout, just make it really long (like a couple of hours). There's usually no good reason to make it -1. PS is the session time out linked wirth inactivity? My session attribute only persists as long as I am using the app. That's exactly how the 'inactive' timeout works. -chris ATTACHMENT part 2 application/pgp-signature name=signature.asc - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now