Re: configuring tomcat on XP as a service
Hi, 03May2005 @ 22:45 Greg Baynham thusly spake > However, I have set the environment variables JAVA_HOME and PATH to both > reference my installation of the JSDK. I have rebooted, but still get the Do the env var paths have spaces? Since I had a problem with that on windows once, I've made sure that all subsequent installations had no spaces. How about CATALINA_HOME? Could help, kind regards, Luke -- ._ :| .| |.|/.|_ :|__.|_|.|\.|_ :0421 276 282. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
configuring tomcat on XP as a service
I'm getting tripped up trying to get tomcat to run JSP code when it's installed as a service. when I access a JSP page I get this error: root cause Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK However, I have set the environment variables JAVA_HOME and PATH to both reference my installation of the JSDK. I have rebooted, but still get the error. specifics: tomcat 5.0.28 windows XP home JAVA_HOME=C:\j2sdk1.4.2_06\bin PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;%JAVA_HOME% Any help would be appreciated, GRB - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Network Disk Not Exist Under Tomcat-5.5.9
Hi All, My file test.jsp as follow: --- <%@ page language="java" contentType="text/html;charset=Big5" %> <% out.print("This page is from WebServer Apache Tomcat/5.5.9"); out.print("I have made a Network Disk named 'Y'"); out.print("It show that C:\\ exist"); out.print("But,it show that Network Disk Y:\\ not exist"); String disk="C:\\"; String netWorkDisk="Y:\\"; java.io.File diskF= new java.io.File(disk); java.io.File netWorkDiskF= new java.io.File(netWorkDisk); out.println(disk+" exists()="+diskF.exists()); out.print(""); out.println(netWorkDisk+" exists()="+netWorkDiskF.exists()); %> By http://localhost:8080/somewhere/test.jsp I get the following web page show: This page is from WebServer Apache Tomcat/5.5.9 I have made a Network Disk named 'Y' It show that C:\ exist But,it show that Network Disk Y:\ not exist C:\ exists()=true Y:\ exists()=false Why Network Disk Not Exist Under Tomcat-5.5.9 ? Some one can help me, Thanks By NanFei
Re: Turbine? DBCP?
You might want to checkout Spring: http://www.springframework.org/docs/reference/index.html Geoff Wiggs wrote: What ever happened to Turbine? Is it still used with Tomcat 5.5.+? If so, where do I go to get it? If not, then how am I supposed to handle things like connection pooling? Is there a good tutorial available? I'm working my way through some examples that were written in previous version of Tomcat. Can anyone provide a little direction? Thanks, List. Geoff [EMAIL PROTECTED] www.orcastech.com -- Robert r. Sanders Chief Technologist iPOV (334) 821-5412 www.ipov.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Turbine? DBCP?
What ever happened to Turbine? Is it still used with Tomcat 5.5.+? If so, where do I go to get it? If not, then how am I supposed to handle things like connection pooling? Is there a good tutorial available? I'm working my way through some examples that were written in previous version of Tomcat. Can anyone provide a little direction? Thanks, List. Geoff [EMAIL PROTECTED] www.orcastech.com
Re: detecting tomcat 5.5
Yeah-- it was even lamer than that. I also had to add jmx.jar from bin/ to classpath since that was involved in the Valve dependency from catalina.jar Thanks, Jason Tim Funk wrote: It looks like the task tries to load the class in a new classloader. Of course - doing so loads all it's super classes too - so you'd need to also add catalina.jar to your classpath for the task. -Tim Jason Novotny wrote: Thanks Tim, That is exactly what I was looking for, but I still can't get it to work, and it seems that the task is somewhat broken. Instead of just checking if the class is contained in the jar it also tries to resolve all of its dependencies, so this is what I get when using ant -d: > Finding class org.apache.catalina.valves.FastCommonAccessLogValve Loaded from /Users/novotny/Jakarta/jakarta-tomcat-5.5.9/server/lib/catalina-optional.jar org/apache/catalina/valves/FastCommonAccessLogValve.class Finding class org.apache.catalina.valves.ValveBase [available] Could not load dependent class "org/apache/catalina/valves/ValveBase" for class "org.apache.catalina.valves.FastCommonAccessLogValve" [available] Unable to load class org.apache.catalina.valves.FastCommonAccessLogValve >> I can't see any flags that would tell it to not check for dependencies.. Jason Tim Funk wrote: classpath="${appserver.home}/server/lib/catalina-optional.jar" property="is55"/> -Tim Jason Novotny wrote: Thanks-- unfortunately by default (at least on Unix) that file is not executable so it wouldn't even execute by default. Has anyone actually created an ant task or can give me some ant logic for doing Tomcat version detection for 5.5? Here's a snippet that worked for Tomcat 4 and Tomcat 5.0.X that was fairly easy: rty="tomcat5"/> Thanks, Jason Jason Bainbridge wrote: On 5/3/05, Jason Novotny <[EMAIL PROTECTED]> wrote: Hi, I'm trying to update my build script to do some conditional checking to see if I'm deploying my code to Tomcat 5.5 or using an older version. Is there something (like a particular file or directory) I can check reliably that would indicate that I'm using 5.5 versus an older version? Look at %CATALINA_HOME%\bin\version.bat or version.sh depending on whether you are on Windows or *nix, if you're on Windows and don't have version.bat then you need to download the zipped distribution and now thw windows installer. Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: detecting tomcat 5.5
It looks like the task tries to load the class in a new classloader. Of course - doing so loads all it's super classes too - so you'd need to also add catalina.jar to your classpath for the task. -Tim Jason Novotny wrote: Thanks Tim, That is exactly what I was looking for, but I still can't get it to work, and it seems that the task is somewhat broken. Instead of just checking if the class is contained in the jar it also tries to resolve all of its dependencies, so this is what I get when using ant -d: > Finding class org.apache.catalina.valves.FastCommonAccessLogValve Loaded from /Users/novotny/Jakarta/jakarta-tomcat-5.5.9/server/lib/catalina-optional.jar org/apache/catalina/valves/FastCommonAccessLogValve.class Finding class org.apache.catalina.valves.ValveBase [available] Could not load dependent class "org/apache/catalina/valves/ValveBase" for class "org.apache.catalina.valves.FastCommonAccessLogValve" [available] Unable to load class org.apache.catalina.valves.FastCommonAccessLogValve >> I can't see any flags that would tell it to not check for dependencies.. Jason Tim Funk wrote: classpath="${appserver.home}/server/lib/catalina-optional.jar" property="is55"/> -Tim Jason Novotny wrote: Thanks-- unfortunately by default (at least on Unix) that file is not executable so it wouldn't even execute by default. Has anyone actually created an ant task or can give me some ant logic for doing Tomcat version detection for 5.5? Here's a snippet that worked for Tomcat 4 and Tomcat 5.0.X that was fairly easy: rty="tomcat5"/> Thanks, Jason Jason Bainbridge wrote: On 5/3/05, Jason Novotny <[EMAIL PROTECTED]> wrote: Hi, I'm trying to update my build script to do some conditional checking to see if I'm deploying my code to Tomcat 5.5 or using an older version. Is there something (like a particular file or directory) I can check reliably that would indicate that I'm using 5.5 versus an older version? Look at %CATALINA_HOME%\bin\version.bat or version.sh depending on whether you are on Windows or *nix, if you're on Windows and don't have version.bat then you need to download the zipped distribution and now thw windows installer. Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: detecting tomcat 5.5
Thanks Tim, That is exactly what I was looking for, but I still can't get it to work, and it seems that the task is somewhat broken. Instead of just checking if the class is contained in the jar it also tries to resolve all of its dependencies, so this is what I get when using ant -d: > Finding class org.apache.catalina.valves.FastCommonAccessLogValve Loaded from /Users/novotny/Jakarta/jakarta-tomcat-5.5.9/server/lib/catalina-optional.jar org/apache/catalina/valves/FastCommonAccessLogValve.class Finding class org.apache.catalina.valves.ValveBase [available] Could not load dependent class "org/apache/catalina/valves/ValveBase" for class "org.apache.catalina.valves.FastCommonAccessLogValve" [available] Unable to load class org.apache.catalina.valves.FastCommonAccessLogValve >> I can't see any flags that would tell it to not check for dependencies.. Jason Tim Funk wrote: classpath="${appserver.home}/server/lib/catalina-optional.jar" property="is55"/> -Tim Jason Novotny wrote: Thanks-- unfortunately by default (at least on Unix) that file is not executable so it wouldn't even execute by default. Has anyone actually created an ant task or can give me some ant logic for doing Tomcat version detection for 5.5? Here's a snippet that worked for Tomcat 4 and Tomcat 5.0.X that was fairly easy: rty="tomcat5"/> Thanks, Jason Jason Bainbridge wrote: On 5/3/05, Jason Novotny <[EMAIL PROTECTED]> wrote: Hi, I'm trying to update my build script to do some conditional checking to see if I'm deploying my code to Tomcat 5.5 or using an older version. Is there something (like a particular file or directory) I can check reliably that would indicate that I'm using 5.5 versus an older version? Look at %CATALINA_HOME%\bin\version.bat or version.sh depending on whether you are on Windows or *nix, if you're on Windows and don't have version.bat then you need to download the zipped distribution and now thw windows installer. Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat stopped
From: "Fred Cook" <[EMAIL PROTECTED]> > We are new to tomcat and have been having some difficulties. Things > started out well, but when development work started, Tomcat stopped > responding to any changes in the reinstalled .war file. What do you mean by 'reinstalled'? Are you copying the .war file into 'webapps', using the manager app, or what? Please tell us exactly what you're doing to deploy a new version of your webapp, it sounds like something is going wrong during that process. > IE a new //localhost:8080/foo/ was the same as the old. It's probably cached in the browser, did you hold down shift and click reload to force it to request the page again? -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat stopped
Have you tried restarting tomcat manually? You can check out what tomcat is pushing out : errors/messages by doing a tail -f catalina.out at the prompt. HTH, Anoop On 5/3/05, Fred Cook <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > We are new to tomcat and have been having some difficulties. Things > started out well, but when development work started, Tomcat stopped > responding to any changes in the reinstalled .war file. IE a new > //localhost:8080/foo/ was the same as the old. We get localhost:8080, > but now all it's links and all our code displays a blank screen. And > the oddest problem is we can go to localhost:8080/foo when foo has been > removed and there is no error generated. > > We go through the ./startup.sh and ./shutdown.sh steps every time a > server was changed. > We have reinstalled Tomcat. > > Anybody have an ideas > > -Fred > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks and best regards, Anoop
tomcat stopped
Hi All, We are new to tomcat and have been having some difficulties. Things started out well, but when development work started, Tomcat stopped responding to any changes in the reinstalled .war file. IE a new //localhost:8080/foo/ was the same as the old. We get localhost:8080, but now all it's links and all our code displays a blank screen. And the oddest problem is we can go to localhost:8080/foo when foo has been removed and there is no error generated. We go through the ./startup.sh and ./shutdown.sh steps every time a server was changed. We have reinstalled Tomcat. Anybody have an ideas -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: detecting tomcat 5.5
-Tim Jason Novotny wrote: Thanks-- unfortunately by default (at least on Unix) that file is not executable so it wouldn't even execute by default. Has anyone actually created an ant task or can give me some ant logic for doing Tomcat version detection for 5.5? Here's a snippet that worked for Tomcat 4 and Tomcat 5.0.X that was fairly easy: rty="tomcat5"/> Thanks, Jason Jason Bainbridge wrote: On 5/3/05, Jason Novotny <[EMAIL PROTECTED]> wrote: Hi, I'm trying to update my build script to do some conditional checking to see if I'm deploying my code to Tomcat 5.5 or using an older version. Is there something (like a particular file or directory) I can check reliably that would indicate that I'm using 5.5 versus an older version? Look at %CATALINA_HOME%\bin\version.bat or version.sh depending on whether you are on Windows or *nix, if you're on Windows and don't have version.bat then you need to download the zipped distribution and now thw windows installer. Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: detecting tomcat 5.5
> From: "Jason Novotny" <[EMAIL PROTECTED]> > Sent: Tuesday, May 03, 2005 2:11 PM > Thanks-- unfortunately by default (at least on Unix) that file is > not executable so it wouldn't even execute by default. Did you bother to even LOOK at the script? All it does is call 'catalina.sh version' (I'd like to think that script is executable for you). And all THAT does is run the ServerInfo class. Given all that, you should be able to figure something out. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Client Authentication
The CN for your server cert can be anything you like but you will get a warning in your browser if the CN differs from how you express it in the URL. The user needs to look something like this in tomcat-users. It must be the full DN of the user certificate. HTH, Mark Mahesh S Kudva wrote: Hi It seems like a silly question. But I am new to SSL and Certificates as well as Tomcat. If my machines IP is 192.168.0.1 then I access tomcat as https://192.168.0.1:8443. Keeping this mind should I give the Common Name as 192.168.0.1 ??? How do I specify the client info in the tomcat-users.xml? This is how my tomcat-users.xml file looks like. Regards & Thanks Mahesh S Kudva -Original Message- From: "lercoli" <[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Tue, 3 May 2005 14:33:46 +0200 Subject: Re: Client Authentication CA and Tomcat common name should be the same (localhost or better your DNS). First and Last Name of client sould the name of a Tomcat user declared in tomcat-users.xml. Luca Ercoli - Original Message - From: "Mahesh S Kudva" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, May 03, 2005 1:41 PM Subject: Re: Client Authentication Hi What kind of information do i need to put in the fields of First and Last name and Common name. Will any information do or is it required that I need to put in the server address in the client.p12 certificate.. Regards & Thanks Mahesh S Kudva -Original Message- From: "Mahesh S Kudva" <[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Mon, 02 May 2005 23:04:50 +0530 Subject: Re: Client Authentication Hi I tried with client.p12 first, when i failed I went on with client_cert.x509. I placed it in the personal folder ... Regards & Thanks Mahesh S Kudva -Original Message- From: "lercoli" <[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Mon, 2 May 2005 17:31:54 +0200 Subject: Re: Client Authentication You should import only client.p12 certificate in IE browser and when IE asks you in which folder you want to put it select Personal Folder. I hope it helps you. Luca Ercoli - Original Message - From: "Mahesh S Kudva" <[EMAIL PROTECTED]> To: Sent: Monday, May 02, 2005 5:08 PM Subject: Client Authentication Dear All I've been able to setup Tomcat 5.0.30 successfully on port 8443. I want to use client authentication. Hence i've enabled clientAuth=true in server.xml Running on Mac OS X these were the commands to create a CA and sign a certificate using this CA. Creating a new CA: 1) perl CA.pl -newca Certificate request using openssl: 1) perl CA.pl -newreq 2) perl CA.pl -sign 3) mv newreq.pem client_req.pem 4) mv newcert.pem client_cert.pem 5) openssl rsa < client_req.pem > client_key.pem 6) openssl pkcs12 -export -in client_cert.pem -inkey client_key.pem -out client.p12 For Tomcat using Java keytool to request certificate: 1) openssl x509 -in server_cert.pem -out server.x509 2) openssl pkcs12 -export -in server_cert.pem -inkey server_key.pem -out server.p12 3) keytool -genkey -alias meAsClient -storepass changeit 4) keytool -certreq -alias measclient -file client.csr -storepass changeit 5) openssl x509 -req -CA demoCA/cacert.pem -CAkey demoCA/private/cakey.pem -extensions v3_ca -in client.csr -inform DER -out client_cert.x509 -CAcreateserial 6) keytool -import -alias butterflyCA -keystore /Syst.. ..urity/cacerts -file ../CA/demoCA/cacert.pem 7) keytool -import -alias measclient -keystore clientstore -trustcacerts -file client_cert.x509 Following these commands I dont get any errors. I then import the cacert.pem, the ROOT CA certificate and the client.p12 and client_cert.x509 to the browser I.E 6.0. But still there is a popup requesting for the clients identity and it asks me to select a certificate and no certificates are displayed. How can I go about this? All suggestion and ideas are welcome. Regards & Thanks Mahesh S Kudva --- Robosoft Technologies - Partners in Product Development - 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] --- Robosoft Technologies - Partners in Product Development - 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] --- Robosoft Technologies - Partners in Product Development -
Re: Removal from List
I have just confirmed you are no longer subscribed to this list and I have configured the list not to accept any future attempts to join it from your address. Mark [EMAIL PROTECTED] Dean Trafelet wrote: Thanks. DMT - Original Message - From: "Parsons Technical Services" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Tomcat Users List" Sent: Monday, May 02, 2005 1:41 PM Subject: Removal from List Dear Sir, I am a user of the Tomcat List and noticed a large number of emails from you. It appears that someone subscribed you to the list and you inadvertently confirmed the subscription or someone has access to your email. As an IT person who deals with security I recommend you have someone check your security and that you scan your system and that you change all of your passwords. As for the List subscription, if you will look at the bottom of the emails you will see a link where you can send an email to unsubscribe yourself. As this list is staffed by volunteers and the person with the access needed to remove you may not get you request for several days, this would be your best course of action. If after attempting this you are unable to unsubscribe, please post to the list explaining you have tried to unsubscribe and have been unsuccessful. At that point as soon as a person with the needed access gets your message they can assist you in removing your email from the list. As a user of this list it is always a concern when someone wants off the list and is unable to do so. As this reflects poorly on the List even though it is out of the lists control that you were subscribed in the first place. Doug Parsons Tomcat User - 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: Concurrency Issue With a SessionListener.
I had to do almost the exact same thing a while back... I'm not sure what the source of your lockup is, although I can say my code synchronized on what would be your activeSessions Set any place it was accessed (probably more than I had to frankly)... I'm not even sure there would have been concurrency issues anyway frankly, but it seemed like a good idea at the time :) One issue I'm not sure you have thought of though, and I suppose it could have to do with the lockup, although I'm not sure how... your list of users will be unique to each node in the cluster. You would have an instance of ActiveUsersListener on each node, and each of those would have its own activeSessions Set, so you wouldn't have a consolidated list of users on your site, you'd have a list of users on a given node in each instance of the listener... further, if a user hits one node during logon, and then is directed to another, and during that request you try and retrieve the session from activeSessions, it won't be there because its in the version of activeSessions on the first node. Where specifically does the lockup occur, meaning, is it during logon or a listing of users? I'd bet you can see enough in the log to at least tell what method your in (well, not as the code is posted... throw some log outputs in sessionCreated(), sessionDestroyed() and getActiveUsers() so you can at least see the last place you wind up... hell, I'd put log messages around every single line in this listener so I could tell exactly where it was failing. Frank Jacob Champlin wrote: I am having issues with a SessionListener I have written. The purpose of the Listener is to maintain a List of Active Users on the site. Here is the code for the Listener. // BEGIN CODE public class ActiveUsersListener implements Serializable, HttpSessionListener { public static Set activeSessions = new HashSet(); public void sessionCreated(HttpSessionEvent event) { activeSessions.add(event.getSession()); } public void sessionDestroyed(HttpSessionEvent event) { activeSessions.remove(event.getSession()); } public static List getActiveUsers() { List users = new ArrayList(); Iterator sessionIter = activeSessions.iterator(); HttpSession session = null; EmoUser user = null; while (sessionIter.hasNext()) { session = (HttpSession) sessionIter.next(); user = (EmoUser) session.getAttribute(EmoUser.SESSION_KEY); if (user != null & user.hasLoggedIn()) { users.add(user); } } return users; } } // END CODE I then have a webpage that calls ActiveUsersListener.getActiveUsers() to list out all the active users on the site. Note: I don't just store the User objects because the user object doesn't get created until the user logs in. So the problem I am having is that this code works fine on a single box under Tomcat 5.5.4 . However, as soon as we go into a cluster we get lockups in Tomcat. The server is completely unresponsive, and there are no log/error messages. Because of this I am assuming we have a concurrency issue, however I have no idea where the problem is. A few more bits of information, we persist sessions to file system on shut down, and we use in memory session replication only when session.setAttribute() is called (DirtyFlag). Thank you in advance for any help. Jacob Champlin EMO Corporation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Concurrency Issue With a SessionListener.
I am having issues with a SessionListener I have written. The purpose of the Listener is to maintain a List of Active Users on the site. Here is the code for the Listener. // BEGIN CODE public class ActiveUsersListener implements Serializable, HttpSessionListener { public static Set activeSessions = new HashSet(); public void sessionCreated(HttpSessionEvent event) { activeSessions.add(event.getSession()); } public void sessionDestroyed(HttpSessionEvent event) { activeSessions.remove(event.getSession()); } public static List getActiveUsers() { List users = new ArrayList(); Iterator sessionIter = activeSessions.iterator(); HttpSession session = null; EmoUser user = null; while (sessionIter.hasNext()) { session = (HttpSession) sessionIter.next(); user = (EmoUser) session.getAttribute(EmoUser.SESSION_KEY); if (user != null & user.hasLoggedIn()) { users.add(user); } } return users; } } // END CODE I then have a webpage that calls ActiveUsersListener.getActiveUsers() to list out all the active users on the site. Note: I don't just store the User objects because the user object doesn't get created until the user logs in. So the problem I am having is that this code works fine on a single box under Tomcat 5.5.4 . However, as soon as we go into a cluster we get lockups in Tomcat. The server is completely unresponsive, and there are no log/error messages. Because of this I am assuming we have a concurrency issue, however I have no idea where the problem is. A few more bits of information, we persist sessions to file system on shut down, and we use in memory session replication only when session.setAttribute() is called (DirtyFlag). Thank you in advance for any help. Jacob Champlin EMO Corporation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: detecting tomcat 5.5
Thanks-- unfortunately by default (at least on Unix) that file is not executable so it wouldn't even execute by default. Has anyone actually created an ant task or can give me some ant logic for doing Tomcat version detection for 5.5? Here's a snippet that worked for Tomcat 4 and Tomcat 5.0.X that was fairly easy: rty="tomcat5"/> Thanks, Jason Jason Bainbridge wrote: On 5/3/05, Jason Novotny <[EMAIL PROTECTED]> wrote: Hi, I'm trying to update my build script to do some conditional checking to see if I'm deploying my code to Tomcat 5.5 or using an older version. Is there something (like a particular file or directory) I can check reliably that would indicate that I'm using 5.5 versus an older version? Look at %CATALINA_HOME%\bin\version.bat or version.sh depending on whether you are on Windows or *nix, if you're on Windows and don't have version.bat then you need to download the zipped distribution and now thw windows installer. Regards, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: detecting tomcat 5.5
On 5/3/05, Jason Novotny <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to update my build script to do some conditional checking > to see if I'm deploying my code to Tomcat 5.5 or using an older version. > Is there something (like a particular file or directory) I can check > reliably that would indicate that I'm using 5.5 versus an older version? Look at %CATALINA_HOME%\bin\version.bat or version.sh depending on whether you are on Windows or *nix, if you're on Windows and don't have version.bat then you need to download the zipped distribution and now thw windows installer. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help - Alias or Symlink to external(to the context) images directory?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html - see the "allowLinking" property. As far as how to create the symlink when the app is deployed, not sure beyond running some sort of script when the application loads (using a context listener perhaps). Matt Galvin wrote: Hi All, Does anyone know of a way to set an alias to an external directory that contains images to be displayed on a web page? Maybe explaining what I need to do would help: I have a directory, for example: /tmp/images I have a webapp in: /opt/tomcat/webapps/myapp I need to be able to store uploaded images in /tmp/images (which I have working fine) and I need to be able to display those images via the jsp's in myapp. Is it possible to have an alias called myapp/images that points to /tmp/images or can I maybe use a symlink(can tomcat follow the symlink?) or is there some other way I can do this, other than using a servlet to retrieve/return the images? I need to be able to do this so that when the webapp is updated/redeployed, the images will not get deleted. I am running tomcat 5.0.28 on SUN's Java 1.4.2_08 on a variety or Linux/UNIX systems. Thanks in advance, Matt - 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]
detecting tomcat 5.5
Hi, I'm trying to update my build script to do some conditional checking to see if I'm deploying my code to Tomcat 5.5 or using an older version. Is there something (like a particular file or directory) I can check reliably that would indicate that I'm using 5.5 versus an older version? Thanks, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Permissioning?
It isn't even reaching tomcat, the 403 is coming from a Proxy: "squid/2.5.STABLE4", you will need to either authenticate with the proxy or bypass it somehow in your voice gateway. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com On 5/3/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Problem: > The voice browser in a voice gateway, like BeVocal, executing a subdialog > to save a voice message can't reach the jsp, recordingsave.jsp, deployed > locally in Tomcat 5.0. The jsp is used to save the message locally. > > Solutions tried but failed: > The following have been added in tomcat-users.xml: > >password="" fullName="" roles="provider"/> > > The following mime-type for voice application has been added to the > web.xml: > >vxml >application/voicexml+xml > > > Log from Voice Browser that may help solve the problem: > > 12:20:35.393 > Executing saveMessage > 12:20:35.409 > Fetching: recordingsave.jsp > 12:20:35.409 > HTTP request headers for recordingsave.jsp: > Content-Type: multipart/form-data; > boundary=137331341721227020401150525545 > User-Agent: BeVocal/2.5a VoiceXML/2.0 BVPlatform/1.8.4.rc9b > Host: localhost:8080 > Proxy-Connection: Keep-Alive > Content-Length: 47633 > Connection: Keep-Alive > 12:20:35.424 > HTTP response headers for recordingsave.jsp: > HTTP/1.0 403 Forbidden > Server: squid/2.5.STABLE4 > Mime-Version: 1.0 > Date: Fri, 29 Apr 2005 19:20:35 GMT > Content-Type: text/html > Content-Length: 1108 > Expires: Fri, 29 Apr 2005 19:20:35 GMT > X-Squid-Error: ERR_ACCESS_DENIED 0 > X-Cache: MISS from bvcapxy002 > X-Cache: MISS from bvcapxy002 > Proxy-Connection: keep-alive > 12:20:35.424 > ERROR error.badfetch.http.403: > http://localhost:8080/voiceapps/recordingsave.jsp: Forbidden > > - > 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]
Permissioning?
Problem: The voice browser in a voice gateway, like BeVocal, executing a subdialog to save a voice message can't reach the jsp, recordingsave.jsp, deployed locally in Tomcat 5.0. The jsp is used to save the message locally. Solutions tried but failed: The following have been added in tomcat-users.xml: The following mime-type for voice application has been added to the web.xml: vxml application/voicexml+xml Log from Voice Browser that may help solve the problem: 12:20:35.393 Executing saveMessage 12:20:35.409 Fetching: recordingsave.jsp 12:20:35.409 HTTP request headers for recordingsave.jsp: Content-Type: multipart/form-data; boundary=137331341721227020401150525545 User-Agent: BeVocal/2.5a VoiceXML/2.0 BVPlatform/1.8.4.rc9b Host: localhost:8080 Proxy-Connection: Keep-Alive Content-Length: 47633 Connection: Keep-Alive 12:20:35.424 HTTP response headers for recordingsave.jsp: HTTP/1.0 403 Forbidden Server: squid/2.5.STABLE4 Mime-Version: 1.0 Date: Fri, 29 Apr 2005 19:20:35 GMT Content-Type: text/html Content-Length: 1108 Expires: Fri, 29 Apr 2005 19:20:35 GMT X-Squid-Error: ERR_ACCESS_DENIED 0 X-Cache: MISS from bvcapxy002 X-Cache: MISS from bvcapxy002 Proxy-Connection: keep-alive 12:20:35.424 ERROR error.badfetch.http.403: http://localhost:8080/voiceapps/recordingsave.jsp: Forbidden - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Tomcat 5.5 and IIS 6.0 connecter problem.
Don't use isapi_redirector2 -- development on it has ceased and it is unsupported. Instead use the latest isapi_redirect. charles doweary wrote: From: "charles doweary" <[EMAIL PROTECTED]> To: tomcat-user@jakarta.apache.org CC: [EMAIL PROTECTED] Subject: Tomcat 5.5 and IIS 6.0 connecter problem. Date: Sat, 30 Apr 2005 11:21:12 -0400 I've configured the following on my Windows Server 2003 operations system: JDK1.5.0_01, Tomcat-5.5.9, isapi_redirector2.dll, and IIS 6.0. The connector is running and logging properly, but I cannot seem to get beyond log error message, "error while adding request headers" in my logFile. Here is the portion of the log file that contains the error: [Sat Apr 30 10:16:50 2005] (debug ) [jk_isapi_plugin.c (252)] HttpFilterProc started [Sat Apr 30 10:16:50 2005] (debug ) [jk_isapi_plugin.c (308)] In HttpFilterProc Virtual Host redirection of 192.168.1.101 : 84 [Sat Apr 30 10:16:50 2005] (debug ) [jk_isapi_plugin.c (340)] HttpFilterProc [/] is a servlet url - should redirect to lb:lb [Sat Apr 30 10:16:50 2005] (error ) [jk_isapi_plugin.c (384)] HttpFilterProc error while adding request headers end of log file * Here is a copy of my worker2.properties file: [logger] level=DEBUG [config:] file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf\workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\isapi_jk2.log [workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues logger=logger.file:0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 [uri:192.168.1.101:84] info=Example virtual host. Make sure it is in /etc/hosts to test it alias=dowearysoftware.com group=lb [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [vm:] info=Parameters used to load a JVM in the server process JVM=C:\Program Files\Java\jre1.5.0_02\bin\client\jvm.dll classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar OPT=-Dtomcat.home=${TOMCAT_HOME} OPT=-Dcatalina.home=${TOMCAT_HOME} OPT=-Xmx128M OPT=-Djava.compiler=NONE disabled=1 [worker.jni:onStartup] info=Command to be executed by the VM on startup. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter #ARG=start # For Tomcat 5 use the 'stard' for startup argument ARG=stard disabled=1 stdout=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\stdout.log stderr=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\stderr.log [worker.jni:onShutdown] info=Command to be executed by the VM on shutdown. This one will stop tomcat. class=org/apache/jk/apr/TomcatStarter ARG=stop disabled=1 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [uri:/examples] info=Example webapp in the default context. context=/examples debug=0 [uri:/examples1/*] info=A second webapp, this time going to the second tomcat only. group=lb debug=0 [uri:/examples/servlet/*] info=Prefix mapping [uri:/examples/*.jsp] info=Extension mapping [uri:/examples/*] info=Map the whole webapp [uri:192.168.1.101:84/*] info=Map the whole webapp debug=10 [uri:dowearysoftware.com/*] info=Map the whole webapp debug=10 [uri:dowearysoftware.com/*.jsp] info=Map the whole webapp debug=10 [uri:dowearysoftware.com/servlets/*.jsp] info=Map the whole webapp debug=10 [uri:dowearysoftwaresystems.com/*] info=Map the whole webapp debug=10 [uri:/dss/*] info=Map the whole webapp debug=10 [uri:/dss/*.jsp] info=Sample Store webapp debug=10 [uri:/examples/servlet/HelloW] info=Example with debug enabled. debug=10 [uri:/dss] info=Doweary Software Sample Store. debug=0 [uri:/servlets-examples] info=Servlet 2.4 Examples. debug=0 [uri:/*.jsp] info=JSP Extension mapping. debug=0 ** end of file ** What can I change in my set-up that will specifically address this type of error? Help in this matter is greatly appreciated. - 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]
Help - Alias or Symlink to external(to the context) images directory?
Hi All, Does anyone know of a way to set an alias to an external directory that contains images to be displayed on a web page? Maybe explaining what I need to do would help: I have a directory, for example: /tmp/images I have a webapp in: /opt/tomcat/webapps/myapp I need to be able to store uploaded images in /tmp/images (which I have working fine) and I need to be able to display those images via the jsp's in myapp. Is it possible to have an alias called myapp/images that points to /tmp/images or can I maybe use a symlink(can tomcat follow the symlink?) or is there some other way I can do this, other than using a servlet to retrieve/return the images? I need to be able to do this so that when the webapp is updated/redeployed, the images will not get deleted. I am running tomcat 5.0.28 on SUN's Java 1.4.2_08 on a variety or Linux/UNIX systems. Thanks in advance, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet/jps: servlet is Ok but jsp NoClassDefFoundError
On 5/3/05, Ferrari Laura <[EMAIL PROTECTED]> wrote: > > > I am working with Tomcat 5.0 > > In a working webapp \ondemand (with only jsp) I added a servlet. > > The servlet work correctly but the jsp is not able to find the > lib/engine.jar (where the its classes are defined). NoClassDefFoundError means that more than one matching class is found in the classpath so your servlet's jar must contain a class that your JSP's jar does or something related to that. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet/jps: servlet is Ok but jsp NoClassDefFoundError
Does your servlet do anything like modify tomcat properties etc?? Seems liek an unusual problem to me - one that I have not encoutered!! -Anoop On 5/3/05, Ferrari Laura <[EMAIL PROTECTED]> wrote: > > > > I am working with Tomcat 5.0 > > In a working webapp \ondemand (with only jsp) I added a servlet. > > The servlet work correctly but the jsp is not able to find the > lib/engine.jar (where the its classes are defined). > > Without Servlet the JSP works. > > With servlet I can not have my index.jsp > > I tried to put the jar related to servlet in common/lib, but is the > same, the servlet works, but not the jsp. > > Any idea? > > Thanks. > > Regards. > > Laura Ferrari > > Gruppo Telecom Italia - Direzione e coordinamento di Telecom Italia S.p.A. > > > CONFIDENTIALITY NOTICE > This message and its attachments are addressed solely to the persons > above and may contain confidential information. If you have received > the message in error, be informed that any use of the content hereof > is prohibited. Please return it immediately to the sender and delete > the message. Should you have any questions, please send an e_mail to > [EMAIL PROTECTED] Thank you > > > -- Thanks and best regards, Anoop
FW: Tomcat 5.5 and IIS 6.0 connecter problem.
From: "charles doweary" <[EMAIL PROTECTED]> To: tomcat-user@jakarta.apache.org CC: [EMAIL PROTECTED] Subject: Tomcat 5.5 and IIS 6.0 connecter problem. Date: Sat, 30 Apr 2005 11:21:12 -0400 I've configured the following on my Windows Server 2003 operations system: JDK1.5.0_01, Tomcat-5.5.9, isapi_redirector2.dll, and IIS 6.0. The connector is running and logging properly, but I cannot seem to get beyond log error message, "error while adding request headers" in my logFile. Here is the portion of the log file that contains the error: [Sat Apr 30 10:16:50 2005] (debug ) [jk_isapi_plugin.c (252)] HttpFilterProc started [Sat Apr 30 10:16:50 2005] (debug ) [jk_isapi_plugin.c (308)] In HttpFilterProc Virtual Host redirection of 192.168.1.101 : 84 [Sat Apr 30 10:16:50 2005] (debug ) [jk_isapi_plugin.c (340)] HttpFilterProc [/] is a servlet url - should redirect to lb:lb [Sat Apr 30 10:16:50 2005] (error ) [jk_isapi_plugin.c (384)] HttpFilterProc error while adding request headers end of log file * Here is a copy of my worker2.properties file: [logger] level=DEBUG [config:] file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf\workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\isapi_jk2.log [workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues logger=logger.file:0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 [uri:192.168.1.101:84] info=Example virtual host. Make sure it is in /etc/hosts to test it alias=dowearysoftware.com group=lb [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess [status:] info=Status worker, displays runtime informations [vm:] info=Parameters used to load a JVM in the server process JVM=C:\Program Files\Java\jre1.5.0_02\bin\client\jvm.dll classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar OPT=-Dtomcat.home=${TOMCAT_HOME} OPT=-Dcatalina.home=${TOMCAT_HOME} OPT=-Xmx128M OPT=-Djava.compiler=NONE disabled=1 [worker.jni:onStartup] info=Command to be executed by the VM on startup. This one will start tomcat. class=org/apache/jk/apr/TomcatStarter #ARG=start # For Tomcat 5 use the 'stard' for startup argument ARG=stard disabled=1 stdout=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\stdout.log stderr=C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\log\stderr.log [worker.jni:onShutdown] info=Command to be executed by the VM on shutdown. This one will stop tomcat. class=org/apache/jk/apr/TomcatStarter ARG=stop disabled=1 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [uri:/examples] info=Example webapp in the default context. context=/examples debug=0 [uri:/examples1/*] info=A second webapp, this time going to the second tomcat only. group=lb debug=0 [uri:/examples/servlet/*] info=Prefix mapping [uri:/examples/*.jsp] info=Extension mapping [uri:/examples/*] info=Map the whole webapp [uri:192.168.1.101:84/*] info=Map the whole webapp debug=10 [uri:dowearysoftware.com/*] info=Map the whole webapp debug=10 [uri:dowearysoftware.com/*.jsp] info=Map the whole webapp debug=10 [uri:dowearysoftware.com/servlets/*.jsp] info=Map the whole webapp debug=10 [uri:dowearysoftwaresystems.com/*] info=Map the whole webapp debug=10 [uri:/dss/*] info=Map the whole webapp debug=10 [uri:/dss/*.jsp] info=Sample Store webapp debug=10 [uri:/examples/servlet/HelloW] info=Example with debug enabled. debug=10 [uri:/dss] info=Doweary Software Sample Store. debug=0 [uri:/servlets-examples] info=Servlet 2.4 Examples. debug=0 [uri:/*.jsp] info=JSP Extension mapping. debug=0 ** end of file ** What can I change in my set-up that will specifically address this type of error? Help in this matter is greatly appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clear session after redeployment
Thank you, this is exactly what I was looking for. Stepan Peter Rossbach wrote: Switch off that Manager save sessions : For single application used inside your conf/Catalina/localhost/apps.xml or server scope inside conf/context.xml host scope inside conf/Catalina/localhost/context.xml.default Peter Stepan Herold schrieb: Redeploying a web application on Tomcat 5.0.x clears its session, this, however, doesn't work on Tomcat 5.5.x. I guess it is a new feature and here goes the question: Is there a way how to tell Tomcat that it should clear session after redeployment? Thanks, Stepan - 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]
Auto-login
Hello, I do not find if there is a way to auto-login in a protected directory by a simple URL like: http://host:8080/myapp/?user=toto&password=titi My issue is that a user who is authentificated under webmin (...) shall access to anoter module (written under tomcat) without been asked again for authentification. A smart solution would be to redirect this user to the auto-login URL. Any idea/solution. Stephane. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Client Authentication
Hi It seems like a silly question. But I am new to SSL and Certificates as well as Tomcat. If my machines IP is 192.168.0.1 then I access tomcat as https://192.168.0.1:8443. Keeping this mind should I give the Common Name as 192.168.0.1 ??? How do I specify the client info in the tomcat-users.xml? This is how my tomcat-users.xml file looks like. Regards & Thanks Mahesh S Kudva -Original Message- From: "lercoli" <[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Tue, 3 May 2005 14:33:46 +0200 Subject: Re: Client Authentication > CA and Tomcat common name should be the same (localhost or better your > DNS). > First and Last Name of client sould the name of a Tomcat user declared > in > tomcat-users.xml. > > Luca Ercoli > > - Original Message - > From: "Mahesh S Kudva" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: Tuesday, May 03, 2005 1:41 PM > Subject: Re: Client Authentication > > > > Hi > > > > What kind of information do i need to put in the fields of First and > Last > > name and Common name. Will any information do or is it required that > I > > need to put in the server address in the client.p12 certificate.. > > > > Regards & Thanks > > > > Mahesh S Kudva > > > > > > -Original Message- > > From: "Mahesh S Kudva" <[EMAIL PROTECTED]> > > To: "Tomcat Users List" > > Date: Mon, 02 May 2005 23:04:50 +0530 > > Subject: Re: Client Authentication > > > > > Hi > > > > > > I tried with client.p12 first, when i failed I went on with > > > client_cert.x509. I placed it in the personal folder ... > > > > > > Regards & Thanks > > > > > > Mahesh S Kudva > > > > > > > > > -Original Message- > > > From: "lercoli" <[EMAIL PROTECTED]> > > > To: "Tomcat Users List" > > > Date: Mon, 2 May 2005 17:31:54 +0200 > > > Subject: Re: Client Authentication > > > > > > > You should import only client.p12 certificate in IE browser and > > > > when IE asks you in which folder you want to put it select > Personal > > > > Folder. > > > > > > > > I hope it helps you. > > > > > > > > Luca Ercoli > > > > > > > > > > > > - Original Message - > > > > From: "Mahesh S Kudva" <[EMAIL PROTECTED]> > > > > To: > > > > Sent: Monday, May 02, 2005 5:08 PM > > > > Subject: Client Authentication > > > > > > > > > > > > > Dear All > > > > > > > > > > I've been able to setup Tomcat 5.0.30 successfully on port > 8443. I > > > > want to > > > > > use client authentication. Hence i've enabled clientAuth=true > in > > > > > server.xml > > > > > > > > > > Running on Mac OS X these were the commands to create a CA and > sign > > > a > > > > > certificate using this CA. > > > > > > > > > > Creating a new CA: > > > > > 1) perl CA.pl -newca > > > > > > > > > > Certificate request using openssl: > > > > > 1) perl CA.pl -newreq > > > > > 2) perl CA.pl -sign > > > > > 3) mv newreq.pem client_req.pem > > > > > 4) mv newcert.pem client_cert.pem > > > > > 5) openssl rsa < client_req.pem > client_key.pem > > > > > 6) openssl pkcs12 -export -in client_cert.pem -inkey > client_key.pem > > > > -out > > > > >client.p12 > > > > > > > > > > For Tomcat using Java keytool to request certificate: > > > > > 1) openssl x509 -in server_cert.pem -out server.x509 > > > > > 2) openssl pkcs12 -export -in server_cert.pem -inkey > server_key.pem > > > > >-out server.p12 > > > > > 3) keytool -genkey -alias meAsClient -storepass changeit > > > > > 4) keytool -certreq -alias measclient -file client.csr > -storepass > > > > changeit > > > > > 5) openssl x509 -req -CA demoCA/cacert.pem -CAkey > > > > >demoCA/private/cakey.pem -extensions v3_ca -in client.csr > > > -inform > > > > DER > > > > >-out client_cert.x509 -CAcreateserial > > > > > 6) keytool -import -alias butterflyCA -keystore /Syst.. > > > > ..urity/cacerts > > > > >-file ../CA/demoCA/cacert.pem > > > > > 7) keytool -import -alias measclient -keystore clientstore > > > > -trustcacerts > > > > >-file client_cert.x509 > > > > > > > > > > > > > > > Following these commands I dont get any errors. I then import > the > > > > > cacert.pem, the ROOT CA certificate and the client.p12 and > > > > > client_cert.x509 to the browser I.E 6.0. But still there is a > popup > > > > > requesting for the clients identity and it asks me to select a > > > > > certificate and no certificates are displayed. > > > > > > > > > > How can I go about this? > > > > > > > > > > > > > > > All suggestion and ideas are welcome. > > > > > > > > > > > > > > > > > > > > Regards & Thanks > > > > > > > > > > Mahesh S Kudva > > > > > > > > > > > > > > > > > > > > --- > > > > > Robosoft Technologies - Partners in Product Development > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > >
Re: Clear session after redeployment
Switch off that Manager save sessions : For single application used inside your conf/Catalina/localhost/apps.xml or server scope inside conf/context.xml host scope inside conf/Catalina/localhost/context.xml.default Peter Stepan Herold schrieb: Redeploying a web application on Tomcat 5.0.x clears its session, this, however, doesn't work on Tomcat 5.5.x. I guess it is a new feature and here goes the question: Is there a way how to tell Tomcat that it should clear session after redeployment? Thanks, Stepan - 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]
Deply/undeploy applications from a Servlet
I've managed to figure out how to list all installed applications by callind findChildren() on the current Host-object. However, now I wish to be able to deploy/undeply applications through this servlet. Basically, I need a "reload" command for a set of applications. First, all application with a certain prefix are undeployed. The content of a specific directory is then scanned and all subdirectories are deployed. The reason for this is that I wish have a system that can be installed several times with different versions. Each version has its own user-interface that is launched through Java Web Start. Whenever I install a new version of the system, I simply call "/reload" on my "manager" application which then deploys all available applications. So my questions is, how do I create, deploy and undeploy a web-application from a Servlet? regards, Erik
Re: Tomcat j2sdk and image
Hi, I find my problem. If I put these lines in my startup.sh of Tomcat DISPLAY=localhost:0.0 export DISPLAY The generation of GIF image works. If I put these lines in my startup.sh of Tomcat DISPLAY=AnOtherServer:0.0 export DISPLAY where AnOtherServer is a different server on Sun Solaris, where I excecute this command "/usr/openwin/bin/xhost +" The generation of GIF image works but it take a long time. If I add -Djava.awt.headless=true to JVM option, like that CATALINA_OPTS="-Xms128m -Xmx512m -Xss2m -Djava.awt.headless=true" export CATALINA_OPTS the generation of GIF image doesn't work. But in production, my server doesn't have a console, so I have to use "export DISPLAY" or there is an other methode to solve my problem or to generate image ? Thanks for your help. [EMAIL PROTECTED] a écrit : Yes I have a graphics environnement. I put these command lines in startup.sh DISPLAY=10.10.10.1:0.0 export DISPLAY The generation of GIF image works but it make a long time on Solaris 8. Trond G. Ziarkowski a écrit : Hi, do you have a graphics environment when running under Solaris? If not then that would be my guess to a reason why it's not working, since you have a graphics environment when running under W2K. Try adding -Djava.awt.headless=true to your commandline when starting tomcat. If this doesn't do the trick, you need the graphics environment to generate your images. Trond [EMAIL PROTECTED] wrote: Hi, The program java use : java.awt.Frame; java.awt.Graphics; java.awt.Image; and Acme.JPM.encoders.GifEncoders who encode image in Gif. N.B. : the application works fine on W2K with Tomcat-4.0.4 using jdk-1.3.1, and Tomcat-4.1.30 and Tomcat-5.0.28 with jdk-1.4.2 Dale, Matt a écrit : I'd be surprised if anyone could with the scant information you have provided. You haven't even mentioned the image library that you are using. I would suggest that you get a profiler or debugger in order to work out what your code is doing at the time that it is generating the image and which methods are taking all the time. Ta Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 May 2005 16:33 To: tomcat-user@jakarta.apache.org Subject: Tomcat j2sdk and image Hi, I have a java application who generate image. On Sun Solaris 8, It works fine with Tomcat-4.0.4 and jdk-1.3.1 It was the same with Tomcat-4.1.18 and jdk-1.4.1 But when I use Tomcat-4.1.30 with jdk-1.4.2 or Tomcat-5.0.28 with jdk-1.4.1 or jdk-1.4.2, the image make a long time to be generating. What is the problem ? Can somebody help me ? AL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clear session after redeployment
Redeploying a web application on Tomcat 5.0.x clears its session, this, however, doesn't work on Tomcat 5.5.x. I guess it is a new feature and here goes the question: Is there a way how to tell Tomcat that it should clear session after redeployment? Thanks, Stepan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Client Authentication
CA and Tomcat common name should be the same (localhost or better your DNS). First and Last Name of client sould the name of a Tomcat user declared in tomcat-users.xml. Luca Ercoli - Original Message - From: "Mahesh S Kudva" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, May 03, 2005 1:41 PM Subject: Re: Client Authentication > Hi > > What kind of information do i need to put in the fields of First and Last > name and Common name. Will any information do or is it required that I > need to put in the server address in the client.p12 certificate.. > > Regards & Thanks > > Mahesh S Kudva > > > -Original Message- > From: "Mahesh S Kudva" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Date: Mon, 02 May 2005 23:04:50 +0530 > Subject: Re: Client Authentication > > > Hi > > > > I tried with client.p12 first, when i failed I went on with > > client_cert.x509. I placed it in the personal folder ... > > > > Regards & Thanks > > > > Mahesh S Kudva > > > > > > -Original Message- > > From: "lercoli" <[EMAIL PROTECTED]> > > To: "Tomcat Users List" > > Date: Mon, 2 May 2005 17:31:54 +0200 > > Subject: Re: Client Authentication > > > > > You should import only client.p12 certificate in IE browser and > > > when IE asks you in which folder you want to put it select Personal > > > Folder. > > > > > > I hope it helps you. > > > > > > Luca Ercoli > > > > > > > > > - Original Message - > > > From: "Mahesh S Kudva" <[EMAIL PROTECTED]> > > > To: > > > Sent: Monday, May 02, 2005 5:08 PM > > > Subject: Client Authentication > > > > > > > > > > Dear All > > > > > > > > I've been able to setup Tomcat 5.0.30 successfully on port 8443. I > > > want to > > > > use client authentication. Hence i've enabled clientAuth=true in > > > > server.xml > > > > > > > > Running on Mac OS X these were the commands to create a CA and sign > > a > > > > certificate using this CA. > > > > > > > > Creating a new CA: > > > > 1) perl CA.pl -newca > > > > > > > > Certificate request using openssl: > > > > 1) perl CA.pl -newreq > > > > 2) perl CA.pl -sign > > > > 3) mv newreq.pem client_req.pem > > > > 4) mv newcert.pem client_cert.pem > > > > 5) openssl rsa < client_req.pem > client_key.pem > > > > 6) openssl pkcs12 -export -in client_cert.pem -inkey client_key.pem > > > -out > > > >client.p12 > > > > > > > > For Tomcat using Java keytool to request certificate: > > > > 1) openssl x509 -in server_cert.pem -out server.x509 > > > > 2) openssl pkcs12 -export -in server_cert.pem -inkey server_key.pem > > > >-out server.p12 > > > > 3) keytool -genkey -alias meAsClient -storepass changeit > > > > 4) keytool -certreq -alias measclient -file client.csr -storepass > > > changeit > > > > 5) openssl x509 -req -CA demoCA/cacert.pem -CAkey > > > >demoCA/private/cakey.pem -extensions v3_ca -in client.csr > > -inform > > > DER > > > >-out client_cert.x509 -CAcreateserial > > > > 6) keytool -import -alias butterflyCA -keystore /Syst.. > > > ..urity/cacerts > > > >-file ../CA/demoCA/cacert.pem > > > > 7) keytool -import -alias measclient -keystore clientstore > > > -trustcacerts > > > >-file client_cert.x509 > > > > > > > > > > > > Following these commands I dont get any errors. I then import the > > > > cacert.pem, the ROOT CA certificate and the client.p12 and > > > > client_cert.x509 to the browser I.E 6.0. But still there is a popup > > > > requesting for the clients identity and it asks me to select a > > > > certificate and no certificates are displayed. > > > > > > > > How can I go about this? > > > > > > > > > > > > All suggestion and ideas are welcome. > > > > > > > > > > > > > > > > Regards & Thanks > > > > > > > > Mahesh S Kudva > > > > > > > > > > > > > > > > --- > > > > Robosoft Technologies - Partners in Product Development > > > > > > > > > > > > > > > > > > - > > > > 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] > > > > --- > Robosoft Technologies - Partners in Product Development > > > > - > 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: Client Authentication
Hi What kind of information do i need to put in the fields of First and Last name and Common name. Will any information do or is it required that I need to put in the server address in the client.p12 certificate.. Regards & Thanks Mahesh S Kudva -Original Message- From: "Mahesh S Kudva" <[EMAIL PROTECTED]> To: "Tomcat Users List" Date: Mon, 02 May 2005 23:04:50 +0530 Subject: Re: Client Authentication > Hi > > I tried with client.p12 first, when i failed I went on with > client_cert.x509. I placed it in the personal folder ... > > Regards & Thanks > > Mahesh S Kudva > > > -Original Message- > From: "lercoli" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Date: Mon, 2 May 2005 17:31:54 +0200 > Subject: Re: Client Authentication > > > You should import only client.p12 certificate in IE browser and > > when IE asks you in which folder you want to put it select Personal > > Folder. > > > > I hope it helps you. > > > > Luca Ercoli > > > > > > - Original Message - > > From: "Mahesh S Kudva" <[EMAIL PROTECTED]> > > To: > > Sent: Monday, May 02, 2005 5:08 PM > > Subject: Client Authentication > > > > > > > Dear All > > > > > > I've been able to setup Tomcat 5.0.30 successfully on port 8443. I > > want to > > > use client authentication. Hence i've enabled clientAuth=true in > > > server.xml > > > > > > Running on Mac OS X these were the commands to create a CA and sign > a > > > certificate using this CA. > > > > > > Creating a new CA: > > > 1) perl CA.pl -newca > > > > > > Certificate request using openssl: > > > 1) perl CA.pl -newreq > > > 2) perl CA.pl -sign > > > 3) mv newreq.pem client_req.pem > > > 4) mv newcert.pem client_cert.pem > > > 5) openssl rsa < client_req.pem > client_key.pem > > > 6) openssl pkcs12 -export -in client_cert.pem -inkey client_key.pem > > -out > > >client.p12 > > > > > > For Tomcat using Java keytool to request certificate: > > > 1) openssl x509 -in server_cert.pem -out server.x509 > > > 2) openssl pkcs12 -export -in server_cert.pem -inkey server_key.pem > > >-out server.p12 > > > 3) keytool -genkey -alias meAsClient -storepass changeit > > > 4) keytool -certreq -alias measclient -file client.csr -storepass > > changeit > > > 5) openssl x509 -req -CA demoCA/cacert.pem -CAkey > > >demoCA/private/cakey.pem -extensions v3_ca -in client.csr > -inform > > DER > > >-out client_cert.x509 -CAcreateserial > > > 6) keytool -import -alias butterflyCA -keystore /Syst.. > > ..urity/cacerts > > >-file ../CA/demoCA/cacert.pem > > > 7) keytool -import -alias measclient -keystore clientstore > > -trustcacerts > > >-file client_cert.x509 > > > > > > > > > Following these commands I dont get any errors. I then import the > > > cacert.pem, the ROOT CA certificate and the client.p12 and > > > client_cert.x509 to the browser I.E 6.0. But still there is a popup > > > requesting for the clients identity and it asks me to select a > > > certificate and no certificates are displayed. > > > > > > How can I go about this? > > > > > > > > > All suggestion and ideas are welcome. > > > > > > > > > > > > Regards & Thanks > > > > > > Mahesh S Kudva > > > > > > > > > > > > --- > > > Robosoft Technologies - Partners in Product Development > > > > > > > > > > > > > - > > > 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] --- Robosoft Technologies - Partners in Product Development - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Digester / vector usage
Hi, I don't understand exactly what is your question but if it is how to get a magazine, you have to : - parse your xml with digester.parse(); - this method returns a Catalog object for example "myCatalog" - then call myCatalog.getMagazines() and find you magazine "mag1". For example for (Enumeration e = myCatalog.elements() ; e.hasMoreElements() ;) { ... e.nextElement(); } -Message d'origine- De : Anto Paul [mailto:[EMAIL PROTECTED] Envoyé : mardi 3 mai 2005 10:06 À : Tomcat Users List Cc : Henrique, Manuel Objet : Re: Digester / vector usage On 5/3/05, Henrique, Manuel <[EMAIL PROTECTED]> wrote: > Nobody can help me? Nobody knows? Nobody uses XML files? Everybody knows how > to do a digester but nobody knows how to use it? > > I hope you can help me. > > Regards, > > Manuel > > -Original Message- > From: Henrique, Manuel > To: 'tomcat-user@jakarta.apache.org' > Sent: 02/05/2005 17:12 > Subject: Digester / vector usage > > Hello all, > > It made now 2 weeks that I have a little issue with the XML parsing. I > use > examples founds in the net. My question is very simple, if I have for > example an XML file like that: > > > > > Author 1 > Title 1 > > > > Author 2 > His One Book > > > > Mag Title 1 > > > Some Headline > > > > Another Headline > > > > > Author 2 > His Other Book > > > > Mag Title 2 > > > Second Headline > > > > > > I have the catalog.class: > package com.erdv.logicacmg.control; > > import java.util.Vector; > > public class Catalog { >private Vector books; >private Vector magazines; > >//constructeur de catalog >public Catalog() { > books = new Vector(); > magazines = new Vector(); >} > //gestion des livres >public void addBook(Book newBook) { > books.addElement(newBook); >} >public void setBooks(Vector books){ >this.books = books; >} > >public Vector getBooks(){ >return books; >} > >//gestion des magazines >public void addMagazine(Magazine newMagazine) { > magazines.addElement(newMagazine); >} >public void setMagazines(Vector magazines){ >this.magazines = magazines; >} > >public Vector getMagazines(){ >return magazines; >} > > } > > book class: > package com.erdv.logicacmg.control; > > public class Book { >private String author; >private String title; > >public Book() {} > >public void setAuthor(String newAuthor) {author = newAuthor;} >public void setTitle(String newTitle) {title = newTitle;} > >public String getAuthor(){ >return author; >} > >public string getTitle(){ >return title; >} > > } > the magazine class: > package com.erdv.logicacmg.control; > > import java.util.Vector; > > public class Magazine { >private String name; >private Vector articles; > >public Magazine() { > articles = new Vector(); >} > >public void setName(String newName) {name = newName;} > >public String getName(){ >return name; >} > >public void addArticle(Article a) { > articles.addElement(a); >} > >public void setArticles(Vector articles){ >this.articles = articles; >} > >public Vector getArticles(){ >return articles; >} > > } > > and so on... > > I have also a digester class that create the rules and parse the file as > I > want. All is ok into the log file. It indicates no issue. > > Now what I what is to get my values from my java code. I dont know how > to > do. I search help with the vector usage but nothing helps me to get my > values. > > For example: in a java code how can I get the Headline value for the > magazine called "Mag 1" for the article page "5". > > I tried in my java code to create a c as new catalog and after? How can > I > do. In all examples they uses Vectors but nobody explains how to do > after. > > What it seems is that everybody talks about parsing, about digester but > nobody gives how to get the wanted value from the XML. Each time I ask > to > someone always the same answers "digest.parse()", "now catch your object > and > it's finished". Yes, it's exactly what I want but how can I do?? > > Could somebody help me please? > > Regards, > > Manuel > > PS: I know I am a newbee in Tomcat/Java so no need to mock at me. > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be > copied, disclosed to, retained or used by, any other party. If you are > not an intended recipient then please promptly delete this e-mail and > any attachment and all copies and inform the sender. Thank yo
servlet/jps: servlet is Ok but jsp NoClassDefFoundError
I am working with Tomcat 5.0 In a working webapp \ondemand (with only jsp) I added a servlet. The servlet work correctly but the jsp is not able to find the lib/engine.jar (where the its classes are defined). Without Servlet the JSP works. With servlet I can not have my index.jsp I tried to put the jar related to servlet in common/lib, but is the same, the servlet works, but not the jsp. Any idea? Thanks. Regards. Laura Ferrari Gruppo Telecom Italia - Direzione e coordinamento di Telecom Italia S.p.A. CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please send an e_mail to [EMAIL PROTECTED] Thank you
SSL, Form Authentication 408 error
If I set the src of an IFRAME to my web application, which uses Form Authentication and SSL, the server consistently throws back a 408 error in IE when attempting to log in. The same scenario consistently works with Firefox. I suspect there are timing issues with IE, IFRAMEs and Form Authentication causing the 408. I have searched the archives without success and a more general search seems to indicate that there are issues with IFRAMEs and SSL in IE but no specifics. My question is: Does anyone know of a way to configure Tomcat (5.0.28) to be more resilient/permissive i.e. to increase the timeout for Form Authentication before a 408 error is thrown? Thanks in advance Andy Chapman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Digester / vector usage
On 5/3/05, Henrique, Manuel <[EMAIL PROTECTED]> wrote: > Nobody can help me? Nobody knows? Nobody uses XML files? Everybody knows how > to do a digester but nobody knows how to use it? > > I hope you can help me. > > Regards, > > Manuel > > -Original Message- > From: Henrique, Manuel > To: 'tomcat-user@jakarta.apache.org' > Sent: 02/05/2005 17:12 > Subject: Digester / vector usage > > Hello all, > > It made now 2 weeks that I have a little issue with the XML parsing. I > use > examples founds in the net. My question is very simple, if I have for > example an XML file like that: > > > > > Author 1 > Title 1 > > > > Author 2 > His One Book > > > > Mag Title 1 > > > Some Headline > > > > Another Headline > > > > > Author 2 > His Other Book > > > > Mag Title 2 > > > Second Headline > > > > > > I have the catalog.class: > package com.erdv.logicacmg.control; > > import java.util.Vector; > > public class Catalog { >private Vector books; >private Vector magazines; > >//constructeur de catalog >public Catalog() { > books = new Vector(); > magazines = new Vector(); >} > //gestion des livres >public void addBook(Book newBook) { > books.addElement(newBook); >} >public void setBooks(Vector books){ >this.books = books; >} > >public Vector getBooks(){ >return books; >} > >//gestion des magazines >public void addMagazine(Magazine newMagazine) { > magazines.addElement(newMagazine); >} >public void setMagazines(Vector magazines){ >this.magazines = magazines; >} > >public Vector getMagazines(){ >return magazines; >} > > } > > book class: > package com.erdv.logicacmg.control; > > public class Book { >private String author; >private String title; > >public Book() {} > >public void setAuthor(String newAuthor) {author = newAuthor;} >public void setTitle(String newTitle) {title = newTitle;} > >public String getAuthor(){ >return author; >} > >public string getTitle(){ >return title; >} > > } > the magazine class: > package com.erdv.logicacmg.control; > > import java.util.Vector; > > public class Magazine { >private String name; >private Vector articles; > >public Magazine() { > articles = new Vector(); >} > >public void setName(String newName) {name = newName;} > >public String getName(){ >return name; >} > >public void addArticle(Article a) { > articles.addElement(a); >} > >public void setArticles(Vector articles){ >this.articles = articles; >} > >public Vector getArticles(){ >return articles; >} > > } > > and so on... > > I have also a digester class that create the rules and parse the file as > I > want. All is ok into the log file. It indicates no issue. > > Now what I what is to get my values from my java code. I dont know how > to > do. I search help with the vector usage but nothing helps me to get my > values. > > For example: in a java code how can I get the Headline value for the > magazine called "Mag 1" for the article page "5". > > I tried in my java code to create a c as new catalog and after? How can > I > do. In all examples they uses Vectors but nobody explains how to do > after. > > What it seems is that everybody talks about parsing, about digester but > nobody gives how to get the wanted value from the XML. Each time I ask > to > someone always the same answers "digest.parse()", "now catch your object > and > it's finished". Yes, it's exactly what I want but how can I do?? > > Could somebody help me please? > > Regards, > > Manuel > > PS: I know I am a newbee in Tomcat/Java so no need to mock at me. > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be > copied, disclosed to, retained or used by, any other party. If you are > not an intended recipient then please promptly delete this e-mail and > any attachment and all copies and inform the sender. Thank you. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be copied, > disclosed to, retained or used by, any other party. If you are not an > intended recipient then please promptly delete this e-mail and any attachment > and all copies and inform the sen
RE: Digester / vector usage
Nobody can help me? Nobody knows? Nobody uses XML files? Everybody knows how to do a digester but nobody knows how to use it? I hope you can help me. Regards, Manuel -Original Message- From: Henrique, Manuel To: 'tomcat-user@jakarta.apache.org' Sent: 02/05/2005 17:12 Subject: Digester / vector usage Hello all, It made now 2 weeks that I have a little issue with the XML parsing. I use examples founds in the net. My question is very simple, if I have for example an XML file like that: Author 1 Title 1 Author 2 His One Book Mag Title 1 Some Headline Another Headline Author 2 His Other Book Mag Title 2 Second Headline I have the catalog.class: package com.erdv.logicacmg.control; import java.util.Vector; public class Catalog { private Vector books; private Vector magazines; //constructeur de catalog public Catalog() { books = new Vector(); magazines = new Vector(); } //gestion des livres public void addBook(Book newBook) { books.addElement(newBook); } public void setBooks(Vector books){ this.books = books; } public Vector getBooks(){ return books; } //gestion des magazines public void addMagazine(Magazine newMagazine) { magazines.addElement(newMagazine); } public void setMagazines(Vector magazines){ this.magazines = magazines; } public Vector getMagazines(){ return magazines; } } book class: package com.erdv.logicacmg.control; public class Book { private String author; private String title; public Book() {} public void setAuthor(String newAuthor) {author = newAuthor;} public void setTitle(String newTitle) {title = newTitle;} public String getAuthor(){ return author; } public string getTitle(){ return title; } } the magazine class: package com.erdv.logicacmg.control; import java.util.Vector; public class Magazine { private String name; private Vector articles; public Magazine() { articles = new Vector(); } public void setName(String newName) {name = newName;} public String getName(){ return name; } public void addArticle(Article a) { articles.addElement(a); } public void setArticles(Vector articles){ this.articles = articles; } public Vector getArticles(){ return articles; } } and so on... I have also a digester class that create the rules and parse the file as I want. All is ok into the log file. It indicates no issue. Now what I what is to get my values from my java code. I dont know how to do. I search help with the vector usage but nothing helps me to get my values. For example: in a java code how can I get the Headline value for the magazine called "Mag 1" for the article page "5". I tried in my java code to create a c as new catalog and after? How can I do. In all examples they uses Vectors but nobody explains how to do after. What it seems is that everybody talks about parsing, about digester but nobody gives how to get the wanted value from the XML. Each time I ask to someone always the same answers "digest.parse()", "now catch your object and it's finished". Yes, it's exactly what I want but how can I do?? Could somebody help me please? Regards, Manuel PS: I know I am a newbee in Tomcat/Java so no need to mock at me. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK load balancer question
Hey, yes, you can configure the new status worker (>= jk 1.2.10) and used the new ant JkStatusUpdateTask (Tomcat 5.5.9) for active configuration. But the disabled flag don't stopp the complete traffic. Only stop that no new session create requests to the disabled worker. But I have implement a stopped flag at jk 1.2.11 that really stopp the complete traffic (Ant Task also avialable at 5.5.10 cvs head). This mode is very helpful at the Cluster szenario. I hope you use the Tomcat 5.5.9 with my cluster patches! http://issues.apache.org/bugzilla/show_bug.cgi?id=34389 Peter Hirode, Kartheek V. schrieb: Hello all We are planning on using a cluster of Tomcat instances behind an Apache server, load balanced with the JK connector. Everything is pretty standard except: (a) we'd like to turn OFF and ON the traffic coming into the Tomcat instances based on certain conditions. Plus we'd like to turn ON and OFF *programmatically*, i.e. the Tomcat instance notifies the Apache (JK) to START and STOP sending traffic as conditions change (b) To reiterate again, the key thing is that we'd like to notify *programmatically* from the Tomcat to the Apache JK. We've looked at the JK connector docs http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html The attribute called "disabled" seems to do exactly that, but it is set in the workers.properties file and is read during startup of the Apache. Is there a way to modify this attribute during runtime, with an API-like access? Thank you and best regards -- Kartheek Hirode HP.com Hub Services Tel: 208.396.9031 Fax: 208.396.7770 http://hpcom.corp.hp.com/hpps/programs/hub/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]