RE: Deploying jsps
Doesn't any body have a detailed procedure to deploy compiled jsps with Tomcat4.0 ? Abhay -Original Message- From: Abhay Hiwarkar [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:33 To: 'Tomcat Users List' Subject: Deploying jsps Hi, I am week in deploying war with Tomcat4 on Windows. The war contains only the class files generated from JSPs. I am not able to access any JSP through http://localhost:8080/myProj/client.jsp The war file contains the web.xml with mapping of all servlets to jsps I will appriciate your help. Thanks, Abhay -Original Message- From: Daniel Watrous [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:25 To: Tomcat Users List Subject: Re: Want to know better way of deploying Manisha, I have also had this occur when using Tomcat on Windows, but never with Tomcat running on Linux. Maybe this is a bug related to Tomcat on Windows... Are you using Windows? Daniel - Original Message - From: Manisha Sathe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 10:21 PM Subject: Want to know better way of deploying I am using ant to create war file. Then i undeploy previous version and try to deploy new version. But when i try to do this it says FAIL - War file strutstest.war already exists on server Inside /webapp - previous uploaded war file is still present. I can not delete just like that as it says sharing violation. So i need to stop Tomcat, delete /webapp/{my prev war file}. Then start the Tomcat again and deploy the new file. Is there any other soln ? so that w/o restarting my tomcat can i just deploy new version ? regards Manisha __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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: apache jk2.conf and tomcat question heeelp
B Wiley wrote: Hello, Is there a way to put an absolute path in the jk2.conf location tag that would look like /var/www/html/*.jsp I'm trying to set things up so If i have a .jsp in my website root it forwards the request to tomcat without having the .jsp physically sitting inside the tomcat root. How will Tomcat know where that file is? He has not clue about your website root. Is this possible ??? Not without Tomcat itself capable of serving that file. The Tomcat is not PHP where you can fed the physical file to it's engine. Also, do not use JK2. It's unsupported. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Want to know better way of deploying
My original settings r like this only but seems not working, manisha Goel, Manish Kumar [EMAIL PROTECTED] wrote:Manisha, you you neeed to change some setting in your server.xml in the Host element, make these two attribute true (unpackWARs autoDeploy) like this unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false cheers Manish -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:50 To: Tomcat Users List Subject: RE: Want to know better way of deploying Thanks all. I am on Windows but Tomcat version is 5.0. So meaning no other solution ? regards Manisha Abhay Hiwarkar wrote: Manisha, Earlier versions of Tomcat lock the file and you can not modify the same while Tomcat is running. Which ver are you running? Abhay -Original Message- From: Goel, Manish Kumar [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:29 To: Tomcat Users List Subject: RE: Want to know better way of deploying Daniel, On Linux running application are deleted it's not bug I guess. Manish -Original Message- From: Daniel Watrous [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:55 AM To: Tomcat Users List Subject: Re: Want to know better way of deploying Manisha, I have also had this occur when using Tomcat on Windows, but never with Tomcat running on Linux. Maybe this is a bug related to Tomcat on Windows... Are you using Windows? Daniel - Original Message - From: Manisha Sathe To: Sent: Wednesday, December 22, 2004 10:21 PM Subject: Want to know better way of deploying I am using ant to create war file. Then i undeploy previous version and try to deploy new version. But when i try to do this it says FAIL - War file strutstest.war already exists on server Inside /webapp - previous uploaded war file is still present. I can not delete just like that as it says sharing violation. So i need to stop Tomcat, delete /webapp/{my prev war file}. Then start the Tomcat again and deploy the new file. Is there any other soln ? so that w/o restarting my tomcat can i just deploy new version ? regards Manisha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Send holiday email and support a worthy cause. Do good. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it 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 immediately notify the [EMAIL PROTECTED] and destroy the original message. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Jazz up your holiday email with celebrity designs. Learn more.
RE: Want to know better way of deploying
Now what i am thinking is the whole process i will put inside batch file. I do not know whether doable or not like 1)shutdown tomcat 2)Delete previuos war file 3)Delete /webapp/{my project} directory .. But 'rd' cmd won't work as there r files inside and I do not know why 'del tree' is not working. btw i do not hv administrative access. regards Manisha Manisha Sathe [EMAIL PROTECTED] wrote: My original settings r like this only but seems not working, manisha Goel, Manish Kumar wrote:Manisha, you you neeed to change some setting in your server.xml in the Host element, make these two attribute true (unpackWARs autoDeploy) like this unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false cheers Manish -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:50 To: Tomcat Users List Subject: RE: Want to know better way of deploying Thanks all. I am on Windows but Tomcat version is 5.0. So meaning no other solution ? regards Manisha Abhay Hiwarkar wrote: Manisha, Earlier versions of Tomcat lock the file and you can not modify the same while Tomcat is running. Which ver are you running? Abhay -Original Message- From: Goel, Manish Kumar [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:29 To: Tomcat Users List Subject: RE: Want to know better way of deploying Daniel, On Linux running application are deleted it's not bug I guess. Manish -Original Message- From: Daniel Watrous [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:55 AM To: Tomcat Users List Subject: Re: Want to know better way of deploying Manisha, I have also had this occur when using Tomcat on Windows, but never with Tomcat running on Linux. Maybe this is a bug related to Tomcat on Windows... Are you using Windows? Daniel - Original Message - From: Manisha Sathe To: Sent: Wednesday, December 22, 2004 10:21 PM Subject: Want to know better way of deploying I am using ant to create war file. Then i undeploy previous version and try to deploy new version. But when i try to do this it says FAIL - War file strutstest.war already exists on server Inside /webapp - previous uploaded war file is still present. I can not delete just like that as it says sharing violation. So i need to stop Tomcat, delete /webapp/{my prev war file}. Then start the Tomcat again and deploy the new file. Is there any other soln ? so that w/o restarting my tomcat can i just deploy new version ? regards Manisha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Send holiday email and support a worthy cause. Do good. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it 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 immediately notify the [EMAIL PROTECTED] and destroy the original message. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Jazz up your holiday email with celebrity designs. Learn more. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
AW: performance issue with JK und IIS6
Hi, In our test environment we tested again the registry tweak described below. This time we followed the advice to reboot the system rather than just restart the service (we couldn't do the reboot with our first test in our production environment). And surprisingly, method 2 (EnableCopySend) did the trick. We found references to the link below in other forums which deal with ISAPI connectors (JRun, PHP). Our server runs a Windows 2003 Standard Server with all Hotfixes from Windows Update but not the SP1 release candidate which is already available for testing. Best regards Michael -Ursprüngliche Nachricht- Von: Michael Südkamp [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 21. Dezember 2004 12:20 An: [EMAIL PROTECTED] Betreff: performance issue with JK und IIS6 Hi, I found this link which confirms a IIS6 problem for ISAPI filters that use the WriteClient API. http://support.microsoft.com/default.aspx?scid=kb;EN-US;840875 Does this apply to the JK connector? The workarounds described there show no difference for us, however. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compile and Deploy JSPs - Tomcat 4.0
Usually Tomcat JSPC compiler compiles classes to package org.apache.jsp. You can override it by specifiying packagename as an argument to the compile command/Ant task. Perhaps something is wrong with the compile arguments you used or the classfiles are not packed into the war file. rgds Antony Paul On Thu, 23 Dec 2004 07:47:14 +0200, Abhay Hiwarkar [EMAIL PROTECTED] wrote: Harry, I decompiled all the class files and checked for CLASS NAME. They are same as provided in web.xml. servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet Still not able to access any jsp through http://localhost:8080/myProj/client.jsp Any help will be appriciated... Abhay Hiwarkar -Original Message- From: Harry Mantheakis [mailto:[EMAIL PROTECTED] Sent: Wed, 22 Dec 2004 18:32 To: Tomcat Users List Subject: Re: Compile and Deploy JSPs - Tomcat 4.0 I might be picking up fag ends here, but I noticed that in this block: servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet The 'servlet-class' element would normally take the fully qualified name of the class - IOW the complete package name. Also, classes, by Java conventions, should have capitalised names - so perhaps your entry there is wrong. Good luck. Harry Mantheakis Hi, Thanks for your help. Also, I looked into archives and got more details. Still, I am not able to load any jsp which is comipled to class and deployed in a war file containing web.xml. On the other hand, I am able to get an html (also packed in the war file) loaded without any error. conf/server.xml has entry as follows - Context path=/myProj docBase=C:/tomcat4.0/myProj.war debug=0 privileged=true conf/web.xml has enry as follows - servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet ... servlet-mapping servlet-nameclient/servlet-name url-pattern/client.jsp/url-pattern /servlet-mapping Upon issuing URL as : http://localhost:8080/myProj/client.jsp, following error is thrown : HTTP Status 500 : Internal Server Error ... javax.servlet.ServletException: Wrapper cannot find servlet class client or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:87 3) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655) Could any one help. Thanks in advance, Abhay -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Tue, 21 Dec 2004 09:34 To: Tomcat Users List Subject: Re: Compile and Deploy JSPs - Tomcat 4.0 The proper way to do this is use the JSPC task to compile JSP files to class files and then create url mappings in the web.xml for the JSPs to class files. The class files are to be deployed in the WEB-INF/classes directory. The Anto JSPC task(which is same supplied with Tomcat). I think this topic is discussed previously and you can find details in the archives. rgds Antony Paul On Tue, 21 Dec 2004 09:21:00 +0200, Abhay Hiwarkar [EMAIL PROTECTED] wrote: Hi, I have around 120 JSP files and want to avoid deploying them with the source-code. Using JSPC utility, I am able to compile them to .java files. If required, I can get the .class files from: /tomcat4.0/work/myApp. Can anybody help me deploying only the .class files with Tomcat4.0. Many Thanks in advance, Regards, Abhay - 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: Gurus! JCE and classloader question
Which JCE provider you are using ? rgds Antony Paul On Tue, 21 Dec 2004 20:06:40 +0100, Lionel Pasquier [EMAIL PROTECTED] wrote: Hello again! Any guru around to solve my problem please? :-) Lionel Pasquier wrote: Hello, I have a trouble with using a JCE and multiple contexts. From what I could have read around here this is probably linked to a classloader problem. Could you guys help? Basicaly, I generate a RSA Keypair, then create a certificate and want to self sign it. Finally i need to store the private key to create a p12. Here is the code: I am using the IAIK JCE. KeyPair keyPair; IAIK IAIKprovider = new IAIK(); Security.insertProviderAt(IAIKprovider, 2); KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RSA, IAIKprovider.getName()); keyPairGenerator.initialize(keySize); keyPair = keyPairGenerator.generateKeyPair(); X509Certificate cert; [...] cert.sign( AlgorithmID.sha1WithRSAEncryption ,keyPair.getPrivate(), IAIKprovider.getName()); if(!RSAPrivateKey.class.isAssignableFrom(keyPair.getPrivate().getClass())){ error(Generated RSA private key is not of type RSA!); } KeyBag keybag = new KeyBag((RSAPrivateKey) keyPair.getPrivate(), certLabel, certLabel.getBytes()); The problem is that if I have more than one tomcat context using the same pice of code, the 2nd context to use it triggers the if (that is, without it I get a ClassCastException). Meaning that the generated private key is not compatible with RSAPrivateKey, while I asked for a RSA key. I also have the same problem with the other way around: CertificateFactory certFactory = CertificateFactory.getInstance(X.509, IAIK); Collection certCollection = certFactory.generateCertificates(new ByteArrayInputStream( certChainBlob.getDatabinary() )); cert = (X509Certificate)certChain.get(0); //where X509Certificate being iaik.x509.X509Certificate) gets a ClassCastException if being the second context to call this code. Oh, one more important thing: I add the security provider dynamicaly with a: Security.insertProviderAt(new IAIK(), 2); Could someone help me on this? Thank you, Lionel - 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: Gurus! JCE and classloader question
Where you put the provider jar file ?. WEB-INF/lib ?. Try putting it in shared/lib or common/lib if the same jar file is used by multiple applications. rgds Antony Paul On Thu, 23 Dec 2004 15:01:04 +0530, Antony Paul [EMAIL PROTECTED] wrote: Which JCE provider you are using ? rgds Antony Paul On Tue, 21 Dec 2004 20:06:40 +0100, Lionel Pasquier [EMAIL PROTECTED] wrote: Hello again! Any guru around to solve my problem please? :-) Lionel Pasquier wrote: Hello, I have a trouble with using a JCE and multiple contexts. From what I could have read around here this is probably linked to a classloader problem. Could you guys help? Basicaly, I generate a RSA Keypair, then create a certificate and want to self sign it. Finally i need to store the private key to create a p12. Here is the code: I am using the IAIK JCE. KeyPair keyPair; IAIK IAIKprovider = new IAIK(); Security.insertProviderAt(IAIKprovider, 2); KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RSA, IAIKprovider.getName()); keyPairGenerator.initialize(keySize); keyPair = keyPairGenerator.generateKeyPair(); X509Certificate cert; [...] cert.sign( AlgorithmID.sha1WithRSAEncryption ,keyPair.getPrivate(), IAIKprovider.getName()); if(!RSAPrivateKey.class.isAssignableFrom(keyPair.getPrivate().getClass())){ error(Generated RSA private key is not of type RSA!); } KeyBag keybag = new KeyBag((RSAPrivateKey) keyPair.getPrivate(), certLabel, certLabel.getBytes()); The problem is that if I have more than one tomcat context using the same pice of code, the 2nd context to use it triggers the if (that is, without it I get a ClassCastException). Meaning that the generated private key is not compatible with RSAPrivateKey, while I asked for a RSA key. I also have the same problem with the other way around: CertificateFactory certFactory = CertificateFactory.getInstance(X.509, IAIK); Collection certCollection = certFactory.generateCertificates(new ByteArrayInputStream( certChainBlob.getDatabinary() )); cert = (X509Certificate)certChain.get(0); //where X509Certificate being iaik.x509.X509Certificate) gets a ClassCastException if being the second context to call this code. Oh, one more important thing: I add the security provider dynamicaly with a: Security.insertProviderAt(new IAIK(), 2); Could someone help me on this? Thank you, Lionel - 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]
POST method with Tomcat-IIS redirector
Hi all, please, i'm having a challenge with the ispai_redirector.dll. i've installed it and everything works just fine except that a form submitted to Tomcat via the redirector from IIS with method POST generates an error: Process call back. status 2 please, can anyone help with what i should do? Thanx. lekan - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard.
Re: Cleint Side Certificates
Bill Barker wrote: Julian W H Osborne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear All, I've been trying to get client/server certificates working with tomcat now for a while and I'm not having much success. I have generated certificates which have worked successfully with apache but not tomcat. I decided to script what I needed to do, so hopefully if anyone can see a problem with what I am doing they can help!! I've modified the servers.xml file to clientAuth=true (btw everything works if it is false), and I've added the path for the key store and the password for the key store, other than that there is nothing unusual in the the config file. Well, that's your problem then ;-). You need to configure your truststore to tell Tomcat how to validate client certs. For TC 5.x.x, you need to add truststoreFile=/path/to/trust.store and truststorePass=your-password-here to your Connector element in server.xml. Okay, I'm using version 4.1.29. I've added in truststoreFile and truststorePass. I've pointed truststoreFile at the same keystore as I'm using for keystoreFile. But I'm still having a problem. If I use Firefox to test it I get Could not establish an encrypted connection because your certificate was rejected by I have imported the client side cert into firefox. Still stumped! Thanks in advance Julian The openssl.cnf file has only been modified to include valid DN enteries. I've pasted the script I am using below. Any help greatfully received. Thanks Julian #!/bin/sh SSL_DIR=/usr/share/ssl/ JAVA_BIN=/usr/java/j2sdk1.4.2_04/jre/bin/ KEYTOOL=${JAVA_BIN}keytool KEYSTORE_TYPE=jks KEYSTORE=${SSL_DIR}java/$1-keystore.${KEYSTORE_TYPE} echo Extracting Private Key ... echo Enter Private Key Password: stty_orig=`stty -g` stty -echo read PASSWORD stty $stty_orig DN='CN='$1', OU=it-dept, O=IMS MAXIMS Plc, L=Milton Keynes, S=Buckinghamshire, C=GB' CACERT=${SSL_DIR}imscacert.pem cd ${SSL_DIR}java echo Using ${DN} ... echo Generating key ... ${KEYTOOL} -genkey -dname ${DN} -alias tomcat -keyalg RSA -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -keypass ${PASSWORD} -storepass ${PASSWORD} echo Generating certificate request ... ${KEYTOOL} -certreq -keyalg RSA -alias tomcat -file $1.csr -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -storepass ${PASSWORD} -keypass ${PASSWORD} echo Exporting key ... ${KEYTOOL} -export -alias tomcat -keystore ${KEYSTORE} -file $1-exported.crt -storepass ${PASSWORD} echo Converting key ... openssl x509 -out $1-exported.pem -outform pem -text -in $1-exported.crt -inform der ${JAVA_BIN}java ExportPriv ${KEYSTORE} tomcat ${PASSWORD} $1.key cp $1.csr ${SSL_DIR}clients/requests/ cp $1.key ${SSL_DIR}clients/keys/ cd ${SSL_DIR}clients echo Signing server-side certificate ... openssl ca -out ./completed/$1.crt -infiles ./requests/$1.csr echo Converting certificate ... openssl x509 -in ./completed/$1.crt -out ./completed/$1.pem echo Signing client-side certificate openssl pkcs12 -export -in ./completed/$1.pem -inkey ./keys/$1.key -out ./client-side/$1.p12 cd ${SSL_DIR}java echo Updating root certificate in keystore ... ${KEYTOOL} -import -trustcacerts -alias IMS MAXIMS CA -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -file ${CACERT} -storepass ${PASSWORD} echo Updating server-side certificate in keystore ${KEYTOOL} -import -trustcacerts -alias tomcat -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -file ${SSL_DIR}clients/completed/$1.pem -storepass ${PASSWORD} - 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]
RES: Deploying jsps
You can use Jasper to trancribe your JSP pages in java code, and then compiled it with javac. Here is my real word build.xml´s snapshoot: jspc srcdir =${webapp}/jsp destdir =${webapp}/bin verbose =9 package =${jsp.package} uriroot =/osctrl encoding=ISO-8859-1 webxml =${webapp}/WEB-INF/jsp.xml classpathref=base-path webapp basedir=${webapp}/ /jspc javac srcdir=${webapp}/bin debug=${usar.debug} classpathref=base-path destdir=${webapp}/bin/ jar destfile=${webapp}/WEB-INF/lib/libjsp.jar basedir=${webapp}/bin/ -Mensagem original- De: Abhay Hiwarkar [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 23 de dezembro de 2004 5:36 Para: 'Tomcat Users List' Assunto: RE: Deploying jsps Doesn't any body have a detailed procedure to deploy compiled jsps with Tomcat4.0 ? Abhay -Original Message- From: Abhay Hiwarkar [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:33 To: 'Tomcat Users List' Subject: Deploying jsps Hi, I am week in deploying war with Tomcat4 on Windows. The war contains only the class files generated from JSPs. I am not able to access any JSP through http://localhost:8080/myProj/client.jsp The war file contains the web.xml with mapping of all servlets to jsps I will appriciate your help. Thanks, Abhay -Original Message- From: Daniel Watrous [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:25 To: Tomcat Users List Subject: Re: Want to know better way of deploying Manisha, I have also had this occur when using Tomcat on Windows, but never with Tomcat running on Linux. Maybe this is a bug related to Tomcat on Windows... Are you using Windows? Daniel - Original Message - From: Manisha Sathe [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Wednesday, December 22, 2004 10:21 PM Subject: Want to know better way of deploying I am using ant to create war file. Then i undeploy previous version and try to deploy new version. But when i try to do this it says FAIL - War file strutstest.war already exists on server Inside /webapp - previous uploaded war file is still present. I can not delete just like that as it says sharing violation. So i need to stop Tomcat, delete /webapp/{my prev war file}. Then start the Tomcat again and deploy the new file. Is there any other soln ? so that w/o restarting my tomcat can i just deploy new version ? regards Manisha __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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]
Logger without timestamp not working
Tomcat 4.1.27 I can't get Tomcat to not timestamp log files. I've set the logger's timestamp attribute to false and still a timestamp is placed on the file. Is this a bug? Thanks, -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
best way to setup multiple instances of tomcat
Hello- I currently am using Tomcat 5.0.28 for both our production and test server. Currently, I have one copy of the tomcat distribution in /usr/local/tomcat, two different server.xml files (server-prod.xml and server-test.xml) in /usr/local/tomcat/conf and two different scripts in /etc/init.d to start the prod and test servers. Each server has its own directory under /usr/local/tomcat/conf/Catalina, and the ROOT.xml file in each case defines a different log file for the application. Everything seems to work fine, but both instances are writing to /usr/local/tomcat/logs/catalina.out. My question is can the filename catalina.out be controlled so each instance writes to a different file? Also, I'm thinking that I probably don't want them both running off the same install directory because what if I want to test a new version of Tomcat in the test environment? The only thing I'm saving by having them both run from the same directory is a few megs of space right? Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best way to setup multiple instances of tomcat
The easiest way is to run multiple copies. For example: /usr/local/tomcat1/ ... /usr/local/tomcat2/ ... /usr/local/tomcat.../ ... If the configurations are the same, then you can use the same copy of server.xml for all the instances. Then for items which need to be different such as port and ip address, use you pass system properties on startup and have them substitued in server.xml. export JAVA_OPTS='-Dfoo=8080' Connector ... port=${foo}/ -Tim Greg Lappen wrote: Hello- I currently am using Tomcat 5.0.28 for both our production and test server. Currently, I have one copy of the tomcat distribution in /usr/local/tomcat, two different server.xml files (server-prod.xml and server-test.xml) in /usr/local/tomcat/conf and two different scripts in /etc/init.d to start the prod and test servers. Each server has its own directory under /usr/local/tomcat/conf/Catalina, and the ROOT.xml file in each case defines a different log file for the application. Everything seems to work fine, but both instances are writing to /usr/local/tomcat/logs/catalina.out. My question is can the filename catalina.out be controlled so each instance writes to a different file? Also, I'm thinking that I probably don't want them both running off the same install directory because what if I want to test a new version of Tomcat in the test environment? The only thing I'm saving by having them both run from the same directory is a few megs of space right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logger without timestamp not working
The loggers doesn't support the timestamp attribute, only the accessvalve loggers do. -Tim Faine, Mark wrote: Tomcat 4.1.27 I can't get Tomcat to not timestamp log files. I've set the logger's timestamp attribute to false and still a timestamp is placed on the file. Is this a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best way to setup multiple instances of tomcat
Greg Lappen wrote: Also, I'm thinking that I probably don't want them both running off the same install directory because what if I want to test a new version of Tomcat in the test environment? The only thing I'm saving by having them both run from the same directory is a few megs of space right? Hi Greg, you might search for the file RUNNING.txt in /usr/local/tomcat for more information. There were other threads on 9th and 13th December 2004 in this list discussing the same topic. Your particular problem can be solved by specifying the appropriate parameter (-outfile) when starting your tomcats using jsvc (the java commons daemon). I wrote a script and a short description for installation of multiple tomcat instances and put it to http://miti.sourceforge.net/ . Wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cleint Side Certificates
Dear All, I've been trying to get client/server certificates working with tomcat now for a while and I'm not having much success. I have generated certificates which have worked successfully with apache but not tomcat. I decided to script what I needed to do, so hopefully if anyone can see a problem with what I am doing they can help!! I've modified the servers.xml file to clientAuth=true (btw everything works if it is false), and I've added the path for the key store and the password for the key store, other than that there is nothing unusual in the the config file. Well, that's your problem then ;-). You need to configure your truststore to tell Tomcat how to validate client certs. For TC 5.x.x, you need to add truststoreFile=/path/to/trust.store and truststorePass=your-password-here to your Connector element in server.xml. Okay, I'm using version 4.1.29. I've added in truststoreFile and truststorePass. I've pointed truststoreFile at the same keystore as I'm using for keystoreFile. But I'm still having a problem. If I use Firefox to test it I get Could not establish an encrypted connection because your certificate was rejected by I have imported the client side cert into firefox. Still stumped! Thanks in advance You need to pass the truststore in as a JVM arguement. Do a search on the list for SSL. The exact parameters should be in there. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Gurus! JCE and classloader question
Well, I tried to put the library in common/lib (and I think also for a different try, in shared/lib). Usually it is in WEB-INF/lib. But the problem occured also. I believe that the factory used by the jvm searches for the first instance of the JCE. Then it tries to cast it into another instance of the lib which is different from the first, but I am not too sure about that since I am no expert in Tomcat. Have you an explanation or any solution? Antony Paul wrote: Where you put the provider jar file ?. WEB-INF/lib ?. Try putting it in shared/lib or common/lib if the same jar file is used by multiple applications. rgds Antony Paul On Thu, 23 Dec 2004 15:01:04 +0530, Antony Paul [EMAIL PROTECTED] wrote: Which JCE provider you are using ? rgds Antony Paul On Tue, 21 Dec 2004 20:06:40 +0100, Lionel Pasquier [EMAIL PROTECTED] wrote: Hello again! Any guru around to solve my problem please? :-) Lionel Pasquier wrote: Hello, I have a trouble with using a JCE and multiple contexts. From what I could have read around here this is probably linked to a classloader problem. Could you guys help? Basicaly, I generate a RSA Keypair, then create a certificate and want to self sign it. Finally i need to store the private key to create a p12. Here is the code: I am using the IAIK JCE. KeyPair keyPair; IAIK IAIKprovider = new IAIK(); Security.insertProviderAt(IAIKprovider, 2); KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RSA, IAIKprovider.getName()); keyPairGenerator.initialize(keySize); keyPair = keyPairGenerator.generateKeyPair(); X509Certificate cert; [...] cert.sign( AlgorithmID.sha1WithRSAEncryption ,keyPair.getPrivate(), IAIKprovider.getName()); if(!RSAPrivateKey.class.isAssignableFrom(keyPair.getPrivate().getClass())){ error(Generated RSA private key is not of type RSA!); } KeyBag keybag = new KeyBag((RSAPrivateKey) keyPair.getPrivate(), certLabel, certLabel.getBytes()); The problem is that if I have more than one tomcat context using the same pice of code, the 2nd context to use it triggers the if (that is, without it I get a ClassCastException). Meaning that the generated private key is not compatible with RSAPrivateKey, while I asked for a RSA key. I also have the same problem with the other way around: CertificateFactory certFactory = CertificateFactory.getInstance(X.509, IAIK); Collection certCollection = certFactory.generateCertificates(new ByteArrayInputStream( certChainBlob.getDatabinary() )); cert = (X509Certificate)certChain.get(0); //where X509Certificate being iaik.x509.X509Certificate) gets a ClassCastException if being the second context to call this code. Oh, one more important thing: I add the security provider dynamicaly with a: Security.insertProviderAt(new IAIK(), 2); Could someone help me on this? Thank you, Lionel - 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: Logger without timestamp not working
Tim Funk, I tried it in 5.0.19 version it didn't work for me also but document says it must work and the default value of timestamp is false and my other problem with logger I have already posted it didn't hear from any one abt. it problem for creating the separate log file by Logger . /for my application context in tomcat-5.0.19. that is working fine in tomcat 5.0.27! please help me what the settings are to be needed to make it out on tomcat 5.0.19 . is this bug or AM I missing some thing sample of my context file which is under ..conf\Catalina\localhost\ Context displayName=SMART debug=0 docBase=Smart path=/Smart Logger className=org.apache.catalina.logger.FileLogger directory=webapps/smartlogs prefix=Smart_log. suffix=.txt timestamp=true/ . .. Context/ any help regarding these pls. thanx in advance Manish *** In -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 7:59 PM To: Tomcat Users List Subject: Re: Logger without timestamp not working The loggers doesn't support the timestamp attribute, only the accessvalve loggers do. -Tim Faine, Mark wrote: Tomcat 4.1.27 I can't get Tomcat to not timestamp log files. I've set the logger's timestamp attribute to false and still a timestamp is placed on the file. Is this a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it 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 immediately notify the [EMAIL PROTECTED] and destroy the original message. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logger without timestamp not working
According to: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/logger.html The FileLogger supports: directory, prefix, suffix and timestamp -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 8:29 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working The loggers doesn't support the timestamp attribute, only the accessvalve loggers do. -Tim Faine, Mark wrote: Tomcat 4.1.27 I can't get Tomcat to not timestamp log files. I've set the logger's timestamp attribute to false and still a timestamp is placed on the file. Is this a bug? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 - JMX with j2se1.4
I've succeeded (to expose Tomcat 5.5.x server for remote JMX management with j2se 1.4)! So if anybody is interested, Steps are the same as for Tomcat 5.0! - To connect to Tomcat 5.0 you must currently enable the MX4J 1.1.1 proprietary connector. 1.. Edit jk2.properties and add the following: mx.port=1099 mx.enabled=true mx.httpPort=9051 mx.httpHost=localhost mx.jrmpPort=1099 mx.jrmpHost=localhost 2.. Download and copy the mx4j-tools and mx4j-jmx jars version 1.1.1 into the $CANTALINA_HOME/common/lib directory. 3.. Start tomcat looking for any exceptions. It will show an error message if it is unable to locate the MX4J libraries or if it cannot bind to the standard jndi port of 1099 or 9050. -- The only problem left is that, in Tomcat 5.5, JK doesn't have default property file (jk2.properties placed in conf directory for Tomcat 5.0) that gets loaded on 'init'. That is the reason why you HAVE to define 'propertiesFile' property for 'JkMain' class if you wan your configuration (from (e.g.) jk2.properties file) to get loaded. The easyest way to do this is to define additional property for 'AJP 1.3 Connector' defined in 'server.xml' file: Original Connector configuration: !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Adapted Connector configuration: !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 propertiesFile=C:\jakarta-tomcat-5.5.4\conf\jk2.properties / That is all! Regards, Slobodan - Original Message - From: Slobodan Vujasinovic [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Wednesday, December 22, 2004 10:39 AM Subject: Tomcat 5.5 - JMX Hi, Has anyone succeeded to expose Tomcat 5.5.x server for remote JMX management with j2se 1.4? I've done it with JRE 5.0 but I'm limited to j2se 1.4 use! Regards, Slobodan - 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 lost request parameters
Hi, Thanks for replying. I was looking through the code trying to find multi-threading problems (like Bob said). So, I decided to post some code fragments in order to show to you how stupid these errors are... jsp:useBean id = ticket class = com.mycompany.Ticket/ % ticket.setAttribute(code, request.getParameter(ticketCode)); ticket.loadElement(); ... % The exception rises in the line ticket.loadElement(). What we are doing is a simple db select to retrieve some data, and then we are using it in order to set the object fields. The exception (a custom one) tells that the code has not been properly setted, so the loadElement() method could not be executed... It's insane, because as I shown, I'm setting it one line before (like the problem that Frank had), and again, this code works well under light pressure. This is the reason that I told that tomcat was losing request parameters. By default, the jsp isThreadSafe=true. So I think that it could not be changed by another request... Looking through the copiled jsp, I found that my bean becomes this: com.mycompany.Ticket ticket = null; synchronized (pageContext) { ticket = (com.mycompany.Ticket) pageContext.getAttribute(ticket, PageContext.PAGE_SCOPE); if (ticket == null){ try { ticket = (com.mycompany.Ticket) java.beans.Beans.instantiate(this.getClass().getClassLoader(), com.mycompany.Ticket); } catch (ClassNotFoundException exc) { throw new InstantiationException(exc.getMessage()); } catch (Exception exc) { throw new ServletException(Cannot create bean of class + com.mycompany.Ticket, exc); } pageContext.setAttribute(ticket, ticket, PageContext.PAGE_SCOPE); } } I am trying to avoid changes, but I think that I will explicit call isThreadSafe on the top of the page and also change the scope for REQUEST_SCOPE... Just to let you know... TIA, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 Officially Unsupported - Should I Avoid JK2?
It looks like things regarding a connector are still in flux... probably not time to panic yet. JK2 works. mod_jk works. Choose one. [EMAIL PROTECTED] 12-22-2004 17:03 On November 15th, there was an announcement that JK2 is officially unsupported. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/news/20041100.html#20041115.1 We're in the process of configuring new servers and integrating Apache with Tomcat. We are migrating applications from servers running Apache w/ mod_jk against Tomcat 4 w/ JK (not JK2). I had been under the impression that JK2 was superior to JK. In light of the announcement, should we be sticking with JK from here-on-in? - 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: Logger without timestamp not working
The timestamp attribute is a flag as to show or hide the timestamp when a message is logged in the file. It has nothing to do with the file name. -Tim Goel, Manish Kumar wrote: Tim Funk, I tried it in 5.0.19 version it didn't work for me also but document says it must work and the default value of timestamp is false and my other problem with logger I have already posted it didn't hear from any one abt. it problem for creating the separate log file by Logger . /for my application context in tomcat-5.0.19. that is working fine in tomcat 5.0.27! please help me what the settings are to be needed to make it out on tomcat 5.0.19 . is this bug or AM I missing some thing sample of my context file which is under ..conf\Catalina\localhost\ Context displayName=SMART debug=0 docBase=Smart path=/Smart Logger className=org.apache.catalina.logger.FileLogger directory=webapps/smartlogs prefix=Smart_log. suffix=.txt timestamp=true/ . .. Context/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat startup failing with Exception processing JAR
Guys, I have been really struggling with this new install. Tomcat startup failing with error in localhost_log.txt and locahost_log_admin.txt: Localhost_log.txt: 2004-12-23 09:51:03 ContextConfig[/alligator] Exception processing JAR at resource path /WEB-INF/lib/commons-pool-1.0.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/commons-pool-1.0.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Localhost_admin_log.txt: 2004-12-23 09:51:04 ContextConfig[/admin] Exception processing JAR at resource path /WEB-INF/lib/struts.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/struts.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:162) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase. java:182) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer. java:700) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1064) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1562) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:385) at org.apache.catalina.core.StandardHost.install(StandardHost.java:803) at
RE: Logger without timestamp not working
So how would you suggest one get a log file without a timestamp appended to it? Extend FileLogger? -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:48 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working The timestamp attribute is a flag as to show or hide the timestamp when a message is logged in the file. It has nothing to do with the file name. -Tim Goel, Manish Kumar wrote: Tim Funk, I tried it in 5.0.19 version it didn't work for me also but document says it must work and the default value of timestamp is false and my other problem with logger I have already posted it didn't hear from any one abt. it problem for creating the separate log file by Logger . /for my application context in tomcat-5.0.19. that is working fine in tomcat 5.0.27! please help me what the settings are to be needed to make it out on tomcat 5.0.19 . is this bug or AM I missing some thing sample of my context file which is under ..conf\Catalina\localhost\ Context displayName=SMART debug=0 docBase=Smart path=/Smart Logger className=org.apache.catalina.logger.FileLogger directory=webapps/smartlogs prefix=Smart_log. suffix=.txt timestamp=true/ . .. Context/ - 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: Logger without timestamp not working
Yup. But is it really worth it? Logger is gone in 5.5 in place of commons-logging. -Tim Faine, Mark wrote: So how would you suggest one get a log file without a timestamp appended to it? Extend FileLogger? -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:48 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working The timestamp attribute is a flag as to show or hide the timestamp when a message is logged in the file. It has nothing to do with the file name. -Tim Goel, Manish Kumar wrote: Tim Funk, I tried it in 5.0.19 version it didn't work for me also but document says it must work and the default value of timestamp is false and my other problem with logger I have already posted it didn't hear from any one abt. it problem for creating the separate log file by Logger . /for my application context in tomcat-5.0.19. that is working fine in tomcat 5.0.27! please help me what the settings are to be needed to make it out on tomcat 5.0.19 . is this bug or AM I missing some thing sample of my context file which is under ..conf\Catalina\localhost\ Context displayName=SMART debug=0 docBase=Smart path=/Smart Logger className=org.apache.catalina.logger.FileLogger directory=webapps/smartlogs prefix=Smart_log. suffix=.txt timestamp=true/ . .. Context/ - 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: Logger without timestamp not working
I hate to do it, considering all the work involved and the fact that I'll have to ensure that it gets included in every installation of Tomcat from here on out (until we get to 5.5) but I have little choice. I can't believe the option is not already a part of the FileLogger class. -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 11:16 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working Yup. But is it really worth it? Logger is gone in 5.5 in place of commons-logging. -Tim Faine, Mark wrote: So how would you suggest one get a log file without a timestamp appended to it? Extend FileLogger? -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:48 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working The timestamp attribute is a flag as to show or hide the timestamp when a message is logged in the file. It has nothing to do with the file name. -Tim Goel, Manish Kumar wrote: Tim Funk, I tried it in 5.0.19 version it didn't work for me also but document says it must work and the default value of timestamp is false and my other problem with logger I have already posted it didn't hear from any one abt. it problem for creating the separate log file by Logger . /for my application context in tomcat-5.0.19. that is working fine in tomcat 5.0.27! please help me what the settings are to be needed to make it out on tomcat 5.0.19 . is this bug or AM I missing some thing sample of my context file which is under ..conf\Catalina\localhost\ Context displayName=SMART debug=0 docBase=Smart path=/Smart Logger className=org.apache.catalina.logger.FileLogger directory=webapps/smartlogs prefix=Smart_log. suffix=.txt timestamp=true/ . .. Context/ - 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]
Still need help! - DBCP/DB2/Tomcat 4.1.24 problem!
Hi, despite the fact that I did get some responses (and a thread hijack), I am still trying to solve this. Any help appreciated. I am trying to get DBCP connection pooling to work with Tomcat 4.1.24 and DB2 8.X. I can connect directly, but whenever I try to use DBCP, I receive a Cannot load driver class 'null' error. The DB2 and JNDI jar files are located in tomcat-root\common\lib. This code snippet works: ... String url = jdbc:db2://myserver:5/mydb; String user = test; String pass = password; Class.forName(com.ibm.db2.jcc.DB2Driver); Connection conn = DriverManager.getConnection(url,user,pass); Statement stmt = conn.createStatement(); ResultSet myRs = stmt.executeQuery(select * from myTable); ... This leads me to believe that: a) My driver is fine and jar file location is ok b) My login credentials are fine I use the same driver and connection info in my DBCP config. --- Now when I try to use DBCP, this code snippet does NOT work. ... Context jndiCtx = new InitialContext(); Context ctx = (Context) jndiCtx.lookup(java:comp/env); DataSource ds = (DataSource) ctx.lookup(jdbc/mydb); Connection conn = ds.getConnection(); Statement stmt = conn.createStatement(); ResultSet myRs = stmt.executeQuery(select * from myTable); ... Tomcat does not throw any errors at startup in any logs and when I execute the above code, the DataSource retrieved (ds) is not null and a getClassName() call reveals a generic commons DataSource object. However, once it gets to the getConnection() method, the evil Cannot load driver class 'null' error occurs. I tried messing around with the JNDI entries to prove that was OK, and as expected I get a naming error if I put a wrong value. This tells me that the lookup portion works, yes? Here are the relevant server.xml and the web.xml entries: -- server.xml (note: I also tried it without the factory param) -- ... Context... Resource name=jdbc/mydb scope=Shareable type=javax.sql.DataSource auth=Container / Resourceparams name=jdbc/mydb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameusername/name valuetest/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namedriverClassName/name valuecom.ibm.db2.jcc.DB2Driver/value /parameter parameter nameurl/name valuejdbc:db2://myserver:5/mydb/value /parameter /Resourceparams /Context -- web.xml -- ... resource-ref resource-ref-namejdbc/mydbresource-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref So, that is pretty much it. I have consulted 2 books, countless websites, and would appreciate any help. Thanks JW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cleint Side Certificates
Julian W H Osborne wrote: Bill Barker wrote: Julian W H Osborne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear All, I've been trying to get client/server certificates working with tomcat now for a while and I'm not having much success. I have generated certificates which have worked successfully with apache but not tomcat. I decided to script what I needed to do, so hopefully if anyone can see a problem with what I am doing they can help!! I've modified the servers.xml file to clientAuth=true (btw everything works if it is false), and I've added the path for the key store and the password for the key store, other than that there is nothing unusual in the the config file. Well, that's your problem then ;-). You need to configure your truststore to tell Tomcat how to validate client certs. For TC 5.x.x, you need to add truststoreFile=/path/to/trust.store and truststorePass=your-password-here to your Connector element in server.xml. Okay, I'm using version 4.1.29. I've added in truststoreFile and truststorePass. I've pointed truststoreFile at the same keystore as I'm using for keystoreFile. But I'm still having a problem. If I use Firefox to test it I get Could not establish an encrypted connection because your certificate was rejected by I have imported the client side cert into firefox. Still stumped! I've also imported the ca cert I'm using in to the trusted cacerts file in $JAVA_HOME/jre/lib/security/cacerts and still no joy. Thanks in advance Julian The openssl.cnf file has only been modified to include valid DN enteries. I've pasted the script I am using below. Any help greatfully received. Thanks Julian #!/bin/sh SSL_DIR=/usr/share/ssl/ JAVA_BIN=/usr/java/j2sdk1.4.2_04/jre/bin/ KEYTOOL=${JAVA_BIN}keytool KEYSTORE_TYPE=jks KEYSTORE=${SSL_DIR}java/$1-keystore.${KEYSTORE_TYPE} echo Extracting Private Key ... echo Enter Private Key Password: stty_orig=`stty -g` stty -echo read PASSWORD stty $stty_orig DN='CN='$1', OU=it-dept, O=IMS MAXIMS Plc, L=Milton Keynes, S=Buckinghamshire, C=GB' CACERT=${SSL_DIR}imscacert.pem cd ${SSL_DIR}java echo Using ${DN} ... echo Generating key ... ${KEYTOOL} -genkey -dname ${DN} -alias tomcat -keyalg RSA -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -keypass ${PASSWORD} -storepass ${PASSWORD} echo Generating certificate request ... ${KEYTOOL} -certreq -keyalg RSA -alias tomcat -file $1.csr -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -storepass ${PASSWORD} -keypass ${PASSWORD} echo Exporting key ... ${KEYTOOL} -export -alias tomcat -keystore ${KEYSTORE} -file $1-exported.crt -storepass ${PASSWORD} echo Converting key ... openssl x509 -out $1-exported.pem -outform pem -text -in $1-exported.crt -inform der ${JAVA_BIN}java ExportPriv ${KEYSTORE} tomcat ${PASSWORD} $1.key cp $1.csr ${SSL_DIR}clients/requests/ cp $1.key ${SSL_DIR}clients/keys/ cd ${SSL_DIR}clients echo Signing server-side certificate ... openssl ca -out ./completed/$1.crt -infiles ./requests/$1.csr echo Converting certificate ... openssl x509 -in ./completed/$1.crt -out ./completed/$1.pem echo Signing client-side certificate openssl pkcs12 -export -in ./completed/$1.pem -inkey ./keys/$1.key -out ./client-side/$1.p12 cd ${SSL_DIR}java echo Updating root certificate in keystore ... ${KEYTOOL} -import -trustcacerts -alias IMS MAXIMS CA -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -file ${CACERT} -storepass ${PASSWORD} echo Updating server-side certificate in keystore ${KEYTOOL} -import -trustcacerts -alias tomcat -keystore ${KEYSTORE} -storetype ${KEYSTORE_TYPE} -file ${SSL_DIR}clients/completed/$1.pem -storepass ${PASSWORD} - 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: Cleint Side Certificates
Chris wrote: Dear All, I've been trying to get client/server certificates working with tomcat now for a while and I'm not having much success. I have generated certificates which have worked successfully with apache but not tomcat. I decided to script what I needed to do, so hopefully if anyone can see a problem with what I am doing they can help!! I've modified the servers.xml file to clientAuth=true (btw everything works if it is false), and I've added the path for the key store and the password for the key store, other than that there is nothing unusual in the the config file. Well, that's your problem then ;-). You need to configure your truststore to tell Tomcat how to validate client certs. For TC 5.x.x, you need to add truststoreFile=/path/to/trust.store and truststorePass=your-password-here to your Connector element in server.xml. Okay, I'm using version 4.1.29. I've added in truststoreFile and truststorePass. I've pointed truststoreFile at the same keystore as I'm using for keystoreFile. But I'm still having a problem. If I use Firefox to test it I get Could not establish an encrypted connection because your certificate was rejected by I have imported the client side cert into firefox. Still stumped! Thanks in advance You need to pass the truststore in as a JVM arguement. Do a search on the list for SSL. The exact parameters should be in there. Hmmm, why do you need to do this? Surely to get client authentication you don't need to start passing extra parameters to Tomcat? Have been trawling through the archives and can't find the message you mean. Thanks Julian Chris - 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: Log issues in Tomcat 4.1
At 11:38 AM 12/23/2004 +0530, you wrote: Hi All, In one of my production we are using Tomcat 4.1. Problem is if we didnt restart the tomcat services for 1 month thne log size of STDout.log become more then 1 GB. I know we can reduce that by avoiding System.out.println. But we need that to get the root cause of some issues which are data related. Is there another way by which we can reset thew log file daily or Tomcat create new log files without restarting the Tomcat services . If you run as a service, you could use the latest Tomcat service that comes with versions 5.0.xx and 5.5.x. The latest one rolls stdout for you on a daily basis. It'll be up to you to see if the Tomcat service in more recent versions works with Tomcat-4.1. Jake Thanks and regards, Pradeep Chauhan DISCLAIMER: This message, including any attachments contains confidential and privileged information for the sole use of the intended recipient(s), and is protected by law. If you are not the intended recipient, please destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Indus and R Systems International Ltd reserves the right to record, monitor, and inspect all email communications through its internal and external networks. Your messages shall be subject to such lawful supervision as Indus and R Systems International Ltd deems necessary in order to protect its information, interests and reputation. Indus and R Systems International Ltd prohibits and takes steps to prevent its information systems from being used to view, store or forward offensive or discriminatory material. - 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: Cleint Side Certificates
You need to pass the truststore in as a JVM arguement. Do a search on the list for SSL. The exact parameters should be in there. Hmmm, why do you need to do this? Surely to get client authentication you don't need to start passing extra parameters to Tomcat? Have been trawling through the archives and can't find the message you mean. Sorry, wrong list. It was on the Axis list. Here's the relevant text. --- I pretty much used this guide (and the new chapter it links to) to do it. http://www.pankaj-k.net/WSOverSSL/WSOverSSL-HOWTO.html Pretty much everything you need to know is in the SSL section of the new chapter. It starts on page 16 of the pdf. You gen your keystores and truststores, making sure to place them on the appropriate machines. Then change server.xml. I didn't use JCEKS and all of my stuff works. The hard part was installing Tomcat as a service with the truststore attribute set. For some reason, Tomcat doesn't let you set it in server.xml. Then you just modify your client to use https and include the keystore and truststore. Other than a typo, the CL version worked perfectly. I had to just play around with tomcat.exe to get it installed as a service, tho. As for passing in the parameters, to do 2 way auth, both sides need a truststore and a keystore. In TC 4.x server.xml doesn't provide you for a way to define a truststore, so you have to pass it in as a JVM arg. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jsp+bean (tomcat) Sample Code
*** Your mail has been scanned by InterScan. ***-*** Hi, I am developing a new application using jsp+bean with tomcat 5. I don't have problems whit forms, but I don't know if bean is a good architecture for reports...(using the bean to access the database)...or maybe is better use only jsp for report purposes? If you have any code sample, I appreciate it thanks
RE: Logger without timestamp not working
see the the Filelogger class under server\lib\catalina.jar so you can do one thing write your own Filelogger class which is exactly same as Filelogger just copy it and just remove the date from pathname definition inside the open method. and just compile and use it as your own file logger. cheers Manish private void open() { File dir = new File(directory); if(!dir.isAbsolute()) dir = new File(System.getProperty(catalina.base), directory); dir.mkdirs(); try { String pathname = dir.getAbsolutePath() + File.separator + prefix + date + suffix; writer = new PrintWriter(new FileWriter(pathname, true), true); } catch(IOException e) { writer = null; } } extend fileLogger class which is in server\lib\catalina.jar -Original Message- From: Faine, Mark [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:49 PM To: 'Tomcat Users List' Subject: RE: Logger without timestamp not working I hate to do it, considering all the work involved and the fact that I'll have to ensure that it gets included in every installation of Tomcat from here on out (until we get to 5.5) but I have little choice. I can't believe the option is not already a part of the FileLogger class. -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 11:16 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working Yup. But is it really worth it? Logger is gone in 5.5 in place of commons-logging. -Tim Faine, Mark wrote: So how would you suggest one get a log file without a timestamp appended to it? Extend FileLogger? -Mark -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:48 AM To: Tomcat Users List Subject: Re: Logger without timestamp not working The timestamp attribute is a flag as to show or hide the timestamp when a message is logged in the file. It has nothing to do with the file name. -Tim Goel, Manish Kumar wrote: Tim Funk, I tried it in 5.0.19 version it didn't work for me also but document says it must work and the default value of timestamp is false and my other problem with logger I have already posted it didn't hear from any one abt. it problem for creating the separate log file by Logger . /for my application context in tomcat-5.0.19. that is working fine in tomcat 5.0.27! please help me what the settings are to be needed to make it out on tomcat 5.0.19 . is this bug or AM I missing some thing sample of my context file which is under ..conf\Catalina\localhost\ Context displayName=SMART debug=0 docBase=Smart path=/Smart Logger className=org.apache.catalina.logger.FileLogger directory=webapps/smartlogs prefix=Smart_log. suffix=.txt timestamp=true/ . .. Context/ - 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] *** Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it 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 immediately notify the [EMAIL PROTECTED] and destroy the original message. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Want to know better way of deploying
It's been my experience that Windows locks files in use even if you don't ask Windows to. That said, I've also successfully deployed and re-deployed web apps to tomcat running on windows using ant. The tasks I use are 'remove' and 'deploy'. You can get info about using the tomcat manager here: http://localhost:8080/tomcat-docs/manager-howto.html which you could also use manually to un-deploy(remove) and re-deploy your web app without stopping tomcat. -- Isaac Sparrow [EMAIL PROTECTED] On Wed, 2004-12-22 at 22:25 -0700, Daniel Watrous wrote: Manisha, I have also had this occur when using Tomcat on Windows, but never with Tomcat running on Linux. Maybe this is a bug related to Tomcat on Windows... Are you using Windows? Daniel - Original Message - From: Manisha Sathe [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Wednesday, December 22, 2004 10:21 PM Subject: Want to know better way of deploying I am using ant to create war file. Then i undeploy previous version and try to deploy new version. But when i try to do this it says FAIL - War file strutstest.war already exists on server Inside /webapp - previous uploaded war file is still present. I can not delete just like that as it says sharing violation. So i need to stop Tomcat, delete /webapp/{my prev war file}. Then start the Tomcat again and deploy the new file. Is there any other soln ? so that w/o restarting my tomcat can i just deploy new version ? regards Manisha __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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]
[OT] Re: jsp+bean (tomcat) Sample Code
Hi, I am developing a new application using jsp+bean with tomcat 5. I don't have problems whit forms, but I don't know if bean is a good architecture for reports...(using the bean to access the database)...or maybe is better use only jsp for report purposes? If you have any code sample, I appreciate it This is not really Tomcat specific so I'm marking it [OT]. There are different schools of thought regarding the architecture of J2EE apps. Keeping everything in the JSPs (Model 1) is fine for small projects, prototypes, or projects where you are the only developer. For larger projects, especially ones where you may want a web designer, to change the look and feel of your JSPs, there are clear benefits to moving all non-view code into servlets and beans (Model 2). A Google search on MVC (Model View Controller) will yield all kinds of information on the subject. The Struts site http://struts.apache.org has a lot of good text on the subject. There are some sample apps on http://simple.souther.us. SimpleBean and SimpleMVC both have code that demonstrates the use of beans from within JSPs. -Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Turning on verbose mode in the JVM
It is an environment variable. Have a look in catalina.bat or catalina.sh for more info on this and other environment variables. Mark -Original Message- From: Tennessee Leeuwenburg [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 11:47 PM To: Tomcat Users List Subject: Re: Turning on verbose mode in the JVM Awesome. Would that be an environment variable, or does it go into server.xml? I'll register and put it in the wiki. Cheers, -T From: Tennessee Leeuwenburg [mailto:[EMAIL PROTECTED] 1) How do I pass the -verbose (-v) flag to the JVM? JAVA_OPTS 2) How do I pass arbitrary flags to the JVM? JAVA_OPTS 3) How do I add information to the wiki when I don't have permission to edit the pages? I believe you have to register before you are allowed to edit pages. Click on UserPreferences in the top right-hand corner and follow the instructions. Mark - 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: apache jk2.conf and tomcat question heeelp
Thank you but I'm still not getting something, how do you create an alias directory ??? Is that just a symlink ? Please help me understand one concept. I cannot seem to get an answer for this ANYWHERE I've been at this for WEEKS I do not want my jsp pages and my html pages in two different locations . I just want them all in /var/www/html. Is this possible ? Can this be done, does anyone understand what I'm talking about hlp At 08:45 PM 12/22/2004, you wrote: I think the way to do that is set up an alias directory inside apache.conf pointing to that absolute location, then put the entry in jk2.conf for that alias. Cheers, -T Hello, Is there a way to put an absolute path in the jk2.conf location tag that would look like /var/www/html/*.jsp I'm trying to set things up so If i have a .jsp in my website root it forwards the request to tomcat without having the .jsp physically sitting inside the tomcat root. Is this possible ??? Thanks in advance - 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: Deploying jsps
Hi Abhay, I don't have a solution but if you do find a clear description about how this can be done I too would be interested (and I am sure others are too). Mike Abhay Hiwarkar wrote: Doesn't any body have a detailed procedure to deploy compiled jsps with Tomcat4.0 ? Abhay -Original Message- From: Abhay Hiwarkar [mailto:[EMAIL PROTECTED] Sent: Thu, 23 Dec 2004 07:33 To: 'Tomcat Users List' Subject: Deploying jsps Hi, I am week in deploying war with Tomcat4 on Windows. The war contains only the class files generated from JSPs. I am not able to access any JSP through http://localhost:8080/myProj/client.jsp The war file contains the web.xml with mapping of all servlets to jsps I will appriciate your help. Thanks, Abhay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Request an app test (free beer!)
Well, these are the results: Suse 9.1 = Linux Windows 98 = Windows 98 Windows XP SP1 = Windows XP Mandrake 10.0 = Linux Mandrake 10.1 = Linux All tests made with J2SDK 1.4.2 G. - Original Message - From: Peter Maas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Commons User commons-user@jakarta.apache.org; Struts User user@struts.apache.org; Tomcat User tomcat-user@jakarta.apache.org Sent: Monday, December 20, 2004 11:38 PM Subject: Re: [OT] Request an app test (free beer!) On Debian GNU/Linux: Linux --p On Mon, 2004-12-20 at 17:26 -0500, Frank W. Zammetti wrote: I was informed last OT post I made that the subject should always include the word beer. I added the free to get your attention :) I'm working on something for which I need to know what the os.name property on various OS's is. I would greatly appreciate it if some folks could try the following: public class test { public static void main(String[] args) { System.out.println(System.getProperty(os.name)); } } I'm particularly interested in various *nix variants, Linux, Mac and such. Windows I already have answers for (although some verification to be sure nothing fishy is going on wouldn't hurt). If you could just post your OS and what the result was, I would greatly appreciate it. Thanks in advance! -- Peter Maas Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 Fax: +31 (0)204688405 Gsm: +31 (0)624687952 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - 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: apache jk2.conf and tomcat question heeelp
Create a Java web application in the 'normal' fashion. See http://localhost/tomcat-docs/appdev/index.html for how to set things up. This will create your entire web application in $CATALINA_HOME/webapps. Now, in your Apache httpd.conf file, you need some configuration additions. Let's say your application is called beg-jsp (for beginning JSP). Directory /home/tomcat/tomcat-5.0/webapps/beg-jsp Options Indexes MultiViews AllowOverride None Order allow,deny Allow from 127.0.0.1 Allow from 192.168.1 /Directory Replace /home/tomcat/tomcat-5.0/webapps/beg-jsp with the directory where your application is located. Adjust the Allow from statements as desired. Also add an alias directive in your httpd.conf. Alias /beg-jsp//home/tomcat/tomcat-5.0/webapps/beg-jsp/ Again, replace /home/tomcat/tomcat-5.0/webapps/beg-jsp with YOUR directory. Now, in workers2.properties, add the following lines to pass all jsp requests to Tomcat. [uri:lvh.mdeggers.org/beg-jsp/*.jsp] worker=ajp13:localhost:8009 Replace lvh.mdeggers.org with your hostname. The worker I'm using is the default worker. Change that if you've defined it differently than the default. Now Apache will serve all content except for files ending with jsp. That will get sent to Tomcat to serve. HTH - /mde/ just my two cents . . . . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stefan Neuhaus/IMNES/IM/DE/BAYER ist außer Haus.
Ich werde ab 24.12.2004 nicht im Büro sein. Ich kehre zurück am 07.01.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Request an app test (free beer!)
RedHat 9.0 = Linux Windows XP = Windows XP Run with JDK 1.5.0 --- Giuseppe Briotti [EMAIL PROTECTED] wrote: Well, these are the results: Suse 9.1 = Linux Windows 98 = Windows 98 Windows XP SP1 = Windows XP Mandrake 10.0 = Linux Mandrake 10.1 = Linux All tests made with J2SDK 1.4.2 G. - Original Message - From: Peter Maas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Commons User commons-user@jakarta.apache.org; Struts User user@struts.apache.org; Tomcat User tomcat-user@jakarta.apache.org Sent: Monday, December 20, 2004 11:38 PM Subject: Re: [OT] Request an app test (free beer!) On Debian GNU/Linux: Linux --p On Mon, 2004-12-20 at 17:26 -0500, Frank W. Zammetti wrote: I was informed last OT post I made that the subject should always include the word beer. I added the free to get your attention :) I'm working on something for which I need to know what the os.name property on various OS's is. I would greatly appreciate it if some folks could try the following: public class test { public static void main(String[] args) { System.out.println(System.getProperty(os.name)); } } I'm particularly interested in various *nix variants, Linux, Mac and such. Windows I already have answers for (although some verification to be sure nothing fishy is going on wouldn't hurt). If you could just post your OS and what the result was, I would greatly appreciate it. Thanks in advance! -- Peter Maas Application Architect / Streaming Noterik Multimedia BV Prins Hendrikkade 120 1011 AM Amsterdam The Netherlands Tel: +31 (0)205929966 Fax: +31 (0)204688405 Gsm: +31 (0)624687952 Web: www.noterik.nl -- Take a look at our streaming solutions: http://www.streamedit.com/demo.html Get firefox: http://www.mozilla.org/products/firefox/ --- :wq! - 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] __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question on Database and struts
Hi Manisa, I'm not sure what you mean by 'create array of databeans'. Your result set contains multiple rows, your bean should be able to return the entire result set. Why do you need an array of a bean? -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 7:25 PM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean for the results. But with result set - How to create array of databeans ? and how to post it on JSP ? if anybody can pass me the samples pls would be of great help regards Manisha - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question on Database and struts
Hi Manisha, I was also struggling with problem similar to you. I came you with following: package forklifts; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.util.Collection; import java.sql.*; public final class registrationAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { javax.sql.DataSource dataSource; Connection conn; try { dataSource = getDataSource(request); conn = dataSource.getConnection(); Statement stmt = null; ResultSet rs = null; String sqlquery=select * from my_table where username='+request.getParameter(username)+'; stmt = conn.createStatement(); rs=stmt.executeQuery(sqlquery); if(rs.next()) { request.setAttribute(msg,h5 class=errorUser with username '+request.getParameter(username)+' is already registered. Try another username./h5 ); if(rs!=null) rs.close(); if(stmt!=null) stmt.close(); if(conn!=null) conn.close(); return mapping.findForward(success); } else { sqlquery=Insert into my_table set username='+request.getParameter(username)+',password='+request.getParameter(password)+',FirstName='+request.getParameter(FirstName)+',LastName='+request.getParameter(LastName)+',Address='+request.getParameter(Address)+',Street='+request.getParameter(Street)+',City='+request.getParameter(City)+',State='+request.getParameter(State)+',Country='+request.getParameter(Country)+',Zip='+request.getParameter(Zip)+',Email='+request.getParameter(Email)+',Phone1='+request.getParameter(Phone)+',title='+request.getParameter(title)+',company='+request.getParameter(company)+',website='+request.getParameter(website)+',fax='+request.getParameter(fax)+'; try { stmt = conn.createStatement(); stmt.executeUpdate(sqlquery); request.setAttribute(msg,h5 class=successYour account created successfully/h5); if(rs!=null) rs.close(); if(stmt!=null) stmt.close(); if(conn!=null) conn.close(); return mapping.findForward(success);} catch(SQLException ex1) { request.setAttribute(msg,h5 class=errorSorry! regsitration failed/h5 ); return mapping.findForward(sqlexception); } } } catch(SQLException ex) { request.setAttribute(msg,h5 class=errorSorry! regsitration failed/h5 ); return mapping.findForward(sqlexception); } } } I hope above code will give you sufficient idea you to pass data to JSP page. -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Friday, December 24, 2004 8:55 AM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean for the results. But with result set - How to create array of databeans ? and how to post it on JSP ? if anybody can pass me the samples pls would be of great help regards Manisha - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard.
RE: Newbie question on Database and struts
Following code fetch records from database table , populate them to hastable and create vector of these hashtables . Then we pass this vector to JSP through request attribute. Action class import org.apache.struts.action.*; import javax.servlet.http.*; import java.sql.*; import java.util.*; import org.apache.commons.beanutils.*; public class viewWsForkliftsAction extends org.apache.struts.action.Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { HttpSession session=request.getSession(); if(session.getAttribute(username)!=null) { request.setAttribute(username, session.getAttribute(username)); } javax.sql.DataSource dataSource; Connection conn; try { dataSource = getDataSource(request); conn = dataSource.getConnection(); Statement stmt = null; ResultSet rs = null; String sqlquery=select * from my_table; sqlquery=sqlquery+and dcc_forklifts.status=\Active\; stmt = conn.createStatement(); rs= stmt.executeQuery(sqlquery); ResultSetMetaData rsmd = rs.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); Vector rows=new Vector(); while(rs.next()) { rs=stmt.getResultSet(); Hashtable fields=new Hashtable(); for(int j=1; j=numberOfColumns;j++) { fields.put(rsmd.getColumnName(j),rs.getString(rsmd.getColumnName(j))); } rows.add(fields); } request.setAttribute(rows,rows); conn.close(); return mapping.findForward(request.getParameter(page)); } catch (SQLException sqle) { request.setAttribute(val,sqle); return mapping.findForward(sqlexception); } } } In JSP page , I access this vector as Vector rows =(Vector)request.getAttribute(rows); int sz=rows.size(); for(int i=0;i sz;i++) { Hashtable row=(Hashtable)rows.get(i); ... } With regards, Amit Gupta -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Friday, December 24, 2004 8:55 AM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean for the results. But with result set - How to create array of databeans ? and how to post it on JSP ? if anybody can pass me the samples pls would be of great help regards Manisha - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard.
RE: Newbie question on Database and struts
what i mean to array of databeans means - I have created employee data bean and for each row of result set i am creating one object of bean. So in a way i will get array of databeans. regards Manisha John Najarian [EMAIL PROTECTED] wrote: Hi Manisa, I'm not sure what you mean by 'create array of databeans'. Your result set contains multiple rows, your bean should be able to return the entire result set. Why do you need an array of a bean? -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 7:25 PM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean for the results. But with result set - How to create array of databeans ? and how to post it on JSP ? if anybody can pass me the samples pls would be of great help regards Manisha - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? All your favorites on one personal page Try My Yahoo!
Re: Gurus! JCE and classloader question
May be there are two jar files or unzipped class files of the same class. Check for it also. rgds Antony Paul On Thu, 23 Dec 2004 16:22:33 +0100, Lionel Pasquier [EMAIL PROTECTED] wrote: Well, I tried to put the library in common/lib (and I think also for a different try, in shared/lib). Usually it is in WEB-INF/lib. But the problem occured also. I believe that the factory used by the jvm searches for the first instance of the JCE. Then it tries to cast it into another instance of the lib which is different from the first, but I am not too sure about that since I am no expert in Tomcat. Have you an explanation or any solution? Antony Paul wrote: Where you put the provider jar file ?. WEB-INF/lib ?. Try putting it in shared/lib or common/lib if the same jar file is used by multiple applications. rgds Antony Paul On Thu, 23 Dec 2004 15:01:04 +0530, Antony Paul [EMAIL PROTECTED] wrote: Which JCE provider you are using ? rgds Antony Paul On Tue, 21 Dec 2004 20:06:40 +0100, Lionel Pasquier [EMAIL PROTECTED] wrote: Hello again! Any guru around to solve my problem please? :-) Lionel Pasquier wrote: Hello, I have a trouble with using a JCE and multiple contexts. From what I could have read around here this is probably linked to a classloader problem. Could you guys help? Basicaly, I generate a RSA Keypair, then create a certificate and want to self sign it. Finally i need to store the private key to create a p12. Here is the code: I am using the IAIK JCE. KeyPair keyPair; IAIK IAIKprovider = new IAIK(); Security.insertProviderAt(IAIKprovider, 2); KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RSA, IAIKprovider.getName()); keyPairGenerator.initialize(keySize); keyPair = keyPairGenerator.generateKeyPair(); X509Certificate cert; [...] cert.sign( AlgorithmID.sha1WithRSAEncryption ,keyPair.getPrivate(), IAIKprovider.getName()); if(!RSAPrivateKey.class.isAssignableFrom(keyPair.getPrivate().getClass())){ error(Generated RSA private key is not of type RSA!); } KeyBag keybag = new KeyBag((RSAPrivateKey) keyPair.getPrivate(), certLabel, certLabel.getBytes()); The problem is that if I have more than one tomcat context using the same pice of code, the 2nd context to use it triggers the if (that is, without it I get a ClassCastException). Meaning that the generated private key is not compatible with RSAPrivateKey, while I asked for a RSA key. I also have the same problem with the other way around: CertificateFactory certFactory = CertificateFactory.getInstance(X.509, IAIK); Collection certCollection = certFactory.generateCertificates(new ByteArrayInputStream( certChainBlob.getDatabinary() )); cert = (X509Certificate)certChain.get(0); //where X509Certificate being iaik.x509.X509Certificate) gets a ClassCastException if being the second context to call this code. Oh, one more important thing: I add the security provider dynamicaly with a: Security.insertProviderAt(new IAIK(), 2); Could someone help me on this? Thank you, Lionel - 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: JK2 Officially Unsupported - Should I Avoid JK2?
Thanks for the reply, Dennis. I did some reading in the list archives on the subject, and we decided to go with mod_jk. Dennis Payne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It looks like things regarding a connector are still in flux... probably not time to panic yet. JK2 works. mod_jk works. Choose one. [EMAIL PROTECTED] 12-22-2004 17:03 On November 15th, there was an announcement that JK2 is officially unsupported. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/news/20041100.html#20041115.1 We're in the process of configuring new servers and integrating Apache with Tomcat. We are migrating applications from servers running Apache w/ mod_jk against Tomcat 4 w/ JK (not JK2). I had been under the impression that JK2 was superior to JK. In light of the announcement, should we be sticking with JK from here-on-in? - 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: Newbie question on Database and struts
You dont need an array of data beans. Store your data bean in an ArrayList or in a Vector. e.g ArrayList empList = new ArrayList(); Employee emp = null; while(rst.next()) { emp = new Employee(); /* Fill the employee object with the records from the database. */ empList.add(emp); } return empList; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question on Database and struts
Hi Manisha, this looks very simple thing in action class you can just set that array of databean in request attribute and get it back on jsp like: req.setAttribute(databeanarray,databeanarray); cheers Manish -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Friday, December 24, 2004 9:40 AM To: Tomcat Users List Subject: RE: Newbie question on Database and struts what i mean to array of databeans means - I have created employee data bean and for each row of result set i am creating one object of bean. So in a way i will get array of databeans. regards Manisha John Najarian [EMAIL PROTECTED] wrote: Hi Manisa, I'm not sure what you mean by 'create array of databeans'. Your result set contains multiple rows, your bean should be able to return the entire result set. Why do you need an array of a bean? -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 7:25 PM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean for the results. But with result set - How to create array of databeans ? and how to post it on JSP ? if anybody can pass me the samples pls would be of great help regards Manisha - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? All your favorites on one personal page - Try My Yahoo! *** Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it 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 immediately notify the [EMAIL PROTECTED] and destroy the original message. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]