RE: [POLL] Logging
Log4J. Haven't tried anything else, since Log4J works and is very adaptable by just altering configuration (no code changes). - Tatu V. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker Sent: 21. marraskuuta 2003 8:36 To: [EMAIL PROTECTED] Subject: Re: [POLL] Logging Aside from a couple of throw-away apps (that I can't be bothered to config :), it's Log4J all the way ;-). Pitre, Russell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I need to use a robbust logging api for my webapp that I'm building, so I decided I would cast a poll to get census of what everyone prefers Logging, Which do you prefer? 1. Log4j 2. Java.util.Logging 3. Other Russ - 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]
AW: Multiple Tomcats handled by one Apache
Hello, I didn't find any hint in these links. So maybe anyone can describe how to manage this. For configuring the two different versions of Tomcat I think I have to switch the mod_jk.conf including depending on the version I want to use. So mod_jk.so should be able to forward requests to different ports. Say that Tomcat 1 is a 3.3.1 and Tomcat 2 is a 4.1.24. Tomcat 1 uses port 8007 and Tomcat 2 uses 8009 to listen to Apache. I setup virtual hosts in Apache's httpd.conf which has different paths for including the mod_jk.conf and different uris in the JkMounts. That's the way I tried, but it doesn't work. Dierk Wegener -Ursprungliche Nachricht- Von: Tim Funk [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 20. November 2003 18:44 An: Tomcat Users List Betreff: Re: Multiple Tomcats handled by one Apache Its possible. (Hopefully one of links describes it) ... http://jakarta.apache.org/tomcat/faq/connectors.html -Tim Wegener, Dierk wrote: Hello, is it possible to use different Tomcats (not multiple instances but real different versions) in one Apache installations? In workers.properties there is an entry for workers.tomcat_home which I suppose to mean that multiple instances of one Tomcat installation can be started as workers. My problem is that several systems on one physical machine need different Tomcat versions but all have to be reachable on Port 80. So my approach was to load the mod_jk and to define VirtualHosts (in httpd.conf) where the Include-directives point to the different Tomcats. Using different mount points for JkMount should direct the requests to the correct application. Unfortunately I am not able to get to work such a configuration. Can anyone help? Thanks!! Dierk Wegener - 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: Multiple Tomcats handled by one Apache
Wegener, Dierk [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I didn't find any hint in these links. So maybe anyone can describe how to manage this. For configuring the two different versions of Tomcat I think I have to switch the mod_jk.conf including depending on the version I want to use. So mod_jk.so should be able to forward requests to different ports. Say that Tomcat 1 is a 3.3.1 and Tomcat 2 is a 4.1.24. Tomcat 1 uses port 8007 and Tomcat 2 uses 8009 to listen to Apache. I setup virtual hosts in Apache's httpd.conf which has different paths for including the mod_jk.conf and different uris in the JkMounts. That's the way I tried, but it doesn't work. I don't know about you, but I have a similar config running for quite a while now that works like a charm :). Note that 8007 is the default port for ajp12 (which is deprecated, even in Tomcat 3.3.x). Both Tomcats should be setup to have their ajp13 connector listening to the respective ports. Dierk Wegener -Ursprungliche Nachricht- Von: Tim Funk [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 20. November 2003 18:44 An: Tomcat Users List Betreff: Re: Multiple Tomcats handled by one Apache Its possible. (Hopefully one of links describes it) ... http://jakarta.apache.org/tomcat/faq/connectors.html -Tim Wegener, Dierk wrote: Hello, is it possible to use different Tomcats (not multiple instances but real different versions) in one Apache installations? In workers.properties there is an entry for workers.tomcat_home which I suppose to mean that multiple instances of one Tomcat installation can be started as workers. My problem is that several systems on one physical machine need different Tomcat versions but all have to be reachable on Port 80. So my approach was to load the mod_jk and to define VirtualHosts (in httpd.conf) where the Include-directives point to the different Tomcats. Using different mount points for JkMount should direct the requests to the correct application. Unfortunately I am not able to get to work such a configuration. Can anyone help? Thanks!! Dierk Wegener - 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: Linux specific JVM problem
And this is from strace log: 16313 open(/proc/stat, O_RDONLY) = -1 EACCES (Permission denied) 16313 open(/proc/cpuinfo, O_RDONLY) = -1 EACCES (Permission denied) 16313 open(/proc/meminfo, O_RDONLY) = -1 EACCES (Permission denied) 16313 open(/proc/self/stat, O_RDONLY) = -1 EACCES (Permission denied) Is that the recomended way to go? Any advice? There is something wired in the way you are mounting the /proc filesystem. Either you made something messy in the fstab or your distribution is using some paranoia settings. Here is my fstab proc entry : none /proc procdefaults0 0 What is yours ? François. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Multiple Tomcats handled by one Apache
Hello, can you please describe you managed to get to work? Thank you! Dierk Wegener -Ursprungliche Nachricht- Von: Bill Barker [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. November 2003 09:01 An: [EMAIL PROTECTED] Betreff: Re: Multiple Tomcats handled by one Apache Wegener, Dierk [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I didn't find any hint in these links. So maybe anyone can describe how to manage this. For configuring the two different versions of Tomcat I think I have to switch the mod_jk.conf including depending on the version I want to use. So mod_jk.so should be able to forward requests to different ports. Say that Tomcat 1 is a 3.3.1 and Tomcat 2 is a 4.1.24. Tomcat 1 uses port 8007 and Tomcat 2 uses 8009 to listen to Apache. I setup virtual hosts in Apache's httpd.conf which has different paths for including the mod_jk.conf and different uris in the JkMounts. That's the way I tried, but it doesn't work. I don't know about you, but I have a similar config running for quite a while now that works like a charm :). Note that 8007 is the default port for ajp12 (which is deprecated, even in Tomcat 3.3.x). Both Tomcats should be setup to have their ajp13 connector listening to the respective ports. Dierk Wegener -Ursprungliche Nachricht- Von: Tim Funk [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 20. November 2003 18:44 An: Tomcat Users List Betreff: Re: Multiple Tomcats handled by one Apache Its possible. (Hopefully one of links describes it) ... http://jakarta.apache.org/tomcat/faq/connectors.html -Tim Wegener, Dierk wrote: Hello, is it possible to use different Tomcats (not multiple instances but real different versions) in one Apache installations? In workers.properties there is an entry for workers.tomcat_home which I suppose to mean that multiple instances of one Tomcat installation can be started as workers. My problem is that several systems on one physical machine need different Tomcat versions but all have to be reachable on Port 80. So my approach was to load the mod_jk and to define VirtualHosts (in httpd.conf) where the Include-directives point to the different Tomcats. Using different mount points for JkMount should direct the requests to the correct application. Unfortunately I am not able to get to work such a configuration. Can anyone help? Thanks!! Dierk Wegener - 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: JDBCRealm through a firewall
Hi, it works now. :-) The reconnect function of Tomcat 4.1.29 works, when there is really no jdbc-connection from tomcat to the database. Therefore we changed the timeout settings in the firewall that the 'connction' timeout has the same value as the 'absolute' timeout an the 'half-close' timeout was modified to 0 seconds. After this changes the JDBCRealm became able to check if there is a jdbc-connection available or not and can try to reconnect. I think 4.1.29's JDBCRealm tried to reconnect on failure. our firewall (Cisco PIX 506) seems to be the reason for a 'java.sql.Exception' given by the JDBCRealm: - -- 2003-11-13 09:46:28 JDBCRealm[dmz.domain]: Exception performing authentication java.sql.SQLException: System or internal error ... - -- The Tomcat 4.1.24 with our webapplication stays on the DMZ outside the firewall. The Database (the server for our JDBCRealm) stays behind the firewall, which let pass the TCP-Requests through the Port 'myport', we set in the 'connectionURL'. Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.informix.jdbc.IfxDriver connectionURL=jdbc:informix-sqli://ip-address-inside:myport/upload:i nformixserver=myserver connectionName=tomcat connectionPassword=tomcat userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / If the Servlet-Engine on the DMZ don't get any authentication-requests for about one hour, the Cisco Pix doesn't detect any traffic on this established connection. Therefore (security reasons) the Pix kills the Realm-Connection from the DMZ to the Database, what is the only reason for a broken and unusable JDBCRealm. How can we force the Servlet-Engine to establish a new Realm-Connection to the Database without a restarting the complete Tomcat-Server ? -- Holger de Wall LKV-SH, Steenbeker Weg 151, Kiel 24106 Tel. : +049 431-33987-38 Fax : +049 431-33987-20 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : not see the directory
Ok it s work for all webapps But i want to configure for each webapps In the web.xml in WEB-INF how to this. thanks -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 8:49 PM To: 'Tomcat Users List' Subject: RE: not see the directory set listings to false in conf/web.xml Charlie -Original Message- From: eric perso [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 11:30 AM To: tomcat user List Subject: not see the directory hi, i search to: don't see inside a directory like www.toto.com/images/ but i use in the jsp and html pages the image www.toto.com/images/i.gif how to do this thanks; best regards - 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]
Authentication for web services
Hi everybody! I'm new to this list. I want to use jndi-ldap realm for user authentication to access to some web services developes with axis. But how? It's a valid solution or there is something better? I made up a swing gui where user put login-password...and then? I must say to server that this authentication is for axis? i made a web services for handle this? Thanks, ~~~ Rudi Verago [vLAiN] [EMAIL PROTECTED] ~~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hot deploy
Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Designing Systems Help!
Thank you very much I will definately have a look at it. Thankx Vaneet -Original Message- From: Goehring, Chuck Mr., RCI - San Diego [mailto:[EMAIL PROTECTED] Sent: Thu 20/11/2003 19:15 To: Tomcat Users List Cc: Subject: RE: Designing Systems Help! Vaneet, There are a ton of open source projects at www.sourceforge.net. There is a keyword search capably to find existing projects. Check the Development Status and other project attributes to see if a project meets your objectives. Don't know if there is a Document Management system, but you might find a framework or taglib that will cover some of the pieces. And of course Jakarta has many framework and components libraries for doing various things. Chuck -Original Message- From: Vaneet Sharma [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 1:19 AM To: Tomcat Users List Subject: Designing Systems Help! Hi all. . Currently i am designing a document management system. According to the architecture proposed, it will be a three - tier architecture. (web based)I am looking forward to use J2EE .. i will be using Tomcat to run it. What i need to know is ? Is there any open source project for Document and Knowledge Management Systems. (Basically versioning the files and searching, storing, and other features). I think i can use good ready made reusable objects in my design.? Where can i get an idea .. on how to desing a good document management system. I want the business rules to lie in an XML file so that the inteface , database and coding need not be changed. Lets say, if my company wants to add some features on the interface , then they can specify in XML file and whole system can be reflected. I would appreciate very much any help on this subject. My research work has led me to Adaptive Reflective Systems. But still, as there are lot of industry experts, i would like to have a feedback. Kind Regards to all Yours Vaneet -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wed 19/11/2003 14:25 To: Tomcat Users List Cc: Subject: RE: Tomcat OpenJMS Design Pattern? Howdy, I've used and use OpenJMS with tomcat all the time, including in several production systems. What are you looking for specifically? A document? Code that sends messages to an OpenJMS queue/topic, received from an OpenJMS queue/topic, all of the above? I've actually gone from using tomcat's JNDI support to specifying the JMS connection parameters in an app-specific configuration file and creating the JMS objects myself. But I had it working via tomcat's JNDI before as well. Yoav Shapira Millennium ChemInformatics -Original Message- From: Gavin, Rick [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:25 PM To: Tomcat Users List Subject: Tomcat OpenJMS Design Pattern? Hi All, Just wondering if any could post a working design pattern for using openJMS or another open JMS engine with tomcat, preferably a model using asynchronous queue message handling. I figured someone around here has done it and I would rather use a tried and true model. Looking for some basics about best intregration method, and or for dealing with async message Handling. I currently have openJMS setup using persistent Database storage, using JNDI content lookup to Get the JMS connection factory, is this better looked up once and bound to servlet context as an Application scope variable, etc, etc? Thanks for you any help, Rick This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.
RH 9 + Apache 2 + Tomcat 5 + Jk 2
Hello, I am new at this stuff. My system architecture is a RedHat 9 with Apache Web Server 2.0.40; this Apache version is distributed and pre-built with RH 9, but I applied all the patches and actualizations that RH supplies for it. And now I installed Tomcat 5.0.14 and Jk Connector 2.0 (from its source code). I tested Apache (default configuration) and Tomcat (Catalina Stand-alone configuration) and they works perfetly. But now I am trying to configure Jk Connector because I need that Apache supplies JSPs and Servlets. I saw different web pages that explain it but for previous version of Jk and Tomcat. I tried to adapt these explanations to the new version but it did not work. Could anyone show me the light? Any kind of help would be welcome. Thank you in advance. Pedro Rafael Sánchez Aranda - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and a DLL
Hi all, I have developed a small app with jawin (a java2COM bridge). I have used eclipse as a development tool and I referenced the jawin libraries and all works ok. the problem is when i deploy the app to Tomcat 4 and try to use a jsp to invoke my classes, I get an error that I can't solve. I think is a problem of ubication of JAWIN libraries because when I try to get other class that does not use JAWIN, all works perfectly. I simplified the JSP in order to detect the error and I let it to invoke a simple constructor but goes on crashing! I tried to put jawin.dll and jawin.jar in the same directory that the class, in the app lib directory, in the common/lib directory of tomcat, in system32, in lib of the JRE, in bin of the JRE. it's useless, I don't know how to solve the error. The JSP is just as this. * !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN %@ page import=es.tid.coche.correo.GestorCorreo % % GestorCorreo gestor = new GestorCorreo(); % html head /head body h1MAIL APPLICATION/h1 /body /html * As you can see I only invoke the constructor but it crashes. I have emptied the constructor method and works pretty fine (doing nothing...obviously) but when i make a call to an object of the library it crashes. This does not happen when i use eclipse... import com.develop.jawin.*; import com.develop.jawin.win32.*; import java.util.Vector; import es.tid.coche.beans.CorreoBean; the error I get in Internet Explorer is this: org.apache.jasper.JasperException: com/develop/jawin/DispatchPtr (Illegal Class name jawin folder/develop/jawin/DispatchPtr) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 48) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) DispatchPtr is a java class of the library that I use... any ideas? David Sierra Fernández e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : RE : not see the directory
Ok fine i give it up. Cool Thanks all I use in my specific web.xml : this servlet servlet-namelister/servlet-name servlet-class org.apache.catalina.servlets.DefaultServlet /servlet-class init-param param-namelistings/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-namelister/servlet-name url-pattern//url-pattern /servlet-mapping -Original Message- From: eric perso [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 9:33 AM To: 'Tomcat Users List' Subject: RE : not see the directory Ok it s work for all webapps But i want to configure for each webapps In the web.xml in WEB-INF how to this. thanks -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 8:49 PM To: 'Tomcat Users List' Subject: RE: not see the directory set listings to false in conf/web.xml Charlie -Original Message- From: eric perso [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 11:30 AM To: tomcat user List Subject: not see the directory hi, i search to: don't see inside a directory like www.toto.com/images/ but i use in the jsp and html pages the image www.toto.com/images/i.gif how to do this thanks; best regards - 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]
getContext returns null!
Hi, I just would like to get a reference to the ServletContext of another web application as the current one, to get a RequestDispatcher object. I know that the path should begin with / and that it is interpreted relative to the server's document root . So i'm in a web application context and would like to get the context of c:\tomcat\webapps\tutobean application. I've written the following code: protected void doGet(HttpServletRequest req, HttpServletResponse rep) throws ServletException, IOException { ServletContext currentSC = getServletContext(); //reference to the current ServletContext ServletContext distantSC = currentSC.getContext(/tutobean); //reference to the ServletContext of tutobean webappl, corresponding to http://localhost:8080/tutobean. distantSC.getRequestDispatcher(/index.html).forward(req,rep); //NullPOinterException here because distantSC is null!!! What's wrong in my code? Thanks for your response, Regards, Cyril.
HTTP Error 302
Hi, what are the common reasons, that tomcat 4.1 is returning a HTTP 302 error page? Thanks for your answere Günter
Re: search to don t list
On 11/20/2003 03:20 PM eric perso wrote: i search to don 't see a directory. exemple : i ve a dir /images in my webapp how to don't see: http://www.toto.com/images but i cant use the images into this directory on another pages Hi Eric I don't understand exactly what you are trying to do. Are you trying to prevent a directory listing for the images directory? I know that you can set a welcome-file in your web.xml and that will block the directory listing for the home directory. Right now I just realised I don't know know the setting to prevent all directory listings. Perhaps someone else can jump in? Adam -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : search to don t list
Thanks but see the topic not see the directory bye -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 10:56 AM To: Tomcat Users List Subject: Re: search to don t list On 11/20/2003 03:20 PM eric perso wrote: i search to don 't see a directory. exemple : i ve a dir /images in my webapp how to don't see: http://www.toto.com/images but i cant use the images into this directory on another pages Hi Eric I don't understand exactly what you are trying to do. Are you trying to prevent a directory listing for the images directory? I know that you can set a welcome-file in your web.xml and that will block the directory listing for the home directory. Right now I just realised I don't know know the setting to prevent all directory listings. Perhaps someone else can jump in? Adam -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - 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: getContext returns null!
I think you may need to set your Context to be crossContext. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html HTH, Jon cyril vidal wrote: Hi, I just would like to get a reference to the ServletContext of another web application as the current one, to get a RequestDispatcher object. I know that the path should begin with / and that it is interpreted relative to the server's document root . So i'm in a web application context and would like to get the context of c:\tomcat\webapps\tutobean application. I've written the following code: protected void doGet(HttpServletRequest req, HttpServletResponse rep) throws ServletException, IOException { ServletContext currentSC = getServletContext(); //reference to the current ServletContext ServletContext distantSC = currentSC.getContext(/tutobean); //reference to the ServletContext of tutobean webappl, corresponding to http://localhost:8080/tutobean. distantSC.getRequestDispatcher(/index.html).forward(req,rep); //NullPOinterException here because distantSC is null!!! What's wrong in my code? Thanks for your response, Regards, Cyril. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE : search to don t list
On 11/21/2003 11:01 AM eric perso wrote: Thanks but see the topic not see the directory bye Yes, I just saw the other thread the solution. Glad you got a solution. BTW if you keep your postings threaded, then I would have seen that someone answered you. It's the general way most people work, when their email reader shows the threads. Thanks Adam -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [POLL] Logging
2. Java.util.Logging Purely because it's part of the sdk and meets my logging requirements. I did use log4j before, but since I decided I should know java.util.logging, I stuck with it after learning how to use it. Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getContext returns null!
You're right Jon. Thanks for the tip! Cyril. - Original Message - From: Jon Wingfield [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:19 AM Subject: Re: getContext returns null! I think you may need to set your Context to be crossContext. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html HTH, Jon cyril vidal wrote: Hi, I just would like to get a reference to the ServletContext of another web application as the current one, to get a RequestDispatcher object. I know that the path should begin with / and that it is interpreted relative to the server's document root . So i'm in a web application context and would like to get the context of c:\tomcat\webapps\tutobean application. I've written the following code: protected void doGet(HttpServletRequest req, HttpServletResponse rep) throws ServletException, IOException { ServletContext currentSC = getServletContext(); //reference to the current ServletContext ServletContext distantSC = currentSC.getContext(/tutobean); //reference to the ServletContext of tutobean webappl, corresponding to http://localhost:8080/tutobean. distantSC.getRequestDispatcher(/index.html).forward(req,rep); //NullPOinterException here because distantSC is null!!! What's wrong in my code? Thanks for your response, Regards, Cyril. - 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]
Severity less - DBCP not closing connection.
I hope it is not posted twice. I wrote this mail in forenoon and when tried to send internet connection lost. I am retyping everything. I have seen DBCP not closing a connection if the request is forwarded to same page in the try block before the request is forwarded. With sendRedirect no problem. This occurs when the connection is obtained through JNDI look up datasource. I tested the same code in stand alone java application using manual pooling which works fine. I am using Tomcat 4.1.27 and DBCP 1.1 (I upgraded it today), JDK 1.3.1 and Oracle 8i. My configuration and code is given below. --- Context path=/test docBase=test debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=test_log. suffix=.txt timestamp=true/ Resource name=jdbc/Test auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/Test parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value1/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value10/value /parameter parameter nameusername/name valuescott/value /parameter parameter namepassword/name valuetiger/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@localhost:1521:DB/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout /name value30/value /parameter /ResourceParams /Context -- html body %@ page import=java.sql.*% %@ page import=javax.sql.*% %@ page import=javax.naming.*% %@ page import=org.apache.commons.dbcp.datasources.SharedPoolDataSource% %@ page import=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS% % /*DriverAdapterCPDS cpds = new DriverAdapterCPDS(); cpds.setDriver(oracle.jdbc.driver.OracleDriver); cpds.setUrl(jdbc:oracle:thin:@localhost:1521:DB); cpds.setUser(scott); cpds.setPassword(tiger); SharedPoolDataSource tds = new SharedPoolDataSource(); tds.setConnectionPoolDataSource(cpds); tds.setMaxActive(1); tds.setMaxIdle(1); tds.setMaxWait(3000); */ Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)initContext.lookup(java:/comp/env/jdbc/Test); PreparedStatement pstmt = null; ResultSet rs = null; Connection conn = null; String action = request.getParameter(action); if(1.equals(action)){ long time = 0; try{ conn = tds.getConnection(); conn = ds.getConnection(); pstmt = conn.prepareStatement(select empno,ename from scott.emp where empno=?); pstmt.setString(1,7369); rs = pstmt.executeQuery(); while(rs.next()){ System.out.println(Ename - +rs.getString(1)+ - +rs.getString(2)); } time = System.currentTimeMillis(); System.out.println(Before forward - 0);time=System.currentTimeMillis(); application.getRequestDispatcher(/TestDB.jsp?action=2).forward(request,r esponse); System.out.println(After forward - +(System.currentTimeMillis()-time)); }catch(SQLException sqle){ System.out.println(1 +sqle); }finally{ if(rs!=null)rs.close(); if(pstmt!=null) pstmt.close(); if(conn!=null)conn.close(); } }else if(2.equals(action)){ long time = 0; System.out.println(In Two start - time = 0);time=System.currentTimeMillis(); try{ conn = tds.getConnection(); conn = ds.getConnection(); pstmt = conn.prepareStatement(select empno,ename from scott.emp where empno=?); pstmt.setString(1,7499); rs = pstmt.executeQuery(); while(rs.next()){ System.out.println(Ename - +rs.getString(1)+ - +rs.getString(2)); } }catch(SQLException sqle){ System.out.println(2 +sqle); }finally{ if(rs!=null)rs.close(); if(pstmt!=null) pstmt.close(); if(conn!=null)conn.close(); } System.out.println(In Two end - +(System.currentTimeMillis()-time)); } % I work with one connection to test for connection leak and any bottlenecks in code. It works fine if I put the forward() after the end of finally block. I want to know whether it is bug or config error or Tomcat behaves so. Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Synchronising database access
Hi, I want to synchronise all database access. There are lots of situations where first first a select query is performed to get the results and then insert/update data. I dont want to implement row level locking or optimistic locking. I just want to synchronise the whole process. Only after a thread completes the entire process other threads can execute the code. How to do it. Do I have to synchronise on Connection or on this or implement SingleThreadModel. I also want to know how much extra time a synchronised block requires than an unsynchronised block. Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Synchronising database access
Hi There, Use a singleton class to manage the database transactions. Then implement a owner mechanism. E.g. class DbTxMgr { String owner = null; public synchronized boolean lockMgr (String threadId) { if (owner == null) { owner = threadId; return true; } else { if (owner.equals(threadId)) { return true } return false; } } public synchronized void releaseMgr (String threadId) { if (owner != null) { if (owner.equals(threadId)) { owner = null; } } } public synchronized boolean insert (String statement, String threadId) { if (owner == null) { owner = threadId; } if (owner.equals(threadId)) { //do the transaction } } } your code class tester { //name of your thread Thread t = new Thread(testerThread) ... if (lockMgr(t.getName())) { //do database code } lockMgr.releaseLock(t.getName()); } This way olny the owner of the lock can perform transactions and all other threads must wait for the lock to be released Thanks Pete -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 11:51 To: Tomcat Users List Subject: [OT] Synchronising database access Hi, I want to synchronise all database access. There are lots of situations where first first a select query is performed to get the results and then insert/update data. I dont want to implement row level locking or optimistic locking. I just want to synchronise the whole process. Only after a thread completes the entire process other threads can execute the code. How to do it. Do I have to synchronise on Connection or on this or implement SingleThreadModel. I also want to know how much extra time a synchronised block requires than an unsynchronised block. Antony Paul. - 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] Synchronising database access
thanks for the reply synchrosing servlet code dont work ? Antony Paul - Original Message - From: Peter Guyatt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 5:28 PM Subject: RE: [OT] Synchronising database access Hi There, Use a singleton class to manage the database transactions. Then implement a owner mechanism. E.g. class DbTxMgr { String owner = null; public synchronized boolean lockMgr (String threadId) { if (owner == null) { owner = threadId; return true; } else { if (owner.equals(threadId)) { return true } return false; } } public synchronized void releaseMgr (String threadId) { if (owner != null) { if (owner.equals(threadId)) { owner = null; } } } public synchronized boolean insert (String statement, String threadId) { if (owner == null) { owner = threadId; } if (owner.equals(threadId)) { file://do the transaction } } } your code class tester { file://name of your thread Thread t = new Thread(testerThread) ... if (lockMgr(t.getName())) { file://do database code } lockMgr.releaseLock(t.getName()); } This way olny the owner of the lock can perform transactions and all other threads must wait for the lock to be released Thanks Pete -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 11:51 To: Tomcat Users List Subject: [OT] Synchronising database access Hi, I want to synchronise all database access. There are lots of situations where first first a select query is performed to get the results and then insert/update data. I dont want to implement row level locking or optimistic locking. I just want to synchronise the whole process. Only after a thread completes the entire process other threads can execute the code. How to do it. Do I have to synchronise on Connection or on this or implement SingleThreadModel. I also want to know how much extra time a synchronised block requires than an unsynchronised block. Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.12 reboot and services under Win2K
This is running Windows 2000 Advanced Server Service Pack 4 (build 2195) on a AMD K6-200. What I'm trying to do is to get the darned thing to fire up on boot, without having to log in as a user. Older versions start with a batch file but the latest one seems to also install a service. I can't start the Tomcat service from the services panel. Note that; 1) Instead of the latest version, of Jakarta/Tomcat, I got the Java Web Services Developer Pack 1.2 from Sun. 2) I then got the latest version directly from jakarta.apache.org. To my dismay, not only are they different but Sun put them in completely different places (directory tree) and renamed some of it, ARGH! 3) However, the latest Tomcat seems to install a Win2K service. My problem is that I can't get it to start from the services control panel. I've not added any new contexts, only the examples tree. Yes, I've printed out a ream of dox, literally, and have searched through them all. I'm tabeling the work on the ISAP Redirector until I get this sorted out but, that's next. - R O E L A N D M J M E Y E R Yahoo Messenger: roeland_meyer http://www.roelandmeyer.org Running Tomcat 4.1x under Windows 2000 Advanced Server Service Pack 4 (build 2195) on a AMD K6-200 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Synchronising database access
If you implement your database access as a static synchronized method, only one instance of the class will be able to execute it at the same time. If you put all your database stuff in the same class, this schema should be enough. If only one servlet does database access, then you can put these methods on the servlet, but if you have more than one servlet doing this stuff, you should place your code in a separated class. Apart from this, take into account that this will be a, generally speaking, very weak solution. In a general scenario, other applications (or webapps) could be accessing your database. In those cases, the only safe solution are database transactions :-) HTH, Rodrigo Ruiz Antony Paul wrote: thanks for the reply synchrosing servlet code dont work ? Antony Paul - Original Message - From: Peter Guyatt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 5:28 PM Subject: RE: [OT] Synchronising database access Hi There, Use a singleton class to manage the database transactions. Then implement a owner mechanism. E.g. class DbTxMgr { String owner = null; public synchronized boolean lockMgr (String threadId) { if (owner == null) { owner = threadId; return true; } else { if (owner.equals(threadId)) { return true } return false; } } public synchronized void releaseMgr (String threadId) { if (owner != null) { if (owner.equals(threadId)) { owner = null; } } } public synchronized boolean insert (String statement, String threadId) { if (owner == null) { owner = threadId; } if (owner.equals(threadId)) { file://do the transaction } } } your code class tester { file://name of your thread Thread t = new Thread(testerThread) ... if (lockMgr(t.getName())) { file://do database code } lockMgr.releaseLock(t.getName()); } This way olny the owner of the lock can perform transactions and all other threads must wait for the lock to be released Thanks Pete -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 11:51 To: Tomcat Users List Subject: [OT] Synchronising database access Hi, I want to synchronise all database access. There are lots of situations where first first a select query is performed to get the results and then insert/update data. I dont want to implement row level locking or optimistic locking. I just want to synchronise the whole process. Only after a thread completes the entire process other threads can execute the code. How to do it. Do I have to synchronise on Connection or on this or implement SingleThreadModel. I also want to know how much extra time a synchronised block requires than an unsynchronised block. Antony Paul. - 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]
I18N problems with JVM 1.3.1
I have a problem with accents that is occurring when I run Tomcat under JVM 1.3.1, but not under 1.4. I am trying to convert a byte[] (that comes from a socket in the production code) to a String. The bytes come from a CGI and are ISO8859-1. When I do String(myByteArray), I get a question mark character where I should get an accented character. Following some advice picked up from the web, I have forced the JVM to start with a file.encoding=ISO8859_1. This works perfectly when running Blackdown 1.4 but fails when using Blackdown 1.3.1. Here is a demo JSP: The following JSP: html Convert a byte: %= new String(new byte[]{(byte)'é'}) %br Convert ISO: %= new String(new byte[]{(byte)'é'}, ISO8859_1) %br Encoding: %= sun.io.ByteToCharConverter.getDefault() %br Locale: %=java.util.Locale.getDefault()% /html Here is the CATALINA_OPTS used: -Dfile.encoding=ISO8859_1 -Duser.language=fr -Duser.region=CA If I do a Sytem.getProperty(file.encoding), I get ISO8859_1 in both JVM, but sun.io.ByteToCharConverter.getDefault() - which is what String(byte[]) uses - says ASCII for JVM 1.3 and ISO8859_1 for JVM 1.4. It would also seem this is not the only setting getting ignored by the 1.3 JVM... The language and region settings result in a locale of fr_CA for 1.4 but are ignored (and default to en_US) for 1.3 I know I could simply force the encoding as I did in line 2 of the JSP, but I am trying to migrate a whole lot of code from Websphere to Tomcat that was written by many developers and would rather not seek all instances of byte arrays being converted to strings. Moreover, I suspect this is merely the tip of the iceberg and other occurrences of accents being garbled might be going on in less obvious places. I also could just use version 1.4 of the JVM, but the only widely available DEB for JVM 1.4 is a BETA. If at all possible, I'd like to use a production release managed by the debian package manager... Anyone has any suggestion? Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where to get JK2 binary for Linux
Greeting Do you know where I can get a latest JK2 binary for Linux OS. I am using Red Hat 8.0, apache 2.X and Tomcat 5.14. I went to this link. They do not have jk2 for linux. http://mirrors.isc.org/pub/apache/jakarta/tomcat- connectors/jk2/binaries/ Thanks, Yoom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and a DLL
David, The line Illegal Class name jawin folder/develop/jawin/DispatchPtr) is very suspicious - I'm pretty sure that the space in the path to your class will cause problems. Try renaming jawin folder to just jawin and rebuild the jar. Andy -Original Message- From: David Sierra Fernández [mailto:[EMAIL PROTECTED] Sent: 21 November 2003 09:16 To: [EMAIL PROTECTED] Subject: Tomcat and a DLL Hi all, I have developed a small app with jawin (a java2COM bridge). I have used eclipse as a development tool and I referenced the jawin libraries and all works ok. the problem is when i deploy the app to Tomcat 4 and try to use a jsp to invoke my classes, I get an error that I can't solve. I think is a problem of ubication of JAWIN libraries because when I try to get other class that does not use JAWIN, all works perfectly. I simplified the JSP in order to detect the error and I let it to invoke a simple constructor but goes on crashing! I tried to put jawin.dll and jawin.jar in the same directory that the class, in the app lib directory, in the common/lib directory of tomcat, in system32, in lib of the JRE, in bin of the JRE. it's useless, I don't know how to solve the error. The JSP is just as this. ** ** * !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN %@ page import=es.tid.coche.correo.GestorCorreo % % GestorCorreo gestor = new GestorCorreo(); % html head /head body h1MAIL APPLICATION/h1 /body /html ** ** * As you can see I only invoke the constructor but it crashes. I have emptied the constructor method and works pretty fine (doing nothing...obviously) but when i make a call to an object of the library it crashes. This does not happen when i use eclipse... import com.develop.jawin.*; import com.develop.jawin.win32.*; import java.util.Vector; import es.tid.coche.beans.CorreoBean; the error I get in Internet Explorer is this: org.apache.jasper.JasperException: com/develop/jawin/DispatchPtr (Illegal Class name jawin folder/develop/jawin/DispatchPtr) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrap per.java:2 48) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A pplication FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati onFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp erValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon text.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardConte xtValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon text.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline. java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) DispatchPtr is a java class of the library that I use... any ideas? David Sierra Fernández 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: Severity less - DBCP not closing connection.
You must ensure that your connection manager is closing all ResultSets, Statements, PreparedStatement and finally all connection. With that you DBCP will work. Store a copy of all those objets in Vectors and when you close the connectionm manager, it will close all objetcts stored also. -- De: Antony Paul[SMTP:[EMAIL PROTECTED] Responder:Tomcat Users List Enviada: sexta-feira, 21 de novembro de 2003 8:34 Para: Tomcat Users List Assunto: Severity less - DBCP not closing connection. I hope it is not posted twice. I wrote this mail in forenoon and when tried to send internet connection lost. I am retyping everything. I have seen DBCP not closing a connection if the request is forwarded to same page in the try block before the request is forwarded. With sendRedirect no problem. This occurs when the connection is obtained through JNDI look up datasource. I tested the same code in stand alone java application using manual pooling which works fine. I am using Tomcat 4.1.27 and DBCP 1.1 (I upgraded it today), JDK 1.3.1 and Oracle 8i. My configuration and code is given below. -- -- --- Context path=/test docBase=test debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=test_log. suffix=.txt timestamp=true/ Resource name=jdbc/Test auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/Test parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value1/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value10/value /parameter parameter nameusername/name valuescott/value /parameter parameter namepassword/name valuetiger/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@localhost:1521:DB/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout /name value30/value /parameter /ResourceParams /Context -- -- -- html body %@ page import=java.sql.*% %@ page import=javax.sql.*% %@ page import=javax.naming.*% %@ page import=org.apache.commons.dbcp.datasources.SharedPoolDataSource% %@ page import=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS% % /*DriverAdapterCPDS cpds = new DriverAdapterCPDS(); cpds.setDriver(oracle.jdbc.driver.OracleDriver); cpds.setUrl(jdbc:oracle:thin:@localhost:1521:DB); cpds.setUser(scott); cpds.setPassword(tiger); SharedPoolDataSource tds = new SharedPoolDataSource(); tds.setConnectionPoolDataSource(cpds); tds.setMaxActive(1); tds.setMaxIdle(1); tds.setMaxWait(3000); */ Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)initContext.lookup(java:/comp/env/jdbc/Test); PreparedStatement pstmt = null; ResultSet rs = null; Connection conn = null; String action = request.getParameter(action); if(1.equals(action)){ long time = 0; try{ conn = tds.getConnection(); conn = ds.getConnection(); pstmt = conn.prepareStatement(select empno,ename from scott.emp where empno=?); pstmt.setString(1,7369); rs = pstmt.executeQuery(); while(rs.next()){ System.out.println(Ename - +rs.getString(1)+ - +rs.getString(2)); } time = System.currentTimeMillis(); System.out.println(Before forward - 0);time=System.currentTimeMillis(); application.getRequestDispatcher(/TestDB.jsp?action=2).forward(request,r esponse); System.out.println(After forward - +(System.currentTimeMillis()-time)); }catch(SQLException sqle){ System.out.println(1 +sqle); }finally{ if(rs!=null)rs.close(); if(pstmt!=null) pstmt.close(); if(conn!=null)conn.close(); } }else if(2.equals(action)){ long time = 0; System.out.println(In Two start - time = 0);time=System.currentTimeMillis(); try{ conn = tds.getConnection(); conn = ds.getConnection(); pstmt = conn.prepareStatement(select empno,ename from scott.emp where empno=?); pstmt.setString(1,7499); rs = pstmt.executeQuery(); while(rs.next()){ System.out.println(Ename - +rs.getString(1)+ - +rs.getString(2)); } }catch(SQLException sqle){ System.out.println(2 +sqle); }finally{ if(rs!=null)rs.close(); if(pstmt!=null) pstmt.close(); if(conn!=null)conn.close(); }
Apache Tomcat/ 4.0.1 /HTTP Status 503 / Servlet constructurl is currently unavailabe
Hi, i am using the Tomcat in combination with the iROS meta-OS. If i try to create a servlet for displaying URLs on multiple clients with the iROS tool i get the message you can see in the subject of this mail. Any ideas why this might happen? Thanks a lot! Best Regards, Oliver
Problem With Running Under Tomcat 4.0.6 Service On Windows 2000
I've got a maddening problem. I've posted it to this forum before on 2-Oct-2003, without success. I'm hoping to hear from some Tomcat developers or anyone who knows Windows services very well. I've got three Web apps, packaged into WARs, that all use Jakarta's JSTL. The first one is an echo JSP, the second is a JSP that allows users to type ad hoc SQL into a textarea and returns the results, and the third is a work app that I need to deploy for my employer. All three apps run perfectly under Tomcat 4.1.27 running as a service on Windows 2000 on my desktop. The problem is that I'm deploying the work on a server that will only have Tomcat 4.0.6. There's a third-party vendor who deploys their app on Tomcat 4.0.6, so I'm forced to use that version. The natural thing to do is to test all three apps under Tomcat 4.0.6. I deployed the identical WAR files that ran successfully under 4.1.27 and ran them under Tomcat 4.0.6 after modifying the server.xml. The echo JSP and ad hoc SQL tool both deploy and run flawlessly. Both use the JSTL tag libraries without a problem. When I access the work app, I get a JasperException: No such tag redirect in the tag library imported with prefix c. The oddest thing is that if I run the work app under Tomcat 4.0.6 by starting it using the startup.bat instead of running it as a service it runs perfectly again. No JasperException. The Tomcat Windows service runs under the local system account. Yoav Shapiro suggested that I start up Tomcat with the script instead of running it as a service. After he heard the result he threw up his hands, saying it was a bad interaction between Windows and Tomcat. Why should the way in which Tomcat is started and run make such a profound difference? Does anyone know enough about running Windows services to comment? I really need to make this work app run under 4.0.6. It'll be a hard sell to ask the 3rd party vendor to test and certify their stuff running under 4.1.27 now. - MOD __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI and database connection pool
Hallo, I try to establish a database connection pool with Tomcat and MS SQLServer JDBC-Driver. But when I run the program I get the following error: 1000 [http8080-Processor2] INFO connection.DatasourceConnectionProvider - Using datasource: java:comp/env/jdbc/demo 1000 [http8080-Processor2] INFO impl.SessionFactoryImpl - Use outer join fetching: false 1000 [http8080-Processor2] WARN util.JDBCExceptionReporter - SQL Error: 0, SQLState: null 1000 [http8080-Processor2] ERROR util.JDBCExceptionReporter - Cannot create JDBC driver of class '' for connect URL 'null' 1000 [http8080-Processor2] WARN impl.SessionFactoryImpl - Could not obtain connection metadata 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) My server.xml: Context path=/demo docBase=demo Resource name=jdbc/demo scope=Shareable auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/demo parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- DBCP database connection settings -- parameter nameurl/name valuejdbc:microsoft:sqlserver://ASTERIX:1433;DatabaseName=Diplom/valu e /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameusername/name valuesa/value /parameter parameter namepassword/name valuea/value /parameter !-- DBCP connection pooling options -- parameter namemaxWait/name value5000/value /parameter parameter namemaxIdle/name value2/value /parameter parameter namemaxActive/name value4/value /parameter /ResourceParams /Context /Host /Engine /Service /Server My web.xml: resource-ref res-ref-namejdbc/demo/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app I hope someone can help me. Thanks Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
User sessions in Tomcat
It there a way to count or view details from all open user sessions in a Tomcat instalation? Any help is welcome. Thanks
Re: Severity less - DBCP not closing connection.
I tested it using a sample code which is posted. All resultsets,prepared statements and connections are closed in finally block. I dont have a real problem yet. The app is still in developing stage. Antony Paul - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, November 21, 2003 7:21 PM Subject: RE: Severity less - DBCP not closing connection. You must ensure that your connection manager is closing all ResultSets, Statements, PreparedStatement and finally all connection. With that you DBCP will work. Store a copy of all those objets in Vectors and when you close the connectionm manager, it will close all objetcts stored also. -- De: Antony Paul[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: sexta-feira, 21 de novembro de 2003 8:34 Para: Tomcat Users List Assunto: Severity less - DBCP not closing connection. I hope it is not posted twice. I wrote this mail in forenoon and when tried to send internet connection lost. I am retyping everything. I have seen DBCP not closing a connection if the request is forwarded to same page in the try block before the request is forwarded. With sendRedirect no problem. This occurs when the connection is obtained through JNDI look up datasource. I tested the same code in stand alone java application using manual pooling which works fine. I am using Tomcat 4.1.27 and DBCP 1.1 (I upgraded it today), JDK 1.3.1 and Oracle 8i. My configuration and code is given below. -- -- --- Context path=/test docBase=test debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=test_log. suffix=.txt timestamp=true/ Resource name=jdbc/Test auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/Test parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value1/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value10/value /parameter parameter nameusername/name valuescott/value /parameter parameter namepassword/name valuetiger/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@localhost:1521:DB/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout /name value30/value /parameter /ResourceParams /Context -- -- -- html body %@ page import=java.sql.*% %@ page import=javax.sql.*% %@ page import=javax.naming.*% %@ page import=org.apache.commons.dbcp.datasources.SharedPoolDataSource% %@ page import=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS% % /*DriverAdapterCPDS cpds = new DriverAdapterCPDS(); cpds.setDriver(oracle.jdbc.driver.OracleDriver); cpds.setUrl(jdbc:oracle:thin:@localhost:1521:DB); cpds.setUser(scott); cpds.setPassword(tiger); SharedPoolDataSource tds = new SharedPoolDataSource(); tds.setConnectionPoolDataSource(cpds); tds.setMaxActive(1); tds.setMaxIdle(1); tds.setMaxWait(3000); */ Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)initContext.lookup(java:/comp/env/jdbc/Test); PreparedStatement pstmt = null; ResultSet rs = null; Connection conn = null; String action = request.getParameter(action); if(1.equals(action)){ long time = 0; try{ conn = tds.getConnection(); conn = ds.getConnection(); pstmt = conn.prepareStatement(select empno,ename from scott.emp where empno=?); pstmt.setString(1,7369); rs = pstmt.executeQuery(); while(rs.next()){ System.out.println(Ename - +rs.getString(1)+ - +rs.getString(2)); } time = System.currentTimeMillis(); System.out.println(Before forward - 0);time=System.currentTimeMillis(); application.getRequestDispatcher(/TestDB.jsp?action=2).forward(request,r esponse); System.out.println(After forward - +(System.currentTimeMillis()-time)); }catch(SQLException sqle){ System.out.println(1 +sqle); }finally{ if(rs!=null)rs.close(); if(pstmt!=null) pstmt.close(); if(conn!=null)conn.close(); } }else if(2.equals(action)){ long time = 0; System.out.println(In Two start - time
Sticky sessions and load balancing
Hi I am using tomcat 5.0.14 with apache 2.0.47. I have 2 instances of tomcat working with apache infront taking the requests and forwarding to the 2 tomcats. I can make the apache do load balancing, giving each server 50% of the traffic. When i try to create sticky sessions, it works, but only the first tomcat instance gets all the traffic. Is it possible to have sticky sessions with load balancing, ie if a user with out a session comes in it goes to one tomcat, then the next etc, but if a user comes in with a session id, it goes to the tomcat that i was created on??? Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: User sessions in Tomcat
The Tomcat Manager application shows a session count for each running app. On Friday 21 November 2003 09:26 am, Walter do Valle wrote: It there a way to count or view details from all open user sessions in a Tomcat instalation? Any help is welcome. Thanks -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sticky sessions and load balancing
from personal experience, if you really want sticky session for a cluster of servers, use something like Resonate or Router based stick sessions. I've used both in the past. Although it is not easy to setup and configure, once it is setup, it works well. to get sticky sessions to work with apache + multiple tomcats probably will require changing the implementation. I would go with what works and has had severals to iron out all the kinks. peter Drinkwater, GJ (Glen) [EMAIL PROTECTED] wrote: Hi I am using tomcat 5.0.14 with apache 2.0.47. I have 2 instances of tomcat working with apache infront taking the requests and forwarding to the 2 tomcats. I can make the apache do load balancing, giving each server 50% of the traffic. When i try to create sticky sessions, it works, but only the first tomcat instance gets all the traffic. Is it possible to have sticky sessions with load balancing, ie if a user with out a session comes in it goes to one tomcat, then the next etc, but if a user comes in with a session id, it goes to the tomcat that i was created on??? Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Re: Severity less - DBCP not closing connection.
Antony, I have seen DBCP not closing a connection if the request is forwarded to same page in the try block before the request is forwarded. With sendRedirect no problem. If you execute a forward, then it acts just like a method call -- your connection will still be absent from the pool. When you forward, you exit your try/catch block before the browser makes the next request. You have to do your code like this: try { conn = ...; } catch (...) { } finally { conn.close(); } requestDispatcher.forward(...); Otherwise you might deadlock your application. I work with one connection to test for connection leak and any bottlenecks in code. This is a very good idea. It works fine if I put the forward() after the end of finally block. I want to know whether it is bug or config error or Tomcat behaves so. This is a logic error - not a Tomcat bug or config error. You just have to write more careful code. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Error 302
Günter, what are the common reasons, that tomcat 4.1 is returning a HTTP 302 error page? Response code 302 is not an error: it is a redirect. Are you connecting to Tomcat via a browser or some other client? Your client should be following that redirect, which should be specified in the Location header of the response. For more information, check out the HTTP spec at: 1.0 Spec: http://www.ietf.org/rfc/rfc1945.txt 1.1 Spec: http://www.ietf.org/rfc/rfc2616.txt -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dead threads
Howdy, That's a version of my stuff ;) I already sent Laurent a link to it. But thanks anyways, Yoav Shapira Millennium ChemInformatics -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:01 AM To: Tomcat Users List Subject: Re: Dead threads I got this code by searching one list (I think it is tomcat-dev). code is given below. // to print the number of threads in tomcat. ThreadGroup systemthreadgroup; ThreadGroup parentthreadgroup; systemthreadgroup = Thread.currentThread().getThreadGroup(); while ((parentthreadgroup = systemthreadgroup.getParent()) != null) systemthreadgroup = parentthreadgroup; out.println(Thread.currentThread().getName() + : activeCount = + systemthreadgroup.activeCount()+BR); Thread[] array = new Thread[systemthreadgroup.activeCount()]; int count = systemthreadgroup.enumerate(array); for(int i=0;icount;i++) out.println(Thread.currentThread().getName() + :array[+i+] = + array[i].toString()+BR); hope this helps. Antony Paul. - Original Message - From: Laurent Michenaud [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, November 20, 2003 9:16 PM Subject: RE : Dead threads I can't find it. Could u or anybody else post the code ? Thanks -Message d'origine- De : Shapira, Yoav [mailto:[EMAIL PROTECTED] Envoyé : jeudi 20 novembre 2003 14:42 À : Tomcat Users List Objet : RE: Dead threads Howdy, If a thread is dead it will have been GCed. Use a thread dump (kill -s QUIT processId) to get the current list of threads and what they're doing on stdout. There are also programmatic ways to go about this: I've posted at least three times in the past the complete code for a thread-crawler type of class that will display all the threads in the JVM, what they're doing, their state, etc: you can search the list archives for it. Yoav Shapira Millennium ChemInformatics -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 6:52 AM To: Tomcat Users List Subject: Dead threads How to know what Tomcat threads are dead (or hanged, os blocked, or inoperative, or... ) in an Tomcat running on Linux? Any help is welcome. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: JNDI and database connection pool
Stephan, I'm sorry to be so short, but... Search the archives for the string Cannot create JDBC driver of class '' for connect URL 'null'. I think this question gets asked every day. -chris Stephan Wannenwetsch wrote: Hallo, I try to establish a database connection pool with Tomcat and MS SQLServer JDBC-Driver. But when I run the program I get the following error: 1000 [http8080-Processor2] INFO connection.DatasourceConnectionProvider - Using datasource: java:comp/env/jdbc/demo 1000 [http8080-Processor2] INFO impl.SessionFactoryImpl - Use outer join fetching: false 1000 [http8080-Processor2] WARN util.JDBCExceptionReporter - SQL Error: 0, SQLState: null 1000 [http8080-Processor2] ERROR util.JDBCExceptionReporter - Cannot create JDBC driver of class '' for connect URL 'null' 1000 [http8080-Processor2] WARN impl.SessionFactoryImpl - Could not obtain connection metadata 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) My server.xml: Context path=/demo docBase=demo Resource name=jdbc/demo scope=Shareable auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/demo parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- DBCP database connection settings -- parameter nameurl/name valuejdbc:microsoft:sqlserver://ASTERIX:1433;DatabaseName=Diplom/valu e /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameusername/name valuesa/value /parameter parameter namepassword/name valuea/value /parameter !-- DBCP connection pooling options -- parameter namemaxWait/name value5000/value /parameter parameter namemaxIdle/name value2/value /parameter parameter namemaxActive/name value4/value /parameter /ResourceParams /Context /Host /Engine /Service /Server My web.xml: resource-ref res-ref-namejdbc/demo/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app I hope someone can help me. Thanks Stephan - 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: Intellij and Tomcat
Howdy, I'm not an IntelliJ expert, and I dislike IDE-related questions for many reasons, but it's Friday so I'll give it a shot ;) Do you have different versions of catalina jars on the IDE's runtime classpath than you do when you run tomcat by yourself? The InvocationTargetException typically indicates the desired method was found but has the wrong parameters, return type, or access qualification. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jason Wood [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 6:13 PM To: '[EMAIL PROTECTED]' Subject: Intellij and Tomcat I see that this has been posted on before but I did not see an answer. 1) I can run my web application using Tomcat by itself. 2) When I try to debug or run my web application form Intellij (With Tomcat choosen as my Application Server) I receive the following... 3) The is a lot of text below, if you want scroll to the bottom to see the exception. C:\j2sdk1.4.0_02\bin\javaw.exe -Djava.endorsed.dirs=C:\Program Files\Apache Group\Tomcat 4.1\bin;C:\Program Files\Apache Group\Tomcat 4.1\common\lib -Dcatalina.base=C:\Documents and Settings\jaswoo\.IntelliJIdea\system\tomcat_centra2000_cbb42cff -Dcatalina.home=C:\Program Files\Apache Group\Tomcat 4.1 -Djava.io.tmpdir=C:\Program Files\Apache Group\Tomcat 4.1\temp -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -classpath C:\j2sdk1.4.0_02\lib\tools.jar;C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\activation.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\ant.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-collections.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.1.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-logging-api.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jasper-compiler.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jasper-runtime.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jdbc2_0-stdext.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jndi.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jta.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\mail.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\naming-common.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\naming-factory.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\naming-resources.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar;C:\Program Files\Apache Group\Tomcat 4.1\common\lib\tools.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\catalina-ant.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\catalina.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\commons-beanutils.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\commons-digester.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\commons-fileupload-1.0.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\commons-logging.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\commons-modeler.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\jaas.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\jakarta-regexp-1.3.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\mx4j-jmx.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\servlets-common.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\servlets-default.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\servlets-invoker.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\servlets-manager.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\servlets-webdav.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\tomcat-coyote.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\tomcat-http11.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\tomcat-jk.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\tomcat-jk2.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\tomcat-util.jar;C:\Program Files\Apache Group\Tomcat 4.1\server\lib\tomcat-warp.jar;C:\Program Files\Apache Group\Tomcat 4.1\webapps\centra2000\WEB- INF\classes;C:\j2sdk1.4.0_02\jre\lib\charsets.jar ;C:\j2sdk1.4.0_02\jre\lib\jaws.jar;C:\j2sdk1.4.0_02\jre\lib\jce.jar;C:\ j2sd k 1.4.0_02\jre\lib\jsse.jar;C:\j2sdk1.4.0_02\jre\lib\rt.jar;C:\j2sdk1.4.0 _02\ j re\lib\sunrsasign.jar;C:\j2sdk1.4.0_02\jre\lib\ext\dnsns.jar;C:\j2sdk1. 4.0_ 0 2\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.0_02\jre\lib\ext\localedata.jar;C :\j2 s dk1.4.0_02\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Apache Group\Tomcat 4.1\webapps\centra2000\WEB-INF\classes;C:\Program Files\Apache Group\Tomcat 4.1\webapps\centra2000\WEB-INF\test\classes;C:\Program Files\Apache Group\Tomcat 4.1\webapps\centra2000\WEB-INF\lib\attclm.jar;C:\Program Files\Apache Group\Tomcat 4.1\webapps\centra2000\WEB-INF\lib\centra2000.jar;C:\Program Files\Apache
RE: User sessions in Tomcat
Howdy, You can write any number of HttpSession*Listener listeners to do whatever you want with session. Yoav Shapira Millennium ChemInformatics -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 9:26 AM To: [EMAIL PROTECTED] Subject: User sessions in Tomcat It there a way to count or view details from all open user sessions in a Tomcat instalation? Any help is welcome. Thanks 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: RE : not see the directory
Howdy, Is it too much to ask that you actually read conf/web.xml before you ask??? Copy the servlet that has the listings init-param from conf/web.xml to the web.xml file of the webapp where you want to disable listings. Yoav Shapira Millennium ChemInformatics -Original Message- From: eric perso [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 3:33 AM To: 'Tomcat Users List' Subject: RE : not see the directory Ok it s work for all webapps But i want to configure for each webapps In the web.xml in WEB-INF how to this. thanks -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 8:49 PM To: 'Tomcat Users List' Subject: RE: not see the directory set listings to false in conf/web.xml Charlie -Original Message- From: eric perso [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 11:30 AM To: tomcat user List Subject: not see the directory hi, i search to: don't see inside a directory like www.toto.com/images/ but i use in the jsp and html pages the image www.toto.com/images/i.gif how to do this thanks; best regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cookies
thank you patrick. that worked. I assumed a cookie once set was available for the all files in that location. Is it the same for sessions? -Original Message- From: Patrick Willart [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 5:21 PM To: Tomcat Users List Subject: RE: Cookies Since you don't specify the path when you write the cookie it's in /app/servlet. This means that this cookie can only be read by pages/servlets in this directory or subdirectories. Your JSP is in a different directory structure and is not allowed to read the cookie you wrote. add cookie.setPath(/) to your servlet to set the cookie path to the root. Then your JSP (as it is a subdirectory of the root) can read your cookie. grts, Patrick -Original Message- From: Mark Tebong [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 2:10 PM To: Tomcat Users List Subject: Cookies I set a cookie like this from a servlet (URI= /app/servlet/myPackage.CookieTest): Cookie userCookie = new Cookie(someName, someValue); userCookie.setMaxAge(60*60*24*365); response.addCookie(userCookie); I later try to read the cookies using a JSP page like this (URI= /app/getCookieValue.jsp): Cookie[] cookies = request.getCookies(); Cookie cookie; for(int i=0; icookies.length; i++) { cookie = cookies[i]; out.print(cookie.getName() + =); out.print(cookie.getValue() + \n); } I get nothing in the results, however, if I try to get and print the cookie values from the same servlet, I get all cookies that were set and the sessionid cookie as well. What is going on? How can I set cookies in a servlet and get their values from a jsp file (btw, the jsp file is in the same package). PS Is this the right forum for this question? - 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: User sessions in Tomcat
And, if you're not trying to do it in code... Tomcat Web Application Manager... ala http://localhost:8080/manager/html gary... From: Shapira, Yoav [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] Date: Fri, 21 Nov 2003 08:53:23 -0500 To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: User sessions in Tomcat Howdy, You can write any number of HttpSession*Listener listeners to do whatever you want with session. Yoav Shapira Millennium ChemInformatics -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 9:26 AM To: [EMAIL PROTECTED] Subject: User sessions in Tomcat It there a way to count or view details from all open user sessions in a Tomcat instalation? Any help is welcome. Thanks 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: Tomcat 4.1.24 Standalone max requests serviced java exception
Hi Yansheng, That was a great link, thanks! I did happen to have an error page specified for my application, and once I removed this, I found that another java exception was being reported, one from my application itself, that was being hidden by the illegalstateexception. Thanks so much! -Hakan Kilic -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 3:17 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1.24 Standalone max requests serviced java exception Here is a good link explaining the error: http://www2.real-time.com/rte-tomcat/2000/Jun/msg02488.html -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 1:12 PM To: 'Tomcat Users List' Subject: RE: Tomcat 4.1.24 Standalone max requests serviced java exception I will give this a try: I don't think this is related to the number of requests. By default, JSP pages will try to create a session. So if you call a new jsp page after the response has been sent committed, this is exactly what is supposed to happen. Are you trying to forward or redirect the reponse after it's being committed? How do you test your application, btw? -Yan -Original Message- From: Kilic, Hakan [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 7:47 AM To: 'Tomcat Users List' Subject: Tomcat 4.1.24 Standalone max requests serviced java exception Hi all, I'm running into this java exception only when increasing my traffic to my Tomcat web server. I'm running Tomcat 4.1.24 Standalone, and my traffic is about 100 concurrent connections when this happens. I'm just wondering if a) This error is really related to reaching the max number of requests my server can handle b) How can I increase the number of requests my server can service, already tinkered around with connections in the server.xml (it's a dual P3 1.4 GHz, 2G ram machine) c) What's this java exception really mean. 2003-11-18 12:45:17 JspFactoryImpl: Exception initializing page context java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.coyote.tomcat4.CoyoteRequest.doGetSession(CoyoteRequest.java:1884 ) at org.apache.coyote.tomcat4.CoyoteRequest.getSession(CoyoteRequest.java:1731) at org.apache.coyote.tomcat4.CoyoteRequestFacade.getSession(CoyoteRequestFacade .java:365) at org.apache.coyote.tomcat4.CoyoteRequestFacade.getSession(CoyoteRequestFacade .java:370) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr apper.java:268) at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:1 38) at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:11 4) at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryIm pl.java:175) at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java: 154) at org.apache.jsp.core_loadtest_jsp._jspService(core_loadtest_jsp.java:33) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 10) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch er.java:575) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher .java:498) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8 22) at org.apache.jsp.digits_jsp._jspService(digits_jsp.java:2905) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 10) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at
Startup error Tomcat 4.
I have setup a Sun Solaris v9 system with Java 2 SDK 1.4.2 and Tomcat 4.1.29 Also updated from Sun the Recommended versions for v9. I try to run Tomcat without Apache, so stand-alone. I set the JAVA_HOME to /usr/j2se This however won't work, if I look in catalina.out I have: java.util.zip.ZipException: invalid END header (bad central directory offset) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:112) at java.util.jar.JarFile.init(JarFile.java:117) at java.util.jar.JarFile.init(JarFile.java:55) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal( StandardClassLoader.java:1082) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLo ader.java:200) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Clas sLoaderFactory.java:202) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140) Bootstrap: Class loader creation threw exception java.lang.IllegalArgumentException: addRepositoryInternal: java.util.zip.ZipExce ption: invalid END header (bad central directory offset) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal( StandardClassLoader.java:1110) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLo ader.java:200) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Clas sLoaderFactory.java:202) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140) I tried to run it as a user and as root. Thanks in advance, Alexander This message, including attached files, may contain confidential information and is intended only for the use by the individual and/or the entity to which it is addressed. Any unauthorized use, dissemination of, or copying of the information contained herein is not allowed and may lead to irreparable harm and damage for which you may be held liable. If you receive this message in error or if it is intended for someone else please notify the sender by returning this e-mail immediately and delete the message.
RE: Startup error Tomcat 4.
Howdy, How did you install tomcat? You used GNU tar if you expanding a tarball, right? Yoav Shapira Millennium ChemInformatics -Original Message- From: Bruchem, A. van (Alexander) [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 9:57 AM To: '[EMAIL PROTECTED]' Subject: Startup error Tomcat 4. I have setup a Sun Solaris v9 system with Java 2 SDK 1.4.2 and Tomcat 4.1.29 Also updated from Sun the Recommended versions for v9. I try to run Tomcat without Apache, so stand-alone. I set the JAVA_HOME to /usr/j2se This however won't work, if I look in catalina.out I have: java.util.zip.ZipException: invalid END header (bad central directory offset) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:112) at java.util.jar.JarFile.init(JarFile.java:117) at java.util.jar.JarFile.init(JarFile.java:55) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal( StandardClassLoader.java:1082) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLo ader.java:200) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Clas sLoaderFactory.java:202) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140) Bootstrap: Class loader creation threw exception java.lang.IllegalArgumentException: addRepositoryInternal: java.util.zip.ZipExce ption: invalid END header (bad central directory offset) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal( StandardClassLoader.java:1110) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLo ader.java:200) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Clas sLoaderFactory.java:202) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:140) I tried to run it as a user and as root. Thanks in advance, Alexander This message, including attached files, may contain confidential information and is intended only for the use by the individual and/or the entity to which it is addressed. Any unauthorized use, dissemination of, or copying of the information contained herein is not allowed and may lead to irreparable harm and damage for which you may be held liable. If you receive this message in error or if it is intended for someone else please notify the sender by returning this e-mail immediately and delete the message. 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]
Virtual host with Squid, Apache and Tomcat
Hi I'm new to the list, so... hi! :-) Here's our scenario: We use Squid as a reverse proxy cache in front of Apache which in return calls Tomcat for dynamic content: Browser -- Squid -- Apache -- Tomcat Until now we used the old mod_webapp, but now we're changing to mod_jk2 (with Apache 1.3 and Tomcat 4.1). We need to have several hosts on the same Apache and thus use virtual hosts. The problem is that the web applications sometimes need to have the same name. An example: www.abc.com has two web applications, one for each language (ISO codes): www.abc.com/eng/ and www.abc.com/fre/ (French) www.def.com also has two web applications which are different, but have the same name: www.def.com/eng/ and www.def.com/fre/ Now, with the old mod_webapp, all we had to do is define a unique name for each of those (we chose a three-letter acronmy of the site plus the web application name), in this case abc_eng, abc_fre, def_eng and def_fre and point to them in the virtual host definition of Apache, like this: VirtualHost ServerName www.abc.com DocumentRoot WebAppDeploy abc_eng /eng WebAppDeploy abc_fre /fre /VirtualHost VirtualHost ServerName www.def.com DocumentRoot WebAppDeploy def_eng /eng WebAppDeploy def_fre /fre /VirtualHost As far as I can see, with mod_jk2, this is not possible in Apache alone. Am I right? I read on a couple of pages how Tomcat can be configured for virtual hosting, but I think these examples were all assuming that you use Tomcat as the web server. From what I understand I would need to define something like this in server.xml: Host name=www.abc.com debug=0 appBase=webapps unpackWARs=true Context path=/eng docBase=abc_eng debug=0 reloadable=true/ Context path=/fre docBase=abc_fre debug=0 reloadable=true/ /Host Host name=www.def.com debug=0 appBase=webapps unpackWARs=true Context path=/eng docBase=def_eng debug=0 reloadable=true/ Context path=/fre docBase=def_fre debug=0 reloadable=true/ /Host Another problem which may arise is that the domain names point to Squid, thus Apache only responds to the IP address. Frankly, I don't know exactly how Apache does the DNS lookup, and I know there's a parameter in the server.xml that enables DNS lookups. Surely, this is necessary for this scenario to work? Anyway, in a nutshell: Has anybody ever done this? Will this work? Any help is greatly appreciated! Thanks best regards, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Client Certificate Authentication
Hi, I have a problem with tomcat and SSL in modality of client authentication. I have generated my keystore and,I have imported my certificate chain in cacerts under JAVA_HOME/jre/lib/security, but I haven't imported the user's certificate in the keystore on the webserver. In the server.xml file i have inserted these lines: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=true protocol=TLS keystoreFile=mykeystore keystorePass=passwd/ /Connector Well, when I login to my web application, I see a popup in which I can select the certificate. Doing this, I can continue, but why is this possible if my certificate isn't in the webserver's keystore, ie the webserver has skipped the user recognizition phase. My configuration is : - tomcat 4.1.18 - Jdk Sun 1.4.1_05 I hope that somebody can help me with this problem. Kind regards, Gianfranco.
Re: Client Certificate Authentication
Hi, the server needs only the CA certificate used for signing the client certificate to verify client identity. Marco - Original Message - From: Aloi Gianfranco (SPES) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 21, 2003 4:30 PM Subject: Client Certificate Authentication Hi, I have a problem with tomcat and SSL in modality of client authentication. I have generated my keystore and,I have imported my certificate chain in cacerts under JAVA_HOME/jre/lib/security, but I haven't imported the user's certificate in the keystore on the webserver. In the server.xml file i have inserted these lines: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=true protocol=TLS keystoreFile=mykeystore keystorePass=passwd/ /Connector Well, when I login to my web application, I see a popup in which I can select the certificate. Doing this, I can continue, but why is this possible if my certificate isn't in the webserver's keystore, ie the webserver has skipped the user recognizition phase. My configuration is : - tomcat 4.1.18 - Jdk Sun 1.4.1_05 I hope that somebody can help me with this problem. Kind regards, Gianfranco. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Synchronising database access
One simple solution with no code changes: Use a pool with a max of one connection and a long timeout. This way only one thread can get a connection. -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:51 PM To: Tomcat Users List Subject: [OT] Synchronising database access I want to synchronise all database access. T How to do it. Do I have to synchronise on Connection or on this or implement SingleThreadModel. I also want to know how much extra time a synchronised block requires than an unsynchronised block. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cant find the relevant servlet
First time using Apache and Tomcat - almost got it working but not quite. Using Apache Virtual Host to redirect to Tomcat. Have virtual host set up in Apache and Host entry that matches the virtual host name in Tomcat. I have logging on at the Host Level and at the Context level. Host:- 2003-11-21 16:24:23 StandardHost[enmc-mic]: Mapping request URI '/slink/servlet/login' 2003-11-21 16:24:23 StandardHost[enmc-mic]: Mapped to context '/slink' Which proves (I think) that Apache has routed the request via JK to Tomcat Context: 2003-11-21 16:20:21 StandardContext[/slink]: Starting completed 2003-11-21 16:24:23 StandardContext[/slink]: Mapping contextPath='/slink' with requestURI='/slink/servlet/login' and relativeURI='/servlet/login' 2003-11-21 16:24:23 StandardContext[/slink]: Trying exact match 2003-11-21 16:24:23 StandardContext[/slink]: Trying prefix match 2003-11-21 16:24:23 StandardContext[/slink]: Trying extension match 2003-11-21 16:24:23 StandardContext[/slink]: Trying default match 2003-11-21 16:24:23 StandardContext[/slink]: Mapped to servlet 'default' with servlet path '/servlet/login' and path info 'null' and update=true Which proves that Tomcat cannot map the URI to a servlet and has mapped to default. How can I tell what servlets Tomcat thinks exist for a context? The web.xml for the context looks fine to me - Tomcat Manager just lists the apps not the servlets within right? Do I need to be using servlet-mapping? Just so long as the web.xml defines the name of the servlet (login in the eg above) and maps that to a class name within the context should be ok right? Any help appreciated very much indeed. Simon Simon Taylor Managed Services Technology Consultant Nortel Networks p - 01279 404289 (ESN 742 4289) m - 07740 533743 (ESN 748 3743) e - [EMAIL PROTECTED] I code therefore I am
Re: Cant find the relevant servlet
http://jakarta.apache.org/tomcat/faq/misc.html#invoker -Tim Simon Taylor wrote: First time using Apache and Tomcat - almost got it working but not quite. Using Apache Virtual Host to redirect to Tomcat. Have virtual host set up in Apache and Host entry that matches the virtual host name in Tomcat. I have logging on at the Host Level and at the Context level. Host:- 2003-11-21 16:24:23 StandardHost[enmc-mic]: Mapping request URI '/slink/servlet/login' 2003-11-21 16:24:23 StandardHost[enmc-mic]: Mapped to context '/slink' Which proves (I think) that Apache has routed the request via JK to Tomcat Context: 2003-11-21 16:20:21 StandardContext[/slink]: Starting completed 2003-11-21 16:24:23 StandardContext[/slink]: Mapping contextPath='/slink' with requestURI='/slink/servlet/login' and relativeURI='/servlet/login' SNIP How can I tell what servlets Tomcat thinks exist for a context? The web.xml for the context looks fine to me - Tomcat Manager just lists the apps not the servlets within right? Do I need to be using servlet-mapping? Just so long as the web.xml defines the name of the servlet (login in the eg above) and maps that to a class name within the context should be ok right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sticky sessions and load balancing
you might want to check out this article, it explains sticky sessions with apache 1.3 http://www.ubeans.com/tomcat/ the article is from 2002, but maybe it has some clues. peter - Do you Yahoo!? Free Pop-Up Blocker - Get it now
Re: HTTP Error 302
Hi Günter, 302 is NOT an error. It is a Found message. It means: You can access the resource. Go to Location and fetch it. RFC 2616 says: 10.3.3 302 Found The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field. The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s). If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued. Note: RFC 1945 http://www.faqs.org/rfcs/rfc1945.html and RFC 2068 http://www.faqs.org/rfcs/rfc2068.html specify that the client is not allowed to change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client. In Tomcat (or any other servlet container), you can achieve a 302 message by using response.sendRedirect(URI). And AFAIK, this is the only sane way this happens. Of course, you can setResponseCode(302) or something like that, and addHeader to add the Location header. But I would call that insanity ;-) Yours, Antonio Fiol Günter Kukies wrote: Hi, what are the common reasons, that tomcat 4.1 is returning a HTTP 302 error page? Thanks for your answere Günter smime.p7s Description: S/MIME Cryptographic Signature
Sticky sessions and load balancing with apache 2
Hi I can make the apache do load balancing, giving each server 50% of the traffic. When i try to create sticky sessions, it works, but only the first tomcat instance gets all the traffic. Is it possible to have sticky sessions with load balancing (with tomcat and mod_jk2), ie if a user without a session comes in they go to tomcat1, then the next instance etc, but if a user comes in with a session id, it goes to the tomcat instance that i was created on??? Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sticky sessions and load balancing with apache 2
Hello, Please ensure that you are trying to create a fresh new session when testing. I usually test load balancing by doing the following: On every server: tail -f a_log_file_that_fills_if_there_is_activity_such_as_catalina.out_or_access.log On a client: while true; do wget -O /dev/null http://apache_server/path/to/context/jsp/or/servlet; done If you see activity on both logs, load balancing is OK. Never mind whether you use sticky sessions or not. You are sure that ALL requests are fresh new requests, with no session ID. If you are using a browser, you have to ensure that you clean your cookies before each request, which is really embarrassing. Other than that, you can disable cookies on your browser, and repeatedly hit reload after clearing all cookies once. HTH, Antonio Fiol Drinkwater, GJ (Glen) wrote: Hi I can make the apache do load balancing, giving each server 50% of the traffic. When i try to create sticky sessions, it works, but only the first tomcat instance gets all the traffic. Is it possible to have sticky sessions with load balancing (with tomcat and mod_jk2), ie if a user without a session comes in they go to tomcat1, then the next instance etc, but if a user comes in with a session id, it goes to the tomcat instance that i was created on??? Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
tomcat 4.1.29 in SSL mode on AIX 5; Algorithm SunX509 not available
Greetings! I am trying to bring up tomcat 4.1.29 in SSL mode on AIX 5. Everything works find before I uncomment the server.xml section to run SSL in port 8443. I have installed a keystore and I am running java 1.4.1, so the jsse stuff should be there. I have also looked at the security.jar in $JAVA_HOME/jre/lib, and the x509 classes are there (at least, there are classes in sun/secutity/x509 in the security.jar file). The precise message I get is: java.io.IOException: Algorithm SunX509 not available at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:151) at [etc] Any thoughts? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [POLL] Logging
Hi Everyone, thanx for helping me decide to which logging api to usewhich is log4j...when i try to use the logger i get this message on the console window... log4j:WARN No appenders could be found for logger (com.pitre.servlet.SetupServlet). log4j:WARN Please initialize the log4j system properly. I have the log4j jar file in my WEB-INF/lib directory and my logging.properties file in the classes directory. I configured the logger with the properties file as such...the logging.properties seems to be loading fine..at least it can find the properties filemy webapp is deployed by way of ant and a war file InputStream in = getClass().getClassLoader().getResourceAsStream(logging.properties); props.load(in); String watch = System.getProperty(LOGGING.WATCH); if(watch != null watch.equalsIgnoreCase(TRUE)){ PropertyConfigurator.configureAndWatch(watch); System.out.println(Watch logging.properties every 60 seconds for changes); }else{ PropertyConfigurator.configure(props); System.out.println(Not watching logging.properties for changes); } And here is my logging.properties file. log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.ConsoleAppender log4j.appender.R.layout=org.apache.log4j.SimpleLayout I'm baffled Russ -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Fri 11/21/2003 5:23 AM To: Tomcat Users List Cc: Subject: Re: [POLL] Logging 2. Java.util.Logging Purely because it's part of the sdk and meets my logging requirements. I did use log4j before, but since I decided I should know java.util.logging, I stuck with it after learning how to use it. Adam - 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]
Realm Username Password from TagSupport
I would like to use a users username/password to login to a database as that user, after they authenticate HOPEFULLY using BASIC authentication. Is there anyway to do this? Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[off-topic] jakarta, java, indonesia
Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - 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]
When is Tomcat 5 Release version scheduled to come out?
When is the release version of Tomcat 5 suppose to come out?
Great Compiling Problem
I have Apache 2 and Tomcat 4.1.29 on Linux I have a jsp page that start like this : (home.jsp) %@ page autoFlush=true buffer=15kb errorPage=error.jsp % %@ page import = java.sql.* % %@ page import = java.sql.Connection % %@ page import = java.sql.DriverManager % %@ page import = java.sql.SQLException % %@ include file=include/global_settings.jsp % %@ page import = funBean % jsp:useBean id=fB scope=page class=funBean / !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN : : : But when I open this page i get the server error 500 and the log of tomcat is : 2003-11-21 19:39:44 WebappLoader[]: Deploying class repositories to work directory /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.cascina-al-piano.it/_ 2003-11-21 19:39:44 WebappLoader[]: Reloading checks are enabled for this Context 2003-11-21 19:39:44 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2003-11-21 19:39:44 StandardManager[]: Seeding of random number generator has been completed 2003-11-21 19:39:44 StandardWrapper[:default]: Loading container servlet default 2003-11-21 19:39:44 StandardWrapper[:invoker]: Loading container servlet invoker 2003-11-21 19:39:44 WebappLoader[]: Deploying class repositories to work directory /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturismolevignacce.i t/_ 2003-11-21 19:39:44 WebappLoader[]: Deploy class files /WEB-INF/classes to /var/www/agriturismolevignacce.it/WEB-INF/classes 2003-11-21 19:39:44 WebappLoader[]: Reloading checks are enabled for this Context 2003-11-21 19:39:44 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2003-11-21 19:39:44 StandardManager[]: Seeding of random number generator has been completed 2003-11-21 19:39:44 StandardWrapper[:default]: Loading container servlet default 2003-11-21 19:39:44 StandardWrapper[:invoker]: Loading container servlet invoker 2003-11-21 19:40:06 Error compiling file: /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturismolevignacce.i t/_/home_jsp.java [javac] Compiling 1 source file /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturismolevignacce.i t/_/home_jsp.java:11: '.' expected import funBean; ^ 1 error 2003-11-21 19:40:06 Info: Compile: javaFileName=/usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturism olevignacce.it/_/home_jsp.java classpath=/var/www/agriturismolevignacce.it/WEB-INF/classes/:/var/www/agritu rismolevignacce.it/WEB-INF/classes/:/usr/local/jakarta-tomcat-4.1.29/shared/ classes/:/usr/local/jakarta-tomcat-4.1.29/common/classes/:/usr/local/jakarta -tomcat-4.1.29/common/endorsed/xercesImpl.jar:/usr/local/jakarta-tomcat-4.1. 29/common/endorsed/xmlParserAPIs.jar:/usr/local/jakarta-tomcat-4.1.29/common /lib/servlet.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/mail.jar:/usr/l ocal/jakarta-tomcat-4.1.29/common/lib/commons-logging-api.jar:/usr/local/jak arta-tomcat-4.1.29/common/lib/commons-collections.jar:/usr/local/jakarta-tom cat-4.1.29/common/lib/jdbc2_0-stdext.jar:/usr/local/jakarta-tomcat-4.1.29/co mmon/lib/commons-pool-1.1.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/ja sper-compiler.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-factory .jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/jndi.jar:/usr/local/jakarta -tomcat-4.1.29/common/lib/commons-dbcp-1.1.jar:/usr/local/jakarta-tomcat-4.1 .29/common/lib/activation.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/ja sper-runtime.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-resource s.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-common.jar:/usr/loc al/jakarta-tomcat-4.1.29/common/lib/ant.jar:/usr/local/jakarta-tomcat-4.1.29 /common/lib/jta.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/tomcat-conne ctors-src.jar cp=/var/www/agriturismolevignacce.it/WEB-INF/classes cp=/var/www/agriturismolevignacce.it/WEB-INF/classes cp=/usr/local/jakarta-tomcat-4.1.29/shared/classes cp=/usr/local/jakarta-tomcat-4.1.29/common/classes cp=/usr/local/jakarta-tomcat-4.1.29/common/endorsed/xercesImpl.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/endorsed/xmlParserAPIs.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/servlet.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/mail.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-logging-api.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-collections.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jdbc2_0-stdext.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-pool-1.1.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jasper-compiler.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-factory.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jndi.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-dbcp-1.1.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/activation.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jasper-runtime.jar
Re: Great Compiling Problem
See the following: http://tomcatfaq.sourceforge.net/classnotfound.html Click on ... Don't use packageless classes and declare all imported classes! justin At 10:51 AM 11/21/2003, you wrote: I have Apache 2 and Tomcat 4.1.29 on Linux I have a jsp page that start like this : (home.jsp) %@ page autoFlush=true buffer=15kb errorPage=error.jsp % %@ page import = java.sql.* % %@ page import = java.sql.Connection % %@ page import = java.sql.DriverManager % %@ page import = java.sql.SQLException % %@ include file=include/global_settings.jsp % %@ page import = funBean % jsp:useBean id=fB scope=page class=funBean / !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN : : : But when I open this page i get the server error 500 and the log of tomcat is : 2003-11-21 19:39:44 WebappLoader[]: Deploying class repositories to work directory /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.cascina-al-piano.it/_ 2003-11-21 19:39:44 WebappLoader[]: Reloading checks are enabled for this Context 2003-11-21 19:39:44 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2003-11-21 19:39:44 StandardManager[]: Seeding of random number generator has been completed 2003-11-21 19:39:44 StandardWrapper[:default]: Loading container servlet default 2003-11-21 19:39:44 StandardWrapper[:invoker]: Loading container servlet invoker 2003-11-21 19:39:44 WebappLoader[]: Deploying class repositories to work directory /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturismolevignacce.i t/_ 2003-11-21 19:39:44 WebappLoader[]: Deploy class files /WEB-INF/classes to /var/www/agriturismolevignacce.it/WEB-INF/classes 2003-11-21 19:39:44 WebappLoader[]: Reloading checks are enabled for this Context 2003-11-21 19:39:44 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2003-11-21 19:39:44 StandardManager[]: Seeding of random number generator has been completed 2003-11-21 19:39:44 StandardWrapper[:default]: Loading container servlet default 2003-11-21 19:39:44 StandardWrapper[:invoker]: Loading container servlet invoker 2003-11-21 19:40:06 Error compiling file: /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturismolevignacce.i t/_/home_jsp.java [javac] Compiling 1 source file /usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturismolevignacce.i t/_/home_jsp.java:11: '.' expected import funBean; ^ 1 error 2003-11-21 19:40:06 Info: Compile: javaFileName=/usr/local/jakarta-tomcat-4.1.29/work/Standalone/www.agriturism olevignacce.it/_/home_jsp.java classpath=/var/www/agriturismolevignacce.it/WEB-INF/classes/:/var/www/agritu rismolevignacce.it/WEB-INF/classes/:/usr/local/jakarta-tomcat-4.1.29/shared/ classes/:/usr/local/jakarta-tomcat-4.1.29/common/classes/:/usr/local/jakarta -tomcat-4.1.29/common/endorsed/xercesImpl.jar:/usr/local/jakarta-tomcat-4.1. 29/common/endorsed/xmlParserAPIs.jar:/usr/local/jakarta-tomcat-4.1.29/common /lib/servlet.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/mail.jar:/usr/l ocal/jakarta-tomcat-4.1.29/common/lib/commons-logging-api.jar:/usr/local/jak arta-tomcat-4.1.29/common/lib/commons-collections.jar:/usr/local/jakarta-tom cat-4.1.29/common/lib/jdbc2_0-stdext.jar:/usr/local/jakarta-tomcat-4.1.29/co mmon/lib/commons-pool-1.1.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/ja sper-compiler.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-factory .jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/jndi.jar:/usr/local/jakarta -tomcat-4.1.29/common/lib/commons-dbcp-1.1.jar:/usr/local/jakarta-tomcat-4.1 .29/common/lib/activation.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/ja sper-runtime.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-resource s.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-common.jar:/usr/loc al/jakarta-tomcat-4.1.29/common/lib/ant.jar:/usr/local/jakarta-tomcat-4.1.29 /common/lib/jta.jar:/usr/local/jakarta-tomcat-4.1.29/common/lib/tomcat-conne ctors-src.jar cp=/var/www/agriturismolevignacce.it/WEB-INF/classes cp=/var/www/agriturismolevignacce.it/WEB-INF/classes cp=/usr/local/jakarta-tomcat-4.1.29/shared/classes cp=/usr/local/jakarta-tomcat-4.1.29/common/classes cp=/usr/local/jakarta-tomcat-4.1.29/common/endorsed/xercesImpl.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/endorsed/xmlParserAPIs.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/servlet.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/mail.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-logging-api.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-collections.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jdbc2_0-stdext.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/commons-pool-1.1.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jasper-compiler.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/naming-factory.jar cp=/usr/local/jakarta-tomcat-4.1.29/common/lib/jndi.jar
RE: [off-topic] jakarta, java, indonesia
Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [POLL] Logging
Howdy, Either call it log4j.properties and not logging.properties so that log4j can configure itself, or add a / to the getResourceAsStream argument. Your InputStream is null and the configureAndWatch call doesn't do anything because the props is empty. Yoav Shapira Millennium ChemInformatics -Original Message- From: Pitre, Russell [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:17 PM To: Tomcat Users List Subject: RE: [POLL] Logging Hi Everyone, thanx for helping me decide to which logging api to usewhich is log4j...when i try to use the logger i get this message on the console window... log4j:WARN No appenders could be found for logger (com.pitre.servlet.SetupServlet). log4j:WARN Please initialize the log4j system properly. I have the log4j jar file in my WEB-INF/lib directory and my logging.properties file in the classes directory. I configured the logger with the properties file as such...the logging.properties seems to be loading fine..at least it can find the properties filemy webapp is deployed by way of ant and a war file InputStream in = getClass().getClassLoader().getResourceAsStream(logging.properties); props.load(in); String watch = System.getProperty(LOGGING.WATCH); if(watch != null watch.equalsIgnoreCase(TRUE)){ PropertyConfigurator.configureAndWatch(watch); System.out.println(Watch logging.properties every 60 seconds for changes); }else{ PropertyConfigurator.configure(props); System.out.println(Not watching logging.properties for changes); } And here is my logging.properties file. log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.ConsoleAppender log4j.appender.R.layout=org.apache.log4j.SimpleLayout I'm baffled Russ -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Fri 11/21/2003 5:23 AM To: Tomcat Users List Cc: Subject: Re: [POLL] Logging 2. Java.util.Logging Purely because it's part of the sdk and meets my logging requirements. I did use log4j before, but since I decided I should know java.util.logging, I stuck with it after learning how to use it. Adam - 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: When is Tomcat 5 Release version scheduled to come out?
http://jakarta.apache.org/tomcat/faq/version.html Yet another person who doesn't care to do some research before asking ;( Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:34 PM To: Tomcat Users List Subject: When is Tomcat 5 Release version scheduled to come out? When is the release version of Tomcat 5 suppose to come out? 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: When is Tomcat 5 Release version scheduled to come out?
Is it a good idea to use Tomcat 5 beta for develop and production if we wanted the clustering capabilities?
RE: When is Tomcat 5 Release version scheduled to come out?
Only if you don't plan on releasing until the release is out, imhop. Justin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:08 PM To: Tomcat Users List Subject: Re: When is Tomcat 5 Release version scheduled to come out? Is it a good idea to use Tomcat 5 beta for develop and production if we wanted the clustering capabilities? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: When is Tomcat 5 Release version scheduled to come out?
Howdy, I'd say go for it ;) There are people already using tomcat 5 with clustering (and without) in production. Yoav Shapira Millennium ChemInformatics -Original Message- From: Hart, Justin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:09 PM To: Tomcat Users List Subject: RE: When is Tomcat 5 Release version scheduled to come out? Only if you don't plan on releasing until the release is out, imhop. Justin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:08 PM To: Tomcat Users List Subject: Re: When is Tomcat 5 Release version scheduled to come out? Is it a good idea to use Tomcat 5 beta for develop and production if we wanted the clustering capabilities? - 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: When is Tomcat 5 Release version scheduled to come out?
you can use T4 with http://cvs.apache.org/~fhanik/ Filip - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:07 AM Subject: Re: When is Tomcat 5 Release version scheduled to come out? Is it a good idea to use Tomcat 5 beta for develop and production if we wanted the clustering capabilities? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC Manager App question
I understand that there are caveats to using the manager application with contexts that have been specified within the server.xml file... I have 3 virtual hosts setup, all are separate web applications. Each has the manager context application associated to themselves. The manager appears to respond to listing the applications within each virtual host correctly, I have made the following folder structure: webapps\ webapps\vhost1\ webapps\vhost2\ and set the appbase for each virtual host to the correct folder. I then specify a context with a docbase of 'webapp1.war' for vhost1. If I restart the entire tomcat server, all looks normal, I get webapps\vhost1\webapp1.war webapps\vhost1\webapp1\ etc but when I stop the context under webapps1 via the webapps1 manager and start it again, it extracts the webapp1.war to the webapps folder instead of the appbase of webapps\vhost1 Essentially, we want to be able to upgrade virtualhosts without having to reload tomcat itself (affecting other web application on the same server). We also need the context pre-declared so we may take advantage of jdbc connection pooling. -Art
RE: [off-topic] jakarta, java, indonesia
Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [off-topic] jakarta, java, indonesia
Sun's a big company, they probably named their conference room in order to distinguish it from other conference rooms. Jakarta, seems to me, to just be more interesting than A, B, C... Just like when you stay at a hotel and all of the conference rooms have names. Justin -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:18 PM To: 'Tomcat Users List' Subject: RE: [off-topic] jakarta, java, indonesia Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [off-topic] jakarta, java, indonesia
Howdy, It is common practice for US corporations, hotels, convention centers, etc, to name conference rooms/halls after specific locations. They do that so it's easier for visitors/employees to remember. It's much easier to say the meeting is in jakarta than the meeting is in 302b-1. I read a study about the productivity impact of this once; ) Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:18 PM To: 'Tomcat Users List' Subject: RE: [off-topic] jakarta, java, indonesia Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Realm Username Password from TagSupport
Are you saying that you want to build a custom tag to do this. In any case here is the connection logic http://www.kickjava.com/1541.htm - Original Message - From: Hart, Justin [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:27 PM Subject: Realm Username Password from TagSupport I would like to use a users username/password to login to a database as that user, after they authenticate HOPEFULLY using BASIC authentication. Is there anyway to do this? Justin - 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: Realm Username Password from TagSupport
I would like to authenticate my users with my database without prompting them a second time for a username and password. I have considered creating a subclass of JNDIRealm in order to do this, but I am resisting the urge to do this, figuring that there must be an easier way to implement mulit-tiered security with Tomcat. Unfortunately, somewhere, I need to be able to access the user's password in order to do this. So, what I'm wondering is if there is either a listener that I could implement, from which I could listen to users authenticating and use their username/password combos to login to my database, and then just associate this with their session ID, or if perhaps the user's password is accessible in some way, shape, or form from TagSupport. Justin -Original Message- From: Bryan LaPlante [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:20 PM To: Tomcat Users List Subject: Re: Realm Username Password from TagSupport Are you saying that you want to build a custom tag to do this. In any case here is the connection logic http://www.kickjava.com/1541.htm - Original Message - From: Hart, Justin [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:27 PM Subject: Realm Username Password from TagSupport I would like to use a users username/password to login to a database as that user, after they authenticate HOPEFULLY using BASIC authentication. Is there anyway to do this? Justin - 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]
Intercepting login information
Is there any way to intercept login information when using basic or form based security and letting the container manage security? For example, after someone logs in, I would like to write an audit record to the database that contains that information so I can count number of logins etc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 Error message leaving me puzzled! (Bug?)
My apache error log is filled with the error messages below. Has anyone else encountered these error messages. If so, have you figured out why these messages occur, and how to fix them? The page seems to come back and display correctly, but I would like to eliminate the errors. Apache/2.0.46 (Red Hat) Tomcat 4.1.27 mod_jk_2 ( tried builds based on all of these tags and the problem still occurred. TOMCAT_4.1.27, JK2_0_2, TOMCAT_4.1.29 ) [Fri Nov 21 19:35:10 2003] [error] channelSocket.receive(): Error receiving message body -1 0 [Fri Nov 21 19:35:10 2003] [error] workerEnv.processCallbacks() Error reading reply [Fri Nov 21 19:35:10 2003] [error] ajp13.service() ajpGetReply recoverable error 12 Thank you -sean CONFIDENTIALITY NOTICE - This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify the sender by telephone or return e-mail and delete the original transmission and its attachments without reading or saving in any manner. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Intercepting login information
This seems to come up (in various variations) again and again. And, I also asked... should one simply subclass xxxRealm ... specifically the java.security.Principal authenticate(java.lang.String username, java.lang.String credentials) method? And, then ... maybe ... extending java.security.Principal with a getPassword() method. And returning that from authenticate(). Though... as I type this in... it's making me queasy! Please... Tomcat gurus... what is the answer? gary... From: Justin Wesbrooks [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] Date: Fri, 21 Nov 2003 13:32:47 -0600 To: [EMAIL PROTECTED] Subject: Intercepting login information Is there any way to intercept login information when using basic or form based security and letting the container manage security? For example, after someone logs in, I would like to write an audit record to the database that contains that information so I can count number of logins etc. - 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: Realm Username Password from TagSupport
When your form is submitted, if you are looking up the user from the context you can keep that info in a session var. Be careful not to use cookie sessions for that since you don't want to send the passwd back to the client unless using SSL. TagSupport only offers a way to read in the body of your tag and encapsulate code used by the page author. I am assuming your are talking about 2 access points in the same application context. - Original Message - From: Hart, Justin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:24 PM Subject: RE: Realm Username Password from TagSupport I would like to authenticate my users with my database without prompting them a second time for a username and password. I have considered creating a subclass of JNDIRealm in order to do this, but I am resisting the urge to do this, figuring that there must be an easier way to implement mulit-tiered security with Tomcat. Unfortunately, somewhere, I need to be able to access the user's password in order to do this. So, what I'm wondering is if there is either a listener that I could implement, from which I could listen to users authenticating and use their username/password combos to login to my database, and then just associate this with their session ID, or if perhaps the user's password is accessible in some way, shape, or form from TagSupport. Justin -Original Message- From: Bryan LaPlante [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:20 PM To: Tomcat Users List Subject: Re: Realm Username Password from TagSupport Are you saying that you want to build a custom tag to do this. In any case here is the connection logic http://www.kickjava.com/1541.htm - Original Message - From: Hart, Justin [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:27 PM Subject: Realm Username Password from TagSupport I would like to use a users username/password to login to a database as that user, after they authenticate HOPEFULLY using BASIC authentication. Is there anyway to do this? Justin - 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]
How to redirect to another servlet as POST?
Hello folks, i´m trying to redirect my request to another servlet, but this cannot be interpreted as GET, i need POST request. How can i do that? This because there are some important values in this QUERYSTRING, and nobody can see them. Regards, Edson
RE: How to redirect to another servlet as POST?
Howdy, The query string is preserved in GET requested. I assume you meant there are important request parameters in the POST that are dropped when changing to a GET. One thing you can do is a RequestDispatcher#forward instead of a sendRedirect. Obviously you can only do this within the same host. Otherwise you can take all the request parameters and put them on the query string. Then you run the risk of the query string being too long though ;( Yoav Shapira Millennium ChemInformatics -Original Message- From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 3:45 PM To: 'Tomcat-User List' Subject: How to redirect to another servlet as POST? Hello folks, i´m trying to redirect my request to another servlet, but this cannot be interpreted as GET, i need POST request. How can i do that? This because there are some important values in this QUERYSTRING, and nobody can see them. Regards, Edson 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: Realm Username Password from TagSupport
Well, I want to authenticate them to my database, when they get authenticated for application (IE, login to MS SQL Server when they log into my site). I'm using BASIC authentication at the moment, but considering moving to form (since obviously the variable would get set in the form). I am, however, quite interested in continuing to use BASIC authentication, if at all possible, and still achieve this. I know I can do this by creating a subclass of JNDIRealm, and authenticating to my database from there, but it strikes me as a much better solution to have a listener that listens for signons, and then allow web apps to register for a sign-on type event. I figured that there must be some way to get to this information, as their seem to be several third party products that provide the programmer with at least similar functionality. Justin -Original Message- From: Bryan LaPlante [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:47 PM To: Tomcat Users List Subject: Re: Realm Username Password from TagSupport When your form is submitted, if you are looking up the user from the context you can keep that info in a session var. Be careful not to use cookie sessions for that since you don't want to send the passwd back to the client unless using SSL. TagSupport only offers a way to read in the body of your tag and encapsulate code used by the page author. I am assuming your are talking about 2 access points in the same application context. - Original Message - From: Hart, Justin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:24 PM Subject: RE: Realm Username Password from TagSupport I would like to authenticate my users with my database without prompting them a second time for a username and password. I have considered creating a subclass of JNDIRealm in order to do this, but I am resisting the urge to do this, figuring that there must be an easier way to implement mulit-tiered security with Tomcat. Unfortunately, somewhere, I need to be able to access the user's password in order to do this. So, what I'm wondering is if there is either a listener that I could implement, from which I could listen to users authenticating and use their username/password combos to login to my database, and then just associate this with their session ID, or if perhaps the user's password is accessible in some way, shape, or form from TagSupport. Justin -Original Message- From: Bryan LaPlante [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 2:20 PM To: Tomcat Users List Subject: Re: Realm Username Password from TagSupport Are you saying that you want to build a custom tag to do this. In any case here is the connection logic http://www.kickjava.com/1541.htm - Original Message - From: Hart, Justin [EMAIL PROTECTED] To: Tomcat Users List (E-mail) [EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:27 PM Subject: Realm Username Password from TagSupport I would like to use a users username/password to login to a database as that user, after they authenticate HOPEFULLY using BASIC authentication. Is there anyway to do this? Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 binary
I have been running an Apache 1.3 server connected with Tomcat 3.2.3 using mod_jk on RedHat 7.1. I am in the process of upgrading the server to use Suse 9 and would like to upgrade to Apache 2. I have 2 questions. First, is it possible to integrate Apache 2 with Tomcat 3? Also, where can I get a linux binary for mod_jk2? Any help would be appreciated, Raymond J. Zeigler Systems Programmer Integrated Support Systems, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [off-topic] jakarta, java, indonesia
Jakarta is a major city on the island of Java... in addition to being capital of indonesia. The city of Jakarta was built on the island of Java. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... Who said geeks weren't creative? -e Yansheng Lin wrote: Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The Online Source for Live Music in Montreal .::514.286.1699::.
Re: [off-topic] jakarta, java, indonesia
Well... actually the geek that thought up Java named it Oak. g... From: Erik Wright [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] Date: Fri, 21 Nov 2003 15:08:50 -0500 To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: [off-topic] jakarta, java, indonesia Jakarta is a major city on the island of Java... in addition to being capital of indonesia. The city of Jakarta was built on the island of Java. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... Who said geeks weren't creative? -e Yansheng Lin wrote: Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
My Solution to Intercepting Login Information Realm Username Password from TagSupport
I think that what we BOTH need to do in this case is create a subclass of whatever realm we are using, and using this subclass provide our specific functionality, in my case authenticating to a database, in yours logging. Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [off-topic] jakarta, java, indonesia
I really didn't know this. I like that. It is always good to know where we are going while on the airplane! -Original Message- From: Erik Wright [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 3:09 PM To: Tomcat Users List Subject: Re: [off-topic] jakarta, java, indonesia Jakarta is a major city on the island of Java... in addition to being capital of indonesia. The city of Jakarta was built on the island of Java. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... Who said geeks weren't creative? -e Yansheng Lin wrote: Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The Online Source for Live Music in Montreal .::514.286.1699::. ---In (14) Out--- (3) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk binaries?
Hello Everybody! my name is luke I'm trying to connect apache 1.3 with tomcat 4.1. IS there some obvious thing or document I am missing? What I have read has told me to get binaries for mod_jk...My problem is there are no binaries for jk for Linux on the apache site, or any mirrors. http://apache.get-software.com/jakarta/tomcat-connectors/jk/binaries/linux/ yet when I search on the net for how to set it up, there are numerous references, all linking to the jakarta.apache site, for the binaries: http://www.cs.usfca.edu/~sm/mod_jk.htm Anybody know where they went? Also, I can't build either of these from source on RH 6.1. The documentation is sparse, and they configure okay but throw errors during make. If there are no binaries, do I need a new glibc or something? Thanks! - Do you Yahoo!? Free Pop-Up Blocker - Get it now
RE: [off-topic] jakarta, java, indonesia
maybe I don't have as much geographical knowledge as you do... But I just don't see the complexity of living on an island and building a city there, especially when it sounds like a nice place. Does it have a lot of earthquakes? If you name thing 'Tibert', 'Everest' or 'Iraq', it would be a different story. Sorry, It's Friday... -Original Message- From: Erik Wright [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:09 PM To: Tomcat Users List Subject: Re: [off-topic] jakarta, java, indonesia Jakarta is a major city on the island of Java... in addition to being capital of indonesia. The city of Jakarta was built on the island of Java. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... Who said geeks weren't creative? -e Yansheng Lin wrote: Oh yeah, 'not coincidentally' they say. I wonder why they name their conference room 'jakarta' in the first place anyways. I don't name my bedroom 'Tokyo Garden'... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 12:04 PM To: Tomcat Users List Subject: RE: [off-topic] jakarta, java, indonesia Howdy, Actually, Jakarta was the name of the Sun conference room in which the majority of the meetings leading up to the agreement took place; not coincidentally, it's also the name of Indonesia's capital.). The meetings and agreement above were between Sun and Apache to come up with an open-source reference implementation of the Servlet and JSP APIs. See http://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html Yoav Shapira Millennium ChemInformatics -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:32 PM To: 'Tomcat Users List' Subject: [off-topic] jakarta, java, indonesia Sorry, What's the connection between this place and the name of jakarta we use? The creator of the jakarta project was born there? Thanks! -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 1:39 AM To: Tomcat Users List Subject: Re: hot deploy Leonardo Kenji Shikida wrote: is there an easy way to deploy a web application over another existent one without stopping tomcat and without killing the current sessions? Hi Leonardo, You can redeploy a webapp through the admin or manager applications. I have not tested myself, but I think that if you configure a persistent session manager (you can find more info on this in the configuration reference), active sessions should be stored before the webapp shutdown, and reloaded upong restarting it. HTH, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.spectacle.ca/ The Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: When is Tomcat 5 Release version scheduled to come out?
Hi! I am a bit deceived about Tomcat (5) clustering with session replication, and our company is considering (against) its (upcoming) usage on production systems for high-load environments. Expectancies were that it would increase reliability AND performance. Preliminary home-made tests are showing increased reliability(*) but NOT substantially increased performance (somewhere around 80%-120% depending on the difficulty of generating the pages). Maybe it's application-specific. Any comments, opinions, facts, or advice, as well as any related experiences (good or bad) will be greatly appreciated. Personally, I would love to see it in production, but I will only push it forward if I am convinced of its advantages. At the moment, I need more evidence before making a decision. Thank you very much. Antonio Fiol (*) No sessions lost on crashes. Filip Hanik wrote: you can use T4 with http://cvs.apache.org/~fhanik/ Filip - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:07 AM Subject: Re: When is Tomcat 5 Release version scheduled to come out? Is it a good idea to use Tomcat 5 beta for develop and production if we wanted the clustering capabilities? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: [off-topic] jakarta, java, indonesia
On 11/21/2003 09:17 PM James Ostad wrote: It is always good to know where we are going while on the airplane! -Original Message- From: Erik Wright [mailto:[EMAIL PROTECTED] Jakarta is a major city on the island of Java... in addition to being capital of indonesia. The city of Jakarta was built on the island of Java. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... Who said geeks weren't creative? What I want to know is, what or where is Krakatoa? I know that in geographical context it was a volcanic island off the coast of Java (probably near Jakarta?) and it disappeared in the biggest and most devastating volcanic eruption in history, but what about the IT context? :) Adam -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [off-topic] jakarta, java, indonesia
Well... actually the geek that thought up Java named it Oak. now ... THAT is a cool name. Oh, I can see what that means immediately. The core language is just a stem. But all the twigs and branches are just as much part of the same tree. The tree would be nothing without them. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... branches, leaves, and nuts, and bark, and roots ... hm... MUCH better hm, 8pike == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [off-topic] jakarta, java, indonesia
Actually, there was an Oak tree outside the window at Sun that the developer's used to enjoy looking at while at work. On Friday 21 November 2003 03:49 pm, Pike wrote: Well... actually the geek that thought up Java named it Oak. now ... THAT is a cool name. Oh, I can see what that means immediately. The core language is just a stem. But all the twigs and branches are just as much part of the same tree. The tree would be nothing without them. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... branches, leaves, and nuts, and bark, and roots ... hm... MUCH better hm, 8pike == - 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: [off-topic] jakarta, java, indonesia
And now there is no Joy in Sun Quentin. ;) g... From: Ben Souther [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] Date: Fri, 21 Nov 2003 15:51:19 -0500 To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: [off-topic] jakarta, java, indonesia Actually, there was an Oak tree outside the window at Sun that the developer's used to enjoy looking at while at work. On Friday 21 November 2003 03:49 pm, Pike wrote: Well... actually the geek that thought up Java named it Oak. now ... THAT is a cool name. Oh, I can see what that means immediately. The core language is just a stem. But all the twigs and branches are just as much part of the same tree. The tree would be nothing without them. This is the kind of complex thinking that brought us product names like javabeans, kaffe, hotjava, espresso, etc... branches, leaves, and nuts, and bark, and roots ... hm... MUCH better hm, 8pike == - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]