RE: Tomcat 5.0.2 and IIS
Thanks Derek. One more question. Where am I supposed to download dll file from? From: Derek Mahar [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Eric J. Pinnell [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Tomcat 5.0.2 and IIS Date: Tue, 5 Aug 2003 15:47:54 -0400 After much blood, sweat, and tears, I successfully got Tomcat 5.0.5, Microsoft IIS, and the JK2 Connector (isapi_redirector2.dll) to work together. Refer to the following documents: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/installhowto.htm l http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html http://www.oreillynet.com/pub/a/onjava/2002/11/20/tomcat.html http://www.oreillynet.com/pub/a/onjava/2002/12/18/tomcat.html http://www.geocities.com/gzhangx/websrv/ajp/ajp.html Derek -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:05 PM To: Tomcat Users List Subject: Re: Tomcat 5.0.2 and IIS The IIS connector is ajp13. The coyote connector is ajp13 compliant so I think an experiment would be in order. I would guess it would work. -e On Tue, 5 Aug 2003, vikas jain wrote: If someone knows tomcat 5.0.2 works with IIS??? I tried to search for it, I got to know tomcat 3.3 works withIIS but there are no docs for tomcat 5.0 verison. If someone knows about this, please help me out. Thanks, Vikas _ Going on a holiday? Want to study abroad? http://server1.msn.co.in/msnleads/citibankpersonalloan/citibankploanju ly03.asp?type=txt Need a personal loan? - 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] _ Dress up your desktop! Get the best wallpapers. http://server1.msn.co.in/msnchannels/Entertainment/wallpaperhome.asp Just click here! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple services
Hi, May I know how do I configure the tomcat to run multiple services ?. I have installed tomcat in one UNIX server but there are more than one developer with applications to run on production. I need to ensure that the testing and reload of the particular application will not affect the others . Please advice !. Thanks Regards, Thana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XP random tomcat crashes
Hi, We're using tomcat 4.1.12 with Java 1.4.1.02, and are encountering strange crashes on XP especially. The crashes happen in apparently random places in our app, and cause the VM to crash with various messages, none of which are very helpful! I noticed that Cameron Hart had a similar problem (http://www.mail-archive.com/[EMAIL PROTECTED]/msg88603.html) - please could anyone point me in the right direction to try and get to the bottom of this. Is it easy to run tomcat in a debugger so we can catch what happens? Many thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hardware and Memory Requirements
Hi Is there a document which talks about the hardware and memory requirements based on the platform on which tomcat is installed. specifically looking for 1. How much disk space and memory does it require to install it. 2. How much memory it takes to run it. Thanks for any help. _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preventing access to a directory
To prevent directlory listings: http://jakarta.apache.org/tomcat/faq/misc.html#listing To prevent individual access to jsps, use web.xml and a security constraint. -Tim Tim Davidson wrote: Hi, how can we prevent access to a set of JSP's inside a specific directory? aparrently there is a directory tag for server.xml? thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Conn Pooling in 4.0.4 - My thanks...!
Kwok Peng Tuck Yoav Shapira Jose Euclides da Silva Junior Thank you all so much. My project was on the brink of being set back by a month if the connection pooling feature had to be removed and you saved me. With some of the straightest answers I have ever received on this list. Thanks and regards, Andoni. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to configure to use tomcat and struts to use log4j?
Hi, I have tried so many things to use log4j from tomcat and struts and finaly I found the solution that I have to copy log4.jar into common/lib server/lib and application/WEB-INF/lib (to be able to get jsp files compiled). I find it a bit complicated that I have to copy the same jar file into three different directories. Is there a better way? Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Freeing processors
Hi My problem is that tomcat runs out of processors and I see No processor available, rejecting this connection in the log file. By reading earlier posts a I understand that each processor is a thread and is not freed until it is returned by my code, my code is hanging somewhere. The problem is that my servlet (the only thing running in tomcat) only forwards requests threw CORBA to a big app that I can't change, and its in their the code hangs. So, how can I solve this? The perfect solution would be if tomcat could automaticly free processors after some timeout ( 60 s) but I have not found such a feature/setting, does it exist? If not, could I do some small hack in my servlet that monitors and somehow terminates (kills thread or something) the request after 60s and therby freeing the processor? I am running tomcat 4.1.12, java 1.4.0_04, redhat linux 9. I am using the HttpConnector. Thank you Daniel Carlsson Gimlisoft AB Email: [EMAIL PROTECTED] Tel: 0709-744570, 031-189024 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDIRealm: Authentication Failing [SOLVED]
Adam Sherman writes: 2003-07-27 13:44:06 JNDIRealm[Standalone]: validating credentials by binding as the user 2003-07-27 13:44:06 JNDIRealm[Standalone]: binding as uid=adam,ou=People,dc=tritus,dc=ca 2003-07-27 13:44:06 JNDIRealm[Standalone]: bind attempt failed JNDIRealm is attempting to bind as 'uid=adam,ou=People,dc=tritus,dc=ca', which is correct and exists. I can bind as this user using the LDAP CLI tools. Using a password that ends in a space doesn't work. I have tested this using the JNDI libs and it *does* work so I assume that something else, maybe HTTP is responsible. I have filed a bug: 22176 Thank you, A. -- Adam Sherman Tritus CG Inc. http://www.tritus.ca/ +1 (613) 797-6819 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need help : how to shutdown restart Tomcat, how to reload servlet
Dear Tomcat user, I have two problem here, hope anyone who know can help to teach me. Problem 1: How to shutdown and restart tomcat server? Description: I try to shutdown and restart Tomcat using shutdown and startup batch file. I notice some error prompt out when I running shutdown.bat and startup.bat in command prompt. The message I capture during run shutdown.bat in command prompt in Windows XP is as below : Using Catalina_Base: C:\Program Files\Apache Group\Tomcat 4.1 Using Catalina_Home: C:\Program Files\Apache Group\Tomcat 4.1 Using Catalina_Tmpdir: C:\Program Files\Apache Group\Tomcat 4.1\temp Using Java_Home: C:\J2sdk1.4.0 Catalina.stop: Java.net.ConnectException:Connection refused:connect java.net.ConnectException:Connection refuse: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295) at java.net.PlainSocketImpl.connecToAddress(PlainSocketImpl.java:161) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148) at java.net.Socket.connect(Socket.java:425) at java.net.Socket.connect(Socket.java:375) at java.net.Socket.(init)(Socket.java:290) at java.net.Socket.(init)(Socket.java:110) at org.apache.catalina.startup.Catalina.stop(Catalina.java:579) at org.apache.catalina.startup.Catalina.execute(Catalina.java:402) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccesorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Remark : Currently I m using Apache Tomcat/4.1.12-LE-jdk14 Problem 2: How to reload the servlet program after modified? Description : Everytime I change the servlet program I need to restart my pc. Anyone know how to reload my servlet program without restart the pc. Thanks in advance Vincent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-code 401
This is a known bug/feature. I don't think it is planned to be changed. -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 8:39 AM To: Tomcat Users List Subject: error-code 401 Hi, I'm trying to display custom error pages. My https context is BASIC protected, and now the site is automatically redirecting to the error page before asking for authentification... I put this lines in web.xml error-page error-code401/error-code locationerror/401.jsp/location /error-page I m using tomcat 4.1.27 standalone on linux. I need your help please. -- Georges Roux - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with tomcat installation
Greetings, I'm trying to install the tomcat rpm on a rehat linux 8 box. I'm having problems with one of the dependencies - I have already installed the JDK 1.4 kit and now when I do which java it actually finds the correct path to java however when I try to load xerces-j-1.3.0-1.noarch.rpm it tells me that it needs JDK 1.2 to run. Has anyone else ran into this problem? Btw - I checked out redhat's site and I do have the correct java path selected so I'm at a loss as to what to do. Thanks, BObbie Bobbie Atristain Internet Systems Administrator Media General, INC. 804.649.6156 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: Tomcat Conn Pooling in 4.0.4 - Very Slow?
JEdSJD I guess that DBCP would be the better choice, since it is db platform JEdSJD independency. I use it in 4.1.18 and its nice to me. JEdSJD Eculides. But DBCP throw an UnsupportedException when I try to execute this portion if code: try { initCtx=new InitialContext(); jndiDataSource=(DataSource) initCtx.lookup(java:comp/env/jdbc/gray/hr); Connection conn=jndiDataSource.getConnection(username,userpassword); // in this section conn is ALLWAYS NULL } catch(NamingException nameExcept) { System.out.println(nameExcept.getMessage()); } With best wishes Roman Blade Velichko [mailto:[EMAIL PROTECTED] Chance favour to prepared mind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Front Controller Servlet
At 05:42 AM 8/5/2003, you wrote: I am trying to build FrontController servlet for a web site on Tomcat 4 , after long time of changes on the web.xml file , I wasn't able to achieve this pattern, the web.xml portion is : servlet-mapping servlet-nameFCservlet/servlet-name url-pattern*.jsp/url-pattern /servlet-mapping my problem start when the FrontController servlet needs to forward the request to other jsp pages and when he uses the Forward method , the tomcat activate my FrontController again , and after a while I get : StackOverflowError . You say that you're using the forward() method -- why? There are reasons to do this, but if you're trying to create a FrontController, then presumably you're not interested in hitting your jsps directly in the first place. Is there any reason you aren't using a RequestDispatcher to dispatch/include your jsp page output instead of forwarding to the page? justin Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential See http://www.nextengine.com/confidentiality.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.2 and IIS
I have servlet running with tomcat. My main server is IIS. (on my machine it's just a test, and I am using tomcat as web server but on the system machine the web server is IIS. there I wan to deploy servlets). Conclusion is how to run servlets using IIS? Thanks, From: John Turner [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat 5.0.2 and IIS Date: Thu, 07 Aug 2003 11:07:21 -0400 If you have Tomcat on port 80, what do you need the connector for? John vikas jain wrote: I followed the instructions to set up IIS with tomcat. The virtual redirector is showing green arrow pointing up but the servlets are not working. in the log I am getting following errors: [Thu Aug 07 09:28:03 2003] [jk_ajp_common.c (1234)]: In jk_worker_t::validate, Error localhost 80 [Thu Aug 07 09:28:03 2003] [jk_worker.c (176)]: wc_create_worker validate failed for testWorker [Thu Aug 07 09:28:03 2003] [jk_worker.c (246)]: build_worker_map failed to create workertestWorker [Thu Aug 07 09:33:03 2003] [jk_ajp_common.c (1234)]: In jk_worker_t::validate, Error localhost 80 [Thu Aug 07 09:33:03 2003] [jk_worker.c (176)]: wc_create_worker validate failed for testWorker [Thu Aug 07 09:33:03 2003] [jk_worker.c (246)]: build_worker_map failed to create workertestWorker [Thu Aug 07 10:03:31 2003] [jk_ajp_common.c (1234)]: In jk_worker_t::validate, Error localhost 80 [Thu Aug 07 10:03:31 2003] [jk_worker.c (176)]: wc_create_worker validate failed for testWorker [Thu Aug 07 10:03:31 2003] [jk_worker.c (246)]: build_worker_map failed to create workertestWorker I set up IIS at 8080 and tomcat at 80 port, does that make any difference? Thanks, vikas From: John Turner [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat 5.0.2 and IIS Date: Wed, 06 Aug 2003 08:16:08 -0400 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/ John vikas jain wrote: Thanks Derek. One more question. Where am I supposed to download dll file from? From: Derek Mahar [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Eric J. Pinnell [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Tomcat 5.0.2 and IIS Date: Tue, 5 Aug 2003 15:47:54 -0400 After much blood, sweat, and tears, I successfully got Tomcat 5.0.5, Microsoft IIS, and the JK2 Connector (isapi_redirector2.dll) to work together. Refer to the following documents: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/installhowto.htm l http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html http://www.oreillynet.com/pub/a/onjava/2002/11/20/tomcat.html http://www.oreillynet.com/pub/a/onjava/2002/12/18/tomcat.html http://www.geocities.com/gzhangx/websrv/ajp/ajp.html Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Latest movie trailers. On your mobile. http://server1.msn.co.in/sp03/gprs/howcani_movie.asp With GPRS. - 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] _ Want to visit Spain? Click here. http://server1.msn.co.in/sp03/spain/index.asp Win a free trip. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
invocing EJB from Tomcat
Hi, does anyone knows, whats needed to invoce EJB from tomcat? Specially where to put the libraries for the contextfactory (under jboss jnp-client.jar). thanks, Juraj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-code 401
Are you using IE ?, and have you deselected Show friendly HTTP error messages under Tools-Internet Options-Advanced -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: 7. august 2003 14:39 To: Tomcat Users List Subject: error-code 401 Hi, I'm trying to display custom error pages. My https context is BASIC protected, and now the site is automatically redirecting to the error page before asking for authentification... I put this lines in web.xml error-page error-code401/error-code locationerror/401.jsp/location /error-page I m using tomcat 4.1.27 standalone on linux. I need your help please. -- Georges Roux - 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: Why integrate Tomcat with a web server?
In my opinion it applies even moreso to Windows. If it was my call, I would never, ever use IIS. I would rather use Tomcat alone on port 80 if Windows was my environment. Even IIS shouldn't be run with default permissions and access levels. Granted, changing this is not for anyone who isn't an advanced Microsoft admin, but that doesn't alter the fact that default configurations from MSFT, even the new Windows Server 2003, should always be immediately suspect until proven otherwise. I'm not trying to bash MSFT, just trying to describe what I consider a best practice. Security best practice is deny everything by default, then allow only what you absolutely need. Translated to server admin, that means never run any service that can do anything it wants to do unless there is no other alternative. The statement in the book has less oomph on Windows because Windows doesn't have the 1024 port restriction as does UNIX and Linux. You can run a service that doesn't have SYSTEM level access on port 80 on Windows without any additional configuration. This is not true of UNIX or Linux. Either way, running services as root or SYSTEM in my mind is a bad idea if there is an alternative. The worst exploit in the world is the one that nobody knows about except the guy who just found it. Better to take precautions as much as you can and do the triage up front rather than after. Avoiding configurations where services have admin access is just one way to do that, even if on the surface it seems unnecessary. HTH John Nathan Ward wrote: I have a question for John Turner about a statement in the book Apache Tomcat Security. Page 12 says: As discussed earlier, running publicly available web services as root or superuser is typically a bad idea, so the solution is to avoid using Tomcat as a stand-alone web server on port 80 by integrating it with a standard HTTP web server such as Apache, Microsoft's IIS, or Sun Microsystem's iPlanet. Question: Does this apply when running under Windows? The reference to as discussed earlier talks about running Tomcat as a service with more permissions than necessary. Windows defaults to running services as SYSTEM which has administrator privileges. Fine, but as also mentioned earlier, you can create a user account with less permissions and setup the service to run Tomcat under that account. So, how does the statement on page 12 relate to running Tomcat under windows, i.e. why run Tomcat with IIS rather than just run Tomcat? There may be performance reasons, but from a security point of view, is there increased security risks in running Tomcat without IIS when running as a service under Windows? Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-code 401
Are you using IE ?, and have you deselected Show friendly HTTP error messages under Tools-Internet Options-Advanced -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: 7. august 2003 14:39 To: Tomcat Users List Subject: error-code 401 Hi, I'm trying to display custom error pages. My https context is BASIC protected, and now the site is automatically redirecting to the error page before asking for authentification... I put this lines in web.xml error-page error-code401/error-code locationerror/401.jsp/location /error-page I m using tomcat 4.1.27 standalone on linux. I need your help please. -- Georges Roux - 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: Servlet BufferedOutputStream Question?
Urm, no. The browser will request each image on it's own separate Request. There is no way that the Server can anticipate what the browser will ask for next. Dylan Swales [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Someone PLEASE Help! I have been having hassles when using a BufferedOutputStream to send multiple images from an Oracle database to the client. The error that I am getting is in the While loop that sends the image as a byte[] to the client. java.net.SocketException: Connection reset by peer: socket write error. What I think is happening is that the first image is been sent to the browser and thereafter the connection is closed! Is there a way to send multiple images out to the client in a single Servlet (Possibly using a buffer). P.S The reason why I am not using IMG tags and sepecifying the source to point to another JSP or Servlet is because I am doing some timing methods in a single Servlet that writes out to a file. Thanks for your help. Dylan I have included the code below: import java.util.Stack; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; import java.sql.DriverManager; import java.sql.PreparedStatement; import javax.servlet.ServletException; import javax.servlet.ServletConfig; import javax.servlet.*; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import oracle.jdbc.driver.OraclePreparedStatement; import oracle.jdbc.driver.OracleResultSet; import oracle.ord.im.OrdImage; import oracle.ord.im.OrdHttpUploadFile; import oracle.ord.im.OrdHttpUploadFormData; import oracle.ord.im.OrdHttpResponseHandler; import java.util.*; import java.io.*; import java.sql.*; import oracle.jdbc.driver.OracleResultSet; import oracle.sql.*; import oracle.ord.im.*; import java.util.Stack; public class ImageServlet extends HttpServlet { private final static String JDBC_CONNECT_STRING =jdbc:oracle:thin:@athena:1521:media; private final static String JDBC_USER_NAME = mmedia; private final static String JDBC_PASSWORD = mmedia; private static Stack connStack = new Stack(); private static boolean driverLoaded = false; public void init( ServletConfig config ) throws ServletException { super.init(config); } public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { response.setContentType(image/jpeg); response.setBufferSize(1024 * 1000); Connection conn = null; long startTime = System.currentTimeMillis(); long endTime; try { conn = getConnection(); PreparedStatement stmt = conn.prepareStatement( select IMAGE from smallphotos where id between 0 and 501 ); //stmt.setString( 1, request.getParameter( id ) ); OracleResultSet rset = (OracleResultSet)stmt.executeQuery(); OrdImage img; ServletOutputStream o = response.getOutputStream(); BufferedOutputStream out = new BufferedOutputStream(o); Blob temp; byte[] buf = new byte[1024]; while ( rset.next() ) { img = (OrdImage)rset.getCustomDatum(1, OrdImage.getFactory()); temp = img.getContent(); buf = temp.getBytes(1,(int)temp.length()+1); out.write(buf); } response.flushBuffer(); out.close(); rset.close(); stmt.close(); } catch ( SQLException e ) { // // Log what went wrong. // e.printStackTrace( System.out ); // // Turn SQL exceptions into ServletExceptions. // throw new ServletException( e.toString() ); } finally { // // If we have a JDBC connection, then return it to the pool. // freeConnection( conn ); } endTime = System.currentTimeMillis(); long finalTime = endTime - startTime; try { FileWriter fw = new FileWriter (.txt); BufferedWriter br = new BufferedWriter (fw); PrintWriter pw = new PrintWriter (br); pw.println (finalTime); pw.flush(); pw.close(); br.close(); fw.close(); } catch (IOException io) { System.out.println ( FILEWRITER EXCEPTION +io.getMessage() ); } catch (Exception e) { System.out.println ( FILEWRITER GENERIC EXCEPTION +e.getMessage()); } } /* * Process an HTTP Post request used to upload a new photo into the album. */ public void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { Connection conn = null; //
RE: error-code 401
sarcasm detector not working today Yoav ? ;) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 9:12 AM To: Tomcat Users List Subject: RE: error-code 401 Internet Explorer... Yoav Shapira Millennium ChemInformatics -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:02 AM To: Tomcat Users List Subject: Re: error-code 401 IE? man ie No manual entry for ie georges Abid Ali Teepo wrote: Are you using IE ?, and have you deselected Show friendly HTTP error messages under Tools-Internet Options-Advanced -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: 7. august 2003 14:39 To: Tomcat Users List Subject: error-code 401 Hi, I'm trying to display custom error pages. My https context is BASIC protected, and now the site is automatically redirecting to the error page before asking for authentification... I put this lines in web.xml error-page error-code401/error-code locationerror/401.jsp/location /error-page I m using tomcat 4.1.27 standalone on linux. I need your help please. - 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: TOMCAT x WSAD
What is WSAD? What ever it is, it had a brain fart most likely. -Original Message- From: Oscar (Eccox) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:46 AM To: 'Tomcat Users List' Subject: RES: TOMCAT x WSAD No, my application is not in the root directory... It is in $TOMCAT_HOME/webapps... And this is the error: WSAD is putting a slash in the docBase string, instead of leaving 'application' alone, that means a relative path to $TOMCAT_HOME/webapps... Why WSAD puts this slash ??? Thanks for your colaboration... === José Oscar de Souza Eduardo Coordenador de Projetos tel: 3047-4541 fax: 3047-4550 [EMAIL PROTECTED] === -Mensagem original- De: Angus Mezick [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 7 de agosto de 2003 11:12 Para: Tomcat Users List Assunto: RE: TOMCAT x WSAD Application is in your root directory? You docBase seems to think so. --Angus -Original Message- From: Oscar (Eccox) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 9:11 AM To: [EMAIL PROTECTED] Subject: TOMCAT x WSAD Hi, List, I'm using WSAD with TOMCAT... When I select 'Run On Server' in the WSAD menu, the TOMCAT starts in debug mode and the Navigator opens and points to my index.jsp page, for example. But, I receive the error: HTTP Status 404 - /application/index.jsp _ type Status report message /application/index.jsp description The requested resource (/application/index.jps) is not available. _ Apache Tomcat/4.1.24 Looking in the $TOMCAT_HOME/conf/server.xml, I find this line: Context docBase=/application path=/application reloadable=true source=application/ And, when I remove the slash in docBase, and then restart TOMCAT, mannualy, everything works fine... This line is created automatically by WSAD in server.xml... Anybody knows why it creates the line with this error Thanks, PS. In the project properties (WSAD), in the Web section, the 'Context Root' parameter is 'myweb', different from 'application'. WSAD is using the project name instead of context root for create the line in server.xml... === José Oscar de Souza Eduardo Coordenador de Projetos tel: 3047-4541 fax: 3047-4550 [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]
RedHat 8.0 Apache 2.0.40-8 mod_jk
Hi, Does anybody know where can I get mod_jk.so for Apache 2.0.40-8 on Redhat 8.0? 10x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tried alot of searching - caving in and emailing this list now
Google has failed me! I have been trying to get IP based access control working for a java site using Apache directives to no avail. I am using Stronghold 4.0 with Tomcat 4.1.24 - Here is the Apache conf I am working with ... VirtualHost [omitted] ServerName [omitted] ServerAdmin [omitted] DocumentRoot /var/wwwroot/wrcm-staging/htdocs/ Directory / AllowOverride None Options +ExecCGI +FollowSymLinks order deny,allow Deny from all Allow from [omitted] Allow from [omitted] /Directory Directory /var/wwwroot/wrcm-staging/tomcat/ AllowOverride None Options +ExecCGI +FollowSymLinks order deny,allow Deny from all Allow from [omitted] Allow from [omitted] /Directory WebAppDeploy /var/wwwroot/wrcm-staging/tomcat/ conn / #Logging directives TransferLog var/log/wrcm-staging/access_log ErrorLog var/log/wrcm-staging/error_log /VirtualHost The java site resides in /var/wwwroot/wrcm-staging/tomcat - these directives usually work for normal HTTP sites - maybe this is a Jakarta config issue and not Apache? I'm also thinking that maybe my DocumentRoot directive is overriding the /var/wwwroot/wrcm-staging/tomcat Directory block? Thanks in advance for your help! James Herschel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error-code 401
Howdy, It's working, too slowly apparently ;) Autographs after the show, please... ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:19 AM To: Tomcat Users List Subject: Re: error-code 401 Internet Explorer? man Internet Explorer No manual entry for Internet No manual entry for Explorer georges Shapira, Yoav wrote: Internet Explorer... Yoav Shapira Millennium ChemInformatics -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:02 AM To: Tomcat Users List Subject: Re: error-code 401 IE? man ie No manual entry for ie georges Abid Ali Teepo wrote: Are you using IE ?, and have you deselected Show friendly HTTP error messages under Tools-Internet Options-Advanced -Original Message- From: Georges Roux [mailto:[EMAIL PROTECTED] Sent: 7. august 2003 14:39 To: Tomcat Users List Subject: error-code 401 Hi, I'm trying to display custom error pages. My https context is BASIC protected, and now the site is automatically redirecting to the error page before asking for authentification... I put this lines in web.xml error-page error-code401/error-code locationerror/401.jsp/location /error-page I m using tomcat 4.1.27 standalone on linux. I need your help please. - 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: tried alot of searching - caving in and emailing this list now
Um, are you using the JK2 connector to like up apache and tomcat? I don't see it mentioned. If you are, your workers2.propertties, jk2.properties (sp), and server.xml would also be helpful. --Angus -Original Message- From: jherschel [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:32 PM To: [EMAIL PROTECTED] Subject: tried alot of searching - caving in and emailing this list now Google has failed me! I have been trying to get IP based access control working for a java site using Apache directives to no avail. I am using Stronghold 4.0 with Tomcat 4.1.24 - Here is the Apache conf I am working with ... VirtualHost [omitted] ServerName [omitted] ServerAdmin [omitted] DocumentRoot /var/wwwroot/wrcm-staging/htdocs/ Directory / AllowOverride None Options +ExecCGI +FollowSymLinks order deny,allow Deny from all Allow from [omitted] Allow from [omitted] /Directory Directory /var/wwwroot/wrcm-staging/tomcat/ AllowOverride None Options +ExecCGI +FollowSymLinks order deny,allow Deny from all Allow from [omitted] Allow from [omitted] /Directory WebAppDeploy /var/wwwroot/wrcm-staging/tomcat/ conn / #Logging directives TransferLog var/log/wrcm-staging/access_log ErrorLog var/log/wrcm-staging/error_log /VirtualHost The java site resides in /var/wwwroot/wrcm-staging/tomcat - these directives usually work for normal HTTP sites - maybe this is a Jakarta config issue and not Apache? I'm also thinking that maybe my DocumentRoot directive is overriding the /var/wwwroot/wrcm-staging/tomcat Directory block? Thanks in advance for your help! James Herschel - 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]
Is there a way to keep the tomcat threads alive?
Hi How does thread creation/destruction works in Tomcat? Is the total no. of threads in thread pool maintained by Tomcat varies as load varies? Does Tomcat destroys threads in the pool, if they are idle for the long time? If yes, is there way to ensure that Tomcat didn't kill the idle threads, ie., once created, a thread will never die as long as Tomcat is running? If I keep Min_processors= Max_processors = 20, then can I assume that Tomcat will always use 20 threads? thanks, Naresh Agarwal - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software
RE: Java and tomcat issues
$JAVA_HOME != $PATH try: cd $JAVA_HOME/bin java --- Fabio Moraes [EMAIL PROTECTED] System Engineer Work Force Management System +55 21 3088 9548 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 14:54 To: [EMAIL PROTECTED] Subject: Java and tomcat issues Greetings, I'm trying to set up JAVA for tomcat on a redhat 8.1 box and I keep getting this message after I set the JAVA_HOME path -bash-2.05b# which java /usr/bin/which: no java in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin ) -bash-2.05b# Any suggestions? Bobbie Atristain Internet Systems Administrator Media General, INC. 804.649.6156 - 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]
https Access Denied.
Hi I can start my web page from https://localhost:8443 but If I try to start from https://host-name:8443 it will give me following error It works fine on both http://localhost:8080 http://host-name:8080 What should I do Thanks Rowena == error from web == The requested URL could not be retrieved While trying to retrieve the URL: host-name The following error was encountered: Access Denied. Access control configuration prevents your request from being a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP compilation problem with tc-4.1.27 if reloadable=true
Probably this: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22096 -Tim Zsolt Koppany wrote: Hi, I have just moved from tc-4.1.24 to 27 and have the following problem: In Context .../Context I set reloadable=true. After a Java class file re-compiled and I try to use any JSP pages I always get compilation error messages saying the some classes cannot be found in the classpath. When I restart tomcat everything works fine. I have been using 4.1.24 very long and have never had this problem. Any ideas? Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tracking active sessions
Howdy, Yes, I think it does matter if the sessions are still open. Because, if the server is only down for 1 minute or so, a logged-in user gets the same session again, after the server is up again. But the sessiontracker is new without any sessions. I see what you mean. In my case I just put the whole session-object into a list in my sessiontracker to be able to access session-attributes. So I would have to manually save the sessions in the list on server shutdown and reload them afterwards? I suppose you would, since you care about more than just the count of sessions but actually need their data. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes the first part of the script which displays the variables that are being used, but it doesn't do anything more. We haven't been able to find any errors to give us an idea of what the problem is. I'm sorry I think I forgot to say in the initial email that I am running Tomcat 4.0.4 on HP/UX 11.00. I appreciate any suggestions you can offer. signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:11 PM To: Tomcat Users List Subject: Re: Starting tomcat from init scripts (HP/UX) Hi, It's been a while since I tinkered with HP/UX but it seems to me that you can set all your varibles in the default tomcat start scripts and then call the default startup.sh and shutdown.sh. -e On Thu, 7 Aug 2003, Lott, Carey wrote: Hi, The above subject is based on the exact same topic I found in the archives from back in January, but no solution was ever posted. We are having the exact same problem that Pascal was having. We are trying to start tomcat from an init script at boot time. I have the needed variables in the init script, and the init script calls catalina.sh directly. Below is a copy of my script. I have used the script to stop and start tomcat manually without a problem. However, when Tomcat tries to start at boot time the run control information states that it can't start as root, and it is going to try as bin, but it is unsuccessful. Does anybody know why it wouldn't be able to start as root? What can I do to fix this? Init script: - #!/bin/sh # Start/Stop for Tomcat Java Servlet Container # CATALINA_HOME=/bto/appl/apache/jakarta-tomcat-4.0.4 export CATALINA_HOME JAVA_HOME=/opt/java1.4 export JAVA_HOME CLASSPATH=/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.ja r:/opt /java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/ opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/ jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4 /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4 /webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr oduct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature - 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: Digest
Without digging into code, I have no clue. So either I can read the source (of how its done in RealmBase) or your can. (And right now, I'm feeling lazy ;) ) I'm guessing org.apache.catalina.util.HexUtils would be what you want. -Tim Maxime Colas des Francs wrote: Thks for your response ! But I have now another pb . javadoc for org.apache.catalina.realm.RealmBase.Digest() says : ... Digest password using the algorithm especificied and convert the result to a corresponding hex string ... So how to convert my base64(MD5()) digest to the correct hex String ? I try Integer.toHexString on each byte ... no good. MD5 digest for realm auth don't seem to be a simple MD5 digest .. At 06:42 2003-08-07 -0400, you wrote: My favorite Base64 library is org.apache.catalina.util.Base64 ;) -Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TOMCAT x WSAD
Howdy, WebSphere Application Developer (Studio) I assume... Not the worst product in the world. Yoav Shapira Millennium ChemInformatics -Original Message- From: Angus Mezick [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 1:02 PM To: Tomcat Users List Subject: RE: TOMCAT x WSAD What is WSAD? What ever it is, it had a brain fart most likely. -Original Message- From: Oscar (Eccox) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:46 AM To: 'Tomcat Users List' Subject: RES: TOMCAT x WSAD No, my application is not in the root directory... It is in $TOMCAT_HOME/webapps... And this is the error: WSAD is putting a slash in the docBase string, instead of leaving 'application' alone, that means a relative path to $TOMCAT_HOME/webapps... Why WSAD puts this slash ??? Thanks for your colaboration... === José Oscar de Souza Eduardo Coordenador de Projetos tel: 3047-4541 fax: 3047-4550 [EMAIL PROTECTED] === -Mensagem original- De: Angus Mezick [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 7 de agosto de 2003 11:12 Para: Tomcat Users List Assunto: RE: TOMCAT x WSAD Application is in your root directory? You docBase seems to think so. --Angus -Original Message- From: Oscar (Eccox) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 9:11 AM To: [EMAIL PROTECTED] Subject: TOMCAT x WSAD Hi, List, I'm using WSAD with TOMCAT... When I select 'Run On Server' in the WSAD menu, the TOMCAT starts in debug mode and the Navigator opens and points to my index.jsp page, for example. But, I receive the error: HTTP Status 404 - /application/index.jsp _ type Status report message /application/index.jsp description The requested resource (/application/index.jps) is not available. _ Apache Tomcat/4.1.24 Looking in the $TOMCAT_HOME/conf/server.xml, I find this line: Context docBase=/application path=/application reloadable=true source=application/ And, when I remove the slash in docBase, and then restart TOMCAT, mannualy, everything works fine... This line is created automatically by WSAD in server.xml... Anybody knows why it creates the line with this error Thanks, PS. In the project properties (WSAD), in the Web section, the 'Context Root' parameter is 'myweb', different from 'application'. WSAD is using the project name instead of context root for create the line in server.xml... === José Oscar de Souza Eduardo Coordenador de Projetos tel: 3047-4541 fax: 3047-4550 [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: Servlet mapping for root directory in a webapp?
Howdy, Today I changed it to: servlet-mapping servlet-nameMainView/servlet-name url-pattern/index.html/url-pattern /servlet-mapping And, as I understand it, tomcat(?) returns that servlet mapping for requests for the root catalog. Well, it is a kind of workaround, but since it works well enough I'll just accept that and continue. But if anyone know more about the magic behind it all, I'd be very greatful for a thorough explanation of how and why it works. There's no magic, it's a clearly defined mapping for the url-pattern according to the laws in the servlet specification, v2.3. You can raise the logging level for the Host/Engine to see exactly the pattern resolution steps. The Servlet Specification v2.4, which tomcat 5 implements, supports a servlet as the welcome-file, which is what you are trying to do. Until then, most people make do with a simple index.html containing a meta http-equiv refresh directive. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
external parameters to tomcat (how?)
I would like to specify the location of a configuration file to tomcat which indicates the location of parameters used by some of my servlets. What is the best practice for doing this? Particularly I want to be able to get access to the location in any of my servlets. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting tomcat from init scripts (HP/UX)
Tim is right. In HP/UX there is a default start script (I forget what it's called). You plug in the name of your service and add any other stuff it might need. You define you service as being active somewhere else. (I know I'm not much help but it's been a while). That way when it starts you get the [OK] message. -e On Thu, 7 Aug 2003, Lott, Carey wrote: I tried calling the startup.sh instead of catalina.sh, but I had the same outcome. It executes the first part of the script which displays the variables that are being used, but it doesn't do anything more. We haven't been able to find any errors to give us an idea of what the problem is. I'm sorry I think I forgot to say in the initial email that I am running Tomcat 4.0.4 on HP/UX 11.00. I appreciate any suggestions you can offer. signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account phone404-529-6676/phone email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature disclaimer * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. /disclaimer -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 2:11 PM To: Tomcat Users List Subject: Re: Starting tomcat from init scripts (HP/UX) Hi, It's been a while since I tinkered with HP/UX but it seems to me that you can set all your varibles in the default tomcat start scripts and then call the default startup.sh and shutdown.sh. -e On Thu, 7 Aug 2003, Lott, Carey wrote: Hi, The above subject is based on the exact same topic I found in the archives from back in January, but no solution was ever posted. We are having the exact same problem that Pascal was having. We are trying to start tomcat from an init script at boot time. I have the needed variables in the init script, and the init script calls catalina.sh directly. Below is a copy of my script. I have used the script to stop and start tomcat manually without a problem. However, when Tomcat tries to start at boot time the run control information states that it can't start as root, and it is going to try as bin, but it is unsuccessful. Does anybody know why it wouldn't be able to start as root? What can I do to fix this? Init script: - #!/bin/sh # Start/Stop for Tomcat Java Servlet Container # CATALINA_HOME=/bto/appl/apache/jakarta-tomcat-4.0.4 export CATALINA_HOME JAVA_HOME=/opt/java1.4 export JAVA_HOME CLASSPATH=/bto/appl/apache/jakarta-tomcat-4.0.4/common/lib/servlet.ja r:/opt /java1.4/jre/lib/rt.jar:/opt/java1.4/lib/tools.jar:/opt/java1.4/lib/dt.jar:/ opt/java1.4/lib/htmlconverter.jar:/opt/java1.4/jre/lib/charsets.jar:/opt/jav a1.4/jre/lib/javaplugin.jar:/opt/java1.4/jre/lib/ext/dnsns.jar:/opt/java1.4/ jre/lib/ext/localedata.jar:/opt/java1.4/jre/lib/ext/ldapsec.jar:/opt/java1.4 /jre/lib/jce.jar:/opt/java1.4/jre/lib/jsse.jar:.:/bto/appl/apache/jakarta-to mcat-4.0.4/webapps/esd/WEB-INF/classes:/bto/appl/apache/jakarta-tomcat-4.0.4 /webapps/esd/WEB-INF/lib:/bto/appl/apache/htdocs/esd/java:/bto/sys/oracle/pr oduct/8.0.6/jdbc/lib/classes111.zip export CLASSPATH case $1 in 'start') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh start /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstart.txt 21 ;; 'stop') /bto/appl/apache/jakarta-tomcat-4.0.4/bin/catalina.sh stop /bto/appl/apache/jakarta-tomcat-4.0.4/logs/bootlogstop.txt 21 ;; esac Thank you for any help you can offer. Carey signature nameCarey Lott/name posWeb Tools Support/pos orgInfrastructure Storage Tools Support/org companyEDS/company accountBellSouth/account email[EMAIL PROTECTED]/email ipager[EMAIL PROTECTED]/ipager /signature - 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: [OT] JDBC confusion
The preferred way of doing this is to use connection pooling. The primary reasons are scalability, speed and simplicity. If you have 5,000 people using your app at the same time, by your method you will have to have 5,000 connections to the database (one per user) stored in the various sessions. However, those 5,000 connections aren't being used at the same time: each one probably has only an infrequent burst of activity on it. This is where connection pooling comes in. The connection pool has n connections (say, 10 - 20) that are kept active. When an application needs a connection to the database, it checks one out from the pool (it doesn't need to create and open one because it is already created and open -- a win in terms of speed), uses it and closes it just any other database connection. However, when it closes the connection, the connection isn't really closed; it's just returned to the pool. So, the application developer is hidden from the complexity of actually creating the connections to the database, making sure they are in good working order, etc. To get started with connection pooling in Tomcat, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html And check out the mailing list archives: the question of setting up connection pooling comes up very frequently. HTH Andrew P.S. Depending on the size/complexity of your project, you might be better off using an O/R mapping tool like OJB (http://db.apache.org/ojb/) or Hibernate (http://hibernate.bluemars.net/) instead of using JDBC directly. john-paul delaney wrote: Hello List... newbie question coming up: If I set up a jdbc connection object in one servlet, do I have to close it each time or can the same connection be re-utilized by other servlets each using a different sql statement (perhaps storing the connection as a session attribute?). Is there a significant resource saving by not creating a JDBC connection object for each database access? I'm thinking of storing a connection for each user in the session, as opposed to pooling - primarily because I'm not sure how a database pool works nor how to set it up. Should I do a re-think on this? I'm using one postgresql 7.3.3 thanks /j-p. - 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: URI Servlet Path Problems
At 02:37 PM 8/6/2003, you wrote: That is pretty much what my understanding was as well. But I am glad you cleared it up for me. So appending my webapp folder name is not bad practice then. It is just something that has to be done. Depends what you mean. Appending your webapp folder name in your html pages is NOT considered good practice because it locks you in to a specific web application name. There are three good solutions to this problem: (1) Use Mike's suggestion of using request.getContextPath() when generating your html. This would produce code such as (in a jsp): img src=%request.getContextPath()%/myServlet/ (2) Make all of your URLs relative. That means doing things like (in html): img src=../myServlet/ (3) Maintain all this information in your own configuration files. I prefer this method as it allows for maximum flexibility in deployment (for which I'm responsible) -- but that's a different Thread. Do whatever works best for you. This produces something like (in a jsp): img src=%MyConfig.getURLPrepend()%/imageWebApp/myImageServlet/ justin Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential See http://www.nextengine.com/confidentiality.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: active session counting, redux
ok, that is helpful. (both things.) after changing the timeout to 5 min, i confirmed that indeed it was destroying a session after 5 min. the reason i went with HttpSessionListener was i had read that using HttpSessionBindingListener, once the session was unbound, you couldn't get any info on that session. the reason i went with my user implementing HttpSessionListener was i had read that you had to implement it in an object that would be bound to the session, and my user object is the only one i am certain to bind to the session. now, i now you guys have had endless discussions about active session counting (hence my subject line contains redux), and i apologize for bringing up an old and re-re-rehashed topic, but i could still use a little more advice. i haven't quite got it working yet, but nevertheless i guess i'm ready now to hear what i should have done instead of what i did do. thanks, Barclay A. Dunn Senior Developer www.HappyPuppy.com 33-41 Newark St, #1A Hoboken, NJ 07030 201-269-6302 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 1:13 PM To: Tomcat Users List Subject: RE: active session counting, redux Howdy, hmmm. thanks for your thoughts, and good question. upon logout, among other things, i am calling session.invalidate(). should i do something different? Invalidate is close to but not the same as destroy. Specifically, the container is not required to destroy a session when you invalidate it. For experimentation and to verify your solution, set the session timeout to 5 minutes in web.xml, create one session, then wait 5 minutes for it to be timed out and a bit more for it to be destroyed, and see if your listener handles it properly. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can I get an answer please -- Re: Why integrate Tomcat with a web server?
Hello John, I hate to be pushy, but are you going to post a reply to this question at some point? Nathan - Original Message - From: Nathan Ward To: [EMAIL PROTECTED] ; Tomcat Users List Sent: Monday, August 04, 2003 11:05 AM Subject: Why integrate Tomcat with a web server? I have a question for John Turner about a statement in the book Apache Tomcat Security. Page 12 says: As discussed earlier, running publicly available web services as root or superuser is typically a bad idea, so the solution is to avoid using Tomcat as a stand-alone web server on port 80 by integrating it with a standard HTTP web server such as Apache, Microsoft's IIS, or Sun Microsystem's iPlanet. Question: Does this apply when running under Windows? The reference to as discussed earlier talks about running Tomcat as a service with more permissions than necessary. Windows defaults to running services as SYSTEM which has administrator privileges. Fine, but as also mentioned earlier, you can create a user account with less permissions and setup the service to run Tomcat under that account. So, how does the statement on page 12 relate to running Tomcat under windows, i.e. why run Tomcat with IIS rather than just run Tomcat? There may be performance reasons, but from a security point of view, is there increased security risks in running Tomcat without IIS when running as a service under Windows? Nathan
Re: connectionTimeout
Geralyn M Hollerman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bill Barker wrote: It depends on which Connector you are using. The value of 0 is simply that both the Http-Coyote and the Jk-Coyote would both behave as the docs describe for -1. Yes, Coyote was what I was thinking of. For the Jk-Coyote Connector, you usually want the connectionTimeout disabled, or at least set to a large value (e.g. 5min). The mod_jk module will reuse the connection for different requests, so the only reason to have a connectionTimeout at all is to free up Threads after a peak-request spike. I've got a Linux 7.x box configured this way, but on my Solaris boxes I always disable 'connectionTimeout'. This brings up an interesting point. Is this parameter akin to Apache's TimeOut directive? If so, then would it not be a problem if you had the Tomcat connectionTimeout set to some low value (let's say, 1 min) and Apache TimeOut set to the default (5 min)? I would think Apache would pass a request along after, say 4 min, but Tomcat would've timed out, no? Or are they not related as I'm thinking? It is functionally similar at the implementation level, but very different at the abstracted level. If you set connectionTimeout=1min, and TimeOut=5min (note: neither of these is syntactically correct, they are just for the purpose of discussion), then after 4min Apache would discover that Tomcat dropped the connection. It would then attempt to open a new connection to Tomcat, and proceed to use that one. There is a slight performance hit with re-opening the connection, but that's all. This feature has been there since mod_jk 1.1 (e.g. the one that ships with TC 3.3). The result is that setting the connectionTimeout (to a reasonable value) only has the effect of removing Tomcat Threads if the server becomes idle (e.g. it is an intranet site, so gets next to no traffic after 5PM). -- Lynn Hollerman. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.2 and IIS
Well, since the error messages are complaining about localhost 80, I would assume that you should either: 1. consider putting Tomcat on 8080, and IIS back on 80 or 2. analyzing the registry and your properties files and look for anything that has port 80 specified and switch it to 8080. Switching Tomcat back and forth on ports is easy. I would think the easiest way for you to do this would be: 1. leave IIS on 80. 2. switch Tomcat between 80 and 8080 as needed, when on 80, turn IIS on/off as needed so there are no conflicts. That way your environment will match the deployment environment, and still give you the flexibility to use Tomcat in standalone mode for your own development with little fuss. John vikas jain wrote: I have servlet running with tomcat. My main server is IIS. (on my machine it's just a test, and I am using tomcat as web server but on the system machine the web server is IIS. there I wan to deploy servlets). Conclusion is how to run servlets using IIS? Thanks, From: John Turner [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat 5.0.2 and IIS Date: Thu, 07 Aug 2003 11:07:21 -0400 If you have Tomcat on port 80, what do you need the connector for? John vikas jain wrote: I followed the instructions to set up IIS with tomcat. The virtual redirector is showing green arrow pointing up but the servlets are not working. in the log I am getting following errors: [Thu Aug 07 09:28:03 2003] [jk_ajp_common.c (1234)]: In jk_worker_t::validate, Error localhost 80 [Thu Aug 07 09:28:03 2003] [jk_worker.c (176)]: wc_create_worker validate failed for testWorker [Thu Aug 07 09:28:03 2003] [jk_worker.c (246)]: build_worker_map failed to create workertestWorker [Thu Aug 07 09:33:03 2003] [jk_ajp_common.c (1234)]: In jk_worker_t::validate, Error localhost 80 [Thu Aug 07 09:33:03 2003] [jk_worker.c (176)]: wc_create_worker validate failed for testWorker [Thu Aug 07 09:33:03 2003] [jk_worker.c (246)]: build_worker_map failed to create workertestWorker [Thu Aug 07 10:03:31 2003] [jk_ajp_common.c (1234)]: In jk_worker_t::validate, Error localhost 80 [Thu Aug 07 10:03:31 2003] [jk_worker.c (176)]: wc_create_worker validate failed for testWorker [Thu Aug 07 10:03:31 2003] [jk_worker.c (246)]: build_worker_map failed to create workertestWorker I set up IIS at 8080 and tomcat at 80 port, does that make any difference? Thanks, vikas From: John Turner [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat 5.0.2 and IIS Date: Wed, 06 Aug 2003 08:16:08 -0400 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/ John vikas jain wrote: Thanks Derek. One more question. Where am I supposed to download dll file from? From: Derek Mahar [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Eric J. Pinnell [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Tomcat 5.0.2 and IIS Date: Tue, 5 Aug 2003 15:47:54 -0400 After much blood, sweat, and tears, I successfully got Tomcat 5.0.5, Microsoft IIS, and the JK2 Connector (isapi_redirector2.dll) to work together. Refer to the following documents: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/installhowto.htm l http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html http://www.oreillynet.com/pub/a/onjava/2002/11/20/tomcat.html http://www.oreillynet.com/pub/a/onjava/2002/12/18/tomcat.html http://www.geocities.com/gzhangx/websrv/ajp/ajp.html Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Latest movie trailers. On your mobile. http://server1.msn.co.in/sp03/gprs/howcani_movie.asp With GPRS. - 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] _ Want to visit Spain? Click here. http://server1.msn.co.in/sp03/spain/index.asp Win a free trip. - 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: Mapping problem
Howdy, 1. What ever happened to the 'catalina out log'? It's there in $CATALINA_HOME/logs/catalina.out. Aug 6, 2003 10:27:15 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 129 column 11: The content of element type web-app must match (icon?.desplay-name?,description?,distributable?, context-parm*, filter*, filter-mapping*, listener*, servlet* ... This is a FAQ. Validate your web.xml file with a tool like XMLSpy that will show you exactly where the error is. Make sure the DOCTYPE declaration specifies the servlet specification v2.3 DTD and the contents of the file are compliant with that DTD. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.2 and IIS
*sigh* not working doesn't help much. Error messages? Contents of log files? John vikas jain wrote: Now I have changed the worker.properties file to this: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 and uriworkermap.properties to: /examples/*=ajp13 /examples/*.jsp=ajp13 /examples/servlet/*=ajp13 but not working :( Vikas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet mapping for root directory in a webapp?
Hello, I'm trying to get tomcat (from sun's jwsdp1.2) to do a default mapping. Ie, in my webbapp /stuff/ I want to get a servlet to serve the root page. As I understand it there is a default servlet that serves static content, I do not want to replace that one, but only load a specific servlet for the root url for my webapp. I (and a lot of other people, apparently =) have tried: servlet-mapping servlet-nameMainView/servlet-name url-pattern//url-pattern /servlet-mapping as I found it on a lot of search results, but as I understand it that pattern is already taken by the default servlet. It doesn't work. I have had little succes searching google, and the documentation for solutions. Is it at all possible, or does everyone just use a dummy index.html in the root directory and forwards the users to the real content serving servlet? TIA -- Fredrik Jonson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]