TC 3.3 -- user authorization not working correctly.
There seems to be some persistance of user authorization settings beyond Tomcat's global-users.xml and auth-users.xml file, and Tomcat startup and shutdown. I can't seem to get the authorization to work in a rational manner. I am only doing the simplest kind of authorization with roles and a user. What I have works but if I want to limit one user to one role that is in turn only used in one web.xml, it just won't do it. Why?? I think Tomcat is the server-side equivalent of Netscape browsers -- a time sink to be avoided. However, I am relatively stuck with it now, and would really appreciate any magic tips anyone might have out there. Also, if anyone has any workarounds to keep Tomcat from throwing an error when talking to N6/7/Moz over ssl, that would be appreciated. (My favorite situation was with Tomcat 3.2.4, which would completely crash into a memory leak when hit with N6/7/Moz). When the two team up, they're really great! Thank you in advance. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How do I get the absolute path of a file in a directory aboveWEB-INF directory of my web application?
I don't know offhand how you can do that, but if you want to reach up above the WEB-INF directory, you can use dot-dot (..). - CB Peter Lee wrote: I am using Tomcat for servlets. How do I get the absolute path of a file in a directory above WEB-INF directory of my web application? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
TC 3.3 -- user authorization not working correctly.
There seems to be some persistance of user authorization settings beyond Tomcat's global-users.xml and auth-users.xml file, and Tomcat startup and shutdown. I can't seem to get the authorization to work in a rational manner. I am only doing the simplest kind of authorization with roles and a user. What I have works but if I want to limit one user to one role that is in turn only used in one web.xml, it just won't do it. Why?? I think Tomcat is the server-side equivalent of Netscape browsers -- a time sink to be avoided. However, I am relatively stuck with it now, and would really appreciate any magic tips anyone might have out there. Also, if anyone has any workarounds to keep Tomcat from throwing an error when talking to N6/7/Moz over ssl, that would be appreciated. The result of this bug is that whenever someone hits my Tomcat server with ssl, it slows down the website for everyone else. (My very favorite situation was with Tomcat 3.2.4, which would completely crash into a memory leak when hit with N6/7/Moz). When the two team up, they're really great! Thank you in advance. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
URL Mappings on Tomcat 3.3 must go between servlet and security sections.
Apparently, this is the case. Yet another awful fact for those stuck with Tomcat 3.3. !-- URL Mapping. This must go between servlet and security sections. -- servlet-mapping servlet-name DynaFastSurv3 /servlet-name url-pattern /s3 /url-pattern /servlet-mapping -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat 4 - SSL - Client Authentication
Have you checked the permissions to the directory where your keystore is held? The process running the webserver must of course be able to read the keystore. - CB Shiva.Devaguptapu wrote: Hi, I am using Tomcat 4 on a linux system. I am trying to enable SSL with client authentication enabled. I want the client to be the Internet Explorer, running on Win2K, my desktop. I found the following steps on the net and tried. * Create keys on the server * Create the certificate on the server * Uncomment the required part in the server.xml of Tomcat * Enter appropriate values for the attributes in server.xml as : Connector className=org.apache.catalina.connector.http.HttpConnector port=8453 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 scheme=https secure=true Factory className=org.apache.catalina.net.SSLServerSocketFactory keystoreFile=/home/shiva/tomcat/keystore/server.keystore keystorePass=changeit clientAuth=true protocol=TLS/ /Connector * Create keys on the client * Create the certificate on the client * Import the cliet certificate on the server * Import the client certificate into Internet Explorer Now I started tomcat and I tried to access from the IE, the URL https://192.168.200.12:8453 - then the Client Authentication dialog box appears without any certificates in the list, as a result I cannot select any certificate, and if I click on OK button, it says page cannot be displayed. I also tried importing the client certificate into $JAVA_HOME/jre/lib/security/cacerts on the serverand even that did not solve the problem and even I tried importing the server certificate on the client side into $JAVA_HOME/jre/lib/security/cacerts and into IE as well and even after the problem is not solved. I am including all the commands I used to perform the above steps. Can anyone help me out in getting this done. Thanks in advance, Shiva. = Commnands used = ***For generating server keys on Linux*** keytool -genkey -alias tomcat-sv \ -keyalg RSA -keypass changeit \ -storepass changeit \ -keystore $CATALINA_HOME/keystore/server.keystore ***this keystore directory is created by me*** --- ***For generating server cetificate on Linux*** keytool -export -alias tomcat-sv \ -storepass changeit \ -file server.cer \ -keystore $CATALINA_HOME/keystore/server.keystore --- ***For generating client keys on Win2K*** keytool -genkey -alias tomcat-cl ^ -keyalg RSA -keypass changeit ^ -storepass changeit ^ -keystore C:\ssltest\mykeystore\client.keystore --- ***For generating client cetificate on Win2K*** keytool -export -alias tomcat-cl ^ -storepass changeit ^ -file C:\ssltest\client.cer ^ -keystore C:\ssltest\mykeystore\client.keystore --- ***For importing the client certificate on the server*** keytool -import -v -trustcacerts \ -alias tomcat -file client.cer \ -keypass changeit \ -storepass changeit \ -keystore /home/lotto/lotto/utilities/tomcat/keystore/server.keystore = -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
TC 3.3.1 authentication roles - what is going on?
It seems that to get good authentication whilst tying one role to one web app (so only one designated user can use a given designated webapp), I must assign two roles to the designated user: an arbitary role, and a role of deployer, and omit or comment out the role of deployer in web.xml: auth-constraint role-name dentalExpert0 /role-name !-- role-name deployer /role-name -- /auth-constraint In this case, the user Dr. Alan H is assigned to be a deployer. Authentication does not work well without this. I tried creating a dummy deployer, paired with dentalExpert0, but that did not work (it's commented out below). At least now, however, I can get good 1-1 authentication. I am running across two browser frames, and because document.domain assignments do not seem to mollify the furiously buggy Tomcat, I have had to submit to requiring the user to log-in twice, once for each frame. That is, until I change web servers. Anyone have any idea of how to explain TC 3.3.1's curious behavior? tomcat-users user name=root password=x roles=tomcat,role1,tomcat_admin,tomcat_root / user name=guest password=x roles=demo_user / user name=Chris password= roles=deployer / !-- user name=Chris0 password= roles=deployer0 / -- user name=Dr. Alan H password=x roles=dentalExpert0,deployer / /tomcat-users -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Fwd: Mozilla 1.x/N6+ causes memory leak on Tomcat 3.2.4]
-- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. ---BeginMessage--- In side-by-side tests, IE 5.5 causes no such leak, but Moz1.x/N6+ cause Tomcat to simply start allocating memory until the heap size limit is exceeded by about 20MB, resulting in an eventual shutdown of the JVM. I'm pretty sure it's not my code since the leak starts immediately on secure (ssl) session log-in to a static page (no servlet action whatsoever). If a Moz/N6+ browser is already logged in however, after restarting the Tomcat server it takes a request from Moz1.x/N6 to start the big leak that leads to an eventual JVM shutdown. I thought that Netscape existed only to torture client-side developers; it seems they've got something going on the server-side now! Of course, it would be Tomcat's bug, but it's funny how many bugs always surround Netscape. Since this bug crashes my server, I would very much appreciate help with it. I've seen other postings on the web indicating that this is a problem but have not seen anyone address it in a response. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. ---End Message--- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Mozilla crashes Tomcat.
Mozilla 1.x/N6+ causes a devastating memory leak on Tomcat 3.2.4. In side-by-side tests, IE 5.5 causes no such leak, but Moz1.x/N6+ cause Tomcat to simply start allocating memory until the heap size limit is exceeded by about 20MB, resulting in an eventual shutdown of the JVM. I'm pretty sure it's not my code since the leak starts immediately on secure (ssl) session log-in to a static page (no servlet action whatsoever). If a Moz/N6+ browser is already logged in however, after restarting the Tomcat server it takes a request from Moz1.x/N6 to start the big leak that leads to an eventual JVM shutdown. I thought that Netscape existed only to torture client-side developers; it seems they've got something going on the server-side now! Of course, it would be Tomcat's bug, but it's funny how many bugs always surround Netscape. Since this bug crashes my server, I would very much appreciate help with it. I've seen other postings on the web indicating that this is a problem but have not seen anyone address it in a response. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mozilla crashes Tomcat.
Yes, you are right, excuse me for not supplying the basic info of several systems I am using. I'm using: tomcat 3.2 standalone - yes. Java SDK 1.4 (includes JSSE) Sun's JVM standard with SDK 1.4 The problem happens on Win2K and also on Linux RedHat 8.0 (Contains latest OpenSSL). I have by now done a fair bit of testing on this, all in the SSL mode. The application is stable when accessed by IE 5.5. When using Mozilla 1.1, however, the Tomcat Java process is inevitably thrown into a memory-allocating behavior (moving by about 10MB every 10 seconds) that continues until crash of the Tomcat Java process. Sometimes this behavior is invoked simply by logging in under Mozilla (SSL), and sometimes it requires an access or two from Mozilla. A tell-tale sign from Mozilla that the memory allocating behavior has been invoked is that a browser alert pops up saying document contains no data. I can run the very same accesses, using the very same front-end, from IE 5.5 with apparently no problem, and the behavior of the servlet is exactly the same for both browsers. I know that Mozilla uses a rather non-sensical security system whereby a site is deemed insecure if a window frame it contains is written to by JavaScript code from the original secured site. IE, of course, does not do this. Maybe there is some unfortunate interaction here with Tomcat? For it seems that something in Moz's headers must be confusing Tomcat. In any case, upgrading to 3.3 is not a bad idea. I am about at the end of my rope with this bug. I would go to 4.0 but want to stay as far away from the bleeding edge as reasonable and hope to avoid the changing of my configuration files that moving to 4.0 would necessitate. I really hope someone out there has some ideas. It is all too familiar a situation to me to have a Netscape product involved in just burning up days of my time. - CB Ralph Einfeldt wrote: Maybe you should provide the answer to following questions: - Do you run tomcat stand alone ? - If yes which JSSE do you use ? - Which jvm do you use ? - On which operating system ? Maybe you should try to profile tomcat with a tool like OptimizeIt to see if it is tomcat or the underlying ssl implementation that has the leak. BTW: tc 3.2 is quite outdated. Maybe you should upgrade to 3.3.* or 4.*. -Original Message- From: Christopher Mark Balz [mailto:[EMAIL PROTECTED]] Sent: Friday, November 29, 2002 9:21 AM To: [EMAIL PROTECTED] Subject: Mozilla crashes Tomcat. I'm pretty sure it's not my code since the leak starts immediately on secure (ssl) session log-in to a static page (no servlet action whatsoever). If a Moz/N6+ browser is already logged in however, after restarting the Tomcat server it takes a request from Moz1.x/N6 to start the big leak that leads to an eventual JVM shutdown. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Mozilla 1.x/N6+ causes memory leak on Tomcat 3.2.4
In side-by-side tests, IE 5.5 causes no such leak, but Moz1.x/N6+ cause Tomcat to simply start allocating memory until the heap size limit is exceeded by about 20MB, resulting in an eventual shutdown of the JVM. I'm pretty sure it's not my code since the leak starts immediately on secure (ssl) session log-in to a static page (no servlet action whatsoever). If a Moz/N6+ browser is already logged in however, after restarting the Tomcat server it takes a request from Moz1.x/N6 to start the big leak that leads to an eventual JVM shutdown. I thought that Netscape existed only to torture client-side developers; it seems they've got something going on the server-side now! Of course, it would be Tomcat's bug, but it's funny how many bugs always surround Netscape. Since this bug crashes my server, I would very much appreciate help with it. I've seen other postings on the web indicating that this is a problem but have not seen anyone address it in a response. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems running Tomcat from command line
You should set CLASSPATH as a Windows environment variable. I always make sure that the slashes in the CLASSPATH value should all point the same direction. - CB Steve Russell wrote: Hi; I just started a new job. The company is using MS Windows 2000 and Tomcat 3.2.4 ( not my choice - peace! ). I am able to start tomcat by going to C:\Tomcat\bin and double clicking startup.bat in explorer. However, I am not able to start tomcat from a command line. When I try it from dos I get bad command or filename When I try startup.sh from my cygwin I get Using classpath: C:\TOMCAT/lib/ant.jar:C:\TOMCAT/lib/crimson.jar:C:\TOMCAT/lib/jasper.jar:C:\TOMCAT/lib/jaxp.jar:C:\TOMCAT/lib/servlet.jar:C:\TOMCAT/lib/test:C:\TOMCAT/lib/tools.jar:C:\TOMCAT/lib/webserver.jar:C:\JDK/lib/tools.jar:.;C:\W2Kimage_c\cygwin\home\steve\Projects\Classes stever@STEVER c:/TOMCAT/bin $ Exception in thread main java.lang.NoClassDefFoundError: org/apache/tomcat/s tartup/Tomcat == When I have tried starting C:\Tomcat\bin directly, in dos I get the error message that %TOMCAT_HOME%/lib/servet.jar does not exist. It exists at that location. TOMCAT_HOME is set properly at C:\Tomcat, output statements I put in tomcat.bat reflect that. It seems like windows is not TOMCAT_HOME/lib I'm not a windows expert, can anyone give me a clue? Here is my system PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\system32\nls;%SystemRoot%\system32\nls\English;C:JDK\bin;C:\ProgramFiles\GnuEmacs21.2\bin;C:\ProgramFiles;C:\PROGRA~1\ULTRAE~1;C:\Program Files\Microsoft SQL Server\80\Tools\BINN; I have a JAVA_HOME and a JDK_HOME set, and those work. Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems running Tomcat from command line
As you probably know, the icon shows what command it actually issues in the properties dialogue (right-click on it) along with a directory to start in property. What are these poperties? Julius Davies wrote: Steve Russell, Perhaps this link will help: http://www.google.com/search?q=out+of+environment+space+tomcat Try to get that out of environment space error to go away, then we'll work on the absentee servlet.jar issue. Julius Davies, Programmer, CUCBC Email: [EMAIL PROTECTED], Ph: 604.730.6385 -Original Message- From: Steve Russell [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 1:55 PM To: Tomcat Users List Subject: Re: Problems running Tomcat from command line Hi; I'm reposting this, hoping that this version is more clear. -- I'm on Windows 2000 using Tomcat 3.2.4 ( not my choice ). I can start tomcat by double clicking the startup.bat file in C:\TOMCAT\bin. However, I can't start tomcat programmatically by typing startup.bat or startup ( without quotes ) from a dos prompt that is in C:\TOMCAT\bin I have tried running C:\TOMCAT\bin directly. It complains that it is out of environment space ( how do you set that in win 2000 )AND that it cant find C:\TOMCAT\lib\servlet.jar Its there. Here are the Windows 2000 environmental variables I have set for system: CLASSPATH: ..;C:\W2Kimage_c\cygwin\home\steve\Projects\Classes;C:\TOMCAT\ lib\servlet.jar PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; %SystemRoot%\system32\nls;%SystemRoot%\system32\nls\English;C: JDK\bin;C:\ProgramFiles\GnuEmacs21.2\bin;C:\ProgramFiles;C:\PR OGRA~1\ULTRAE~1;C:\Program Files\Microsoft SQL Server\80\Tools\BINN; JAVA_HOME: C:\JDK TOMCAT_HOME C:\TOMCAT Thanks in advance for any clues Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SSL request Mozilla browser causes memory leak on Tomcat 3.2.1
In repeated, side by side trials doing https requests (ssl), there is no problem and behavior is normal with requests from Internet Explorer 5.5 (memory allocation stays at about 22 megabytes), but Mozilla 1.0 seems to send some kind of request that causes Tomcat to just go on allocating memory until there is a mere 4 megabytes of memory left on my web server (Tomcat at this point is using about 82 megabytes of memory). Fun and more fun with Netscape products! ( -- as if web programmers haven't had enough already). The allocation goes up about two megabytes every 8 seconds. I wonder if it could be taken care of by more memory, or if the memory allocation would just go on. Any ideas? Why should a properly behaving server do this? I am running with default configurations. I hope someone can point me in the right direction. - CB -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Failed JDBC connection hangs Tomcat
Here is some sample init() method code that I use to test the db connection on context startup: try { /*- * The driver objects register themselves with the driver manager * at the time of loading, * and the following line forces the loading of the (MySQL or other) * driver * (it registers itself). */ Class.forName(driver).newInstance(); conn = DriverManager.getConnection(url); sc.log(Database connection successfully obtained.); conn.setAutoCommit(false); // Prepare the query: String qString = queryString.getQueryString(); sc.log(\n\n Using this query string: + qString + \n); pstmt = conn.prepareStatement(qString); // Test db connection for integrity: stmt = conn.createStatement(); rs = stmt.executeQuery(highestUniqueId); if (rs.next()) { uniqueEntryId = rs.getInt(1); // Gets the highest unique survey i.d. } sc.log(uniqueEntryId is initialized as +uniqueEntryId); // Close the statement object, which also closes the resultset. stmt.close(); if (uniqueEntryId 0) { sc.log(Problem with database connection if + this is not a new db table. This db table has no + greatest unique entry id number. ); } } catch (ClassNotFoundException e) { String msg = *** Couldn't load database driver.; sc.log(msg, e); throw new UnavailableException(msg); } catch (SQLException e) { String msg = *** Couldn't get db connection.; sc.log(msg, e); throw new UnavailableException(msg); } catch (IllegalAccessException e) { String msg = *** Couldn't get access to db connection.; sc.log(msg, e); throw new UnavailableException(msg); } catch (InstantiationException e) { String msg = *** Couldn't create db connection.; sc.log(msg, e); throw new UnavailableException(msg); } Jacob Kjome wrote: hmm I think in that case you would have to set a Timeout on the connection. You might want to test the connection upon context startup and if the connection times out, then throw an error or redirect to a static page saying that the app is temporarily unavailable. Not sure what else you can do? Anyone? Jake At 01:00 PM 7/16/2002 -0700, you wrote: Yes, it is important to close your connections when you're done with them, and this is considered in each of our methods. The problem we are seeing with the hung connections, however, occurs before any SQLException has been thrown, anywhere in the servlet engine. In fact, even if the very first connection attempted at startup is made to a server which is unavailable, every other connection will wait until that first connection times out (and then throws its SQLException). Thank you for your consideration of the problem. -Paul On Monday, July 15, 2002, at 10:25 PM, Jacob Kjome wrote: BTW, in the code below, I forgot to create the connection at the beginning of the try statment. Just wanted to note that you will need to do that. conn = openConn(); //openConn() grabs the connection from a pool or creates a brand new connection Just insert that and whatever you need to do to open your connection at the beginning of the try statement below. jake At 12:00 AM 7/16/2002 -0500, you wrote: HI Paul, You simply need to make sure that you've let go of your resources such as connections, resultsets, etc Here is some sample code for that... Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String query = SELECT * FROM mytable; try { pstmt = conn.prepareStatement(query); rs = pstmt.executeQuery(); //do something with the ResultSet... rs.close(); pstmt.close(); conn.close(); } catch(SQLException e) { System.out.println(e.getMessage()); throw e; } finally { if (rs != null)try { rs.close(); }catch(Exception e2) {} if (pstmt != null) try { pstmt.close(); }
Re: Running SSL on IIS/Tomcat 3.3.1
Unfortunately, I don't know what the details would be for IIS. I would guess that it would not be easy to find info on integrating IIS with Tomcat as IIS is a Microsoft solution. You may be able to get some clues as to how to do this from the doc on integrating Apache with Tomcat. Have you considered simply using Tomcat as your SSL host? - CB Jose Aguilera wrote: Christopher, Thanks for your response. Can you please elaborate or direct me to a link where I could get more details on the setting up IIS as the SSL host while running the application through Tomcat. I already installed the certificate in the keystore using keytool. Jose. -Original Message- From: Christopher Mark Balz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 9:44 PM To: Tomcat Users List Subject: Re: Running SSL on IIS/Tomcat 3.3.1 You have to use the Java 'keytool' tool to make the JVM aware of your certificate. Then you need to edit your web.xml file appropriately. - CB Jose Aguilera wrote: I have an SSL certificate already installed on IIS and would like my web pages to be displayed in HTTPS mode using Tomcat. What steps must I take to do this? Thanks. Jose Aguilera This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately. -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Running SSL on IIS/Tomcat 3.3.1
You have to use the Java 'keytool' tool to make the JVM aware of your certificate. Then you need to edit your web.xml file appropriately. - CB Jose Aguilera wrote: I have an SSL certificate already installed on IIS and would like my web pages to be displayed in HTTPS mode using Tomcat. What steps must I take to do this? Thanks. Jose Aguilera This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately. -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Servlet dying silently under SSL; was working fine.
Running Tomcat 3.2 on Win2K. Can anyone tell me what the following error messages from tomcat.log might imply is wrong with my web application or dev environment? 2002-07-13 22:25:46 - Ctx( ): 400 R( /) null 2002-07-13 22:25:46 - Ctx( ): IOException in: R( /) error while writing to socket 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING The whole log from startup of Tomcat is below. I am running a servlet under ssl that accepts a form value from a web page (http form) and performs a corresponding database query and returns the results to the client. It was working fine, and the only thing that changed I believe is that my laptop went into auto-shutdown mode once when it was running from its battery. Other servlets work fine. Full contents of tomcat.log: === 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /examples ) 2002-07-13 22:24:39 - Ctx( /dynasurv ): Set debug to 9 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /dynasurv ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /admin ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /dynasurv.tar.gz ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /dynasurv.zip ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /olddynasurv.tar.gz ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /test ) 2002-07-13 22:24:46 - Ctx( /dynasurv ): XmlReader - init /dynasurv webapps/dynasurv 2002-07-13 22:24:46 - Ctx( /dynasurv ): Reading C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\WEB-INF\web.xml 2002-07-13 22:24:47 - Ctx( /dynasurv ): Loading -2147483646 jsp 2002-07-13 22:24:48 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2002-07-13 22:24:48 - PoolTcpConnector: Starting HttpConnectionHandler on 8443 2002-07-13 22:24:48 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 2002-07-13 22:24:52 - Ctx( /dynasurv ): Get real path /static/QueryTool/index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\static\QueryTool\index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv 2002-07-13 22:25:46 - Ctx( ): 400 R( /) null 2002-07-13 22:25:46 - Ctx( ): IOException in: R( /) error while writing to socket 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
3 exquisite lines from my tomcat.log beg for your interpretation.
Running Tomcat 3.2 on Win2K. Using Emacs and Cygwin dev tools. Can anyone tell me what the following error messages from tomcat.log might imply is wrong with my web application or dev environment? 2002-07-13 22:25:46 - Ctx( ): 400 R( /) null 2002-07-13 22:25:46 - Ctx( ): IOException in: R( /) error while writing to socket 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING The whole log from startup of Tomcat is below. I am running a servlet under ssl that accepts a form value from a web page (http form) and performs a corresponding database query and returns the results to the client. It was working fine, and the only thing that changed I believe is that my laptop went into auto-shutdown mode once when it was running from its battery. Full contents of tomcat.log: === 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /examples ) 2002-07-13 22:24:39 - Ctx( /dynasurv ): Set debug to 9 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /dynasurv ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /admin ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /dynasurv.tar.gz ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /dynasurv.zip ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /olddynasurv.tar.gz ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( ) 2002-07-13 22:24:39 - ContextManager: Adding context Ctx( /test ) 2002-07-13 22:24:46 - Ctx( /dynasurv ): XmlReader - init /dynasurv webapps/dynasurv 2002-07-13 22:24:46 - Ctx( /dynasurv ): Reading C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\WEB-INF\web.xml 2002-07-13 22:24:47 - Ctx( /dynasurv ): Loading -2147483646 jsp 2002-07-13 22:24:48 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2002-07-13 22:24:48 - PoolTcpConnector: Starting HttpConnectionHandler on 8443 2002-07-13 22:24:48 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 2002-07-13 22:24:52 - Ctx( /dynasurv ): Get real path /static/QueryTool/index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\static\QueryTool\index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv 2002-07-13 22:25:46 - Ctx( ): 400 R( /) null 2002-07-13 22:25:46 - Ctx( ): IOException in: R( /) error while writing to socket 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING 2002-07-13 22:25:46 - Ctx( ): IllegalStateException in: R( /) Current state = FLUSHED, new state = CODING -- . . . / This Cabinet is formd of Gold / And Pearl Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames other Hills / And another pleasant Surrey Bower . . . - from The Crystal Cabinet, a poem by William Blake. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Servlet dying silently under ssl.
Running tomcat 3.2 on Win2K with MySql. Use Cygwin and Emacs dev tools. I have a simple servlet running under ssl (public-private key) that is dying silently and unexpectedly. It was working flawlessly and then stopped working without there being any change anywhere on my entire machine that I would notice as something that would cause the servlet to die silently (can't get any logging). I don't know where to look next for the problem and hope for some suggestions. Prior to my latest reboot, I couldn't even 'tail' my tomcat.log. At that time when I ran this very simple servlet that was just working recently, tomcat.log became 416 Kb and wouldn't 'tail'. The servlet accepts a 'post'-method http form submission, and other servlets that do the same but not under ssl still run fine. I can get no 'servlet.log''s from the servlet that is dying. Two reboots ago, tomcat.log was also huge and showed what appeared to be low-level i/o errors from running the dying servlet. The symptoms on the client are that after http form submission the page just flashes (refreshes) and resets itself, with no server error message. The only defining change from when the dying servlet used to work that I can see is that the machine (a laptop running Win2K) shut itself down when on battery -- perhaps it ran low on juice. But all else works fine and since then I've shutdown and rebooted three times, to no avail. web.xml and the simple servlet in question are below, as well as a relevant section from servlet.xml, and the tomcat.log and servlet.log from my latest reboot and attempt. Any clues? servlet.log --- 2002-07-11 22:07:54 - path=/examples :jsp: init 2002-07-11 22:07:54 - path=/dynasurv :jsp: init 2002-07-11 22:07:54 - path=/admin :jsp: init 2002-07-11 22:07:54 - path=/dynasurv.tar.gz :jsp: init 2002-07-11 22:07:54 - path=/dynasurv.zip :jsp: init 2002-07-11 22:07:54 - path=/olddynasurv.tar.gz :jsp: init 2002-07-11 22:07:55 - path= :jsp: init 2002-07-11 22:07:55 - path=/test :jsp: init tomcat.log --- 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /examples ) 2002-07-11 22:07:45 - Ctx( /dynasurv ): Set debug to 9 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /dynasurv ) 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /admin ) 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /dynasurv.tar.gz ) 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /dynasurv.zip ) 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /olddynasurv.tar.gz ) 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( ) 2002-07-11 22:07:45 - ContextManager: Adding context Ctx( /test ) 2002-07-11 22:07:54 - Ctx( /dynasurv ): XmlReader - init /dynasurv webapps/dynasurv 2002-07-11 22:07:54 - Ctx( /dynasurv ): Reading C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\WEB-INF\web.xml 2002-07-11 22:07:54 - Ctx( /dynasurv ): Loading -2147483646 jsp 2002-07-11 22:07:55 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2002-07-11 22:07:56 - PoolTcpConnector: Starting HttpConnectionHandler on 8443 2002-07-11 22:07:56 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 2002-07-11 22:21:22 - Ctx( /dynasurv ): Get real path /static/QueryTool/index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\static\QueryTool\index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv 2002-07-11 22:26:06 - Ctx( /dynasurv ): Get real path /static/QueryTool/index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\static\QueryTool\index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv 2002-07-11 22:26:13 - Ctx( /dynasurv ): Get real path /static/QueryTool/index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\static\QueryTool\index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv 2002-07-11 22:26:17 - Ctx( /dynasurv ): Get real path /static/QueryTool/index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv\static\QueryTool\index.html C:\Program Files\jakarta-tomcat-3.2.4\webapps\dynasurv From server.xml: --- Context path=/dynasurv docBase=webapps/dynasurv crossContext=false debug=9 reloadable=true /Context From web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Servlets: -- servlet servlet-name DynaForm /servlet-name servlet-class com.treelogic_swe.frameworks.dynaForm.DynaForm /servlet-class init-param param-name dbDriver /param-name param-value