Re: Advice wanted about mapping URIs to pages
Why don't you put all your stuff under Tomcat? With Struts 1.1, it's possible to define several contexts for your application (i.e. have several struts-config.xml files) and this seems to me the solution which possibly could address your needs. Additionally, if you have the possibility, the ideal solution would be a mixture between Apache httpd and Tomcat, so that HTML is served by Apache which guarantees better performances. I know that the security issue is a 'pain in the ass' (I'm writing my security model but the reason is that I'm guaranteeing security on the EJB tier, and there is no vendor-independent security solution at present), but if you need only to check security at the web-lier, I would seriously think to implement the security using Tomcat native architecture, with one of its security realms modules. Hope this will help, Marco - Original Message - From: Bob Langford [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 07, 2003 1:19 AM Subject: Advice wanted about mapping URIs to pages I'm trying to decide how to lay out my application. The major question is how to make Tomcat run it, but ideas for better organization would be welcome also. I'd better describe the setup, even though it's a bit lengthy. I'm running a separate instance of Tomcat, dedicated to this project. It's got two major sections: access control and content. 1) The access control is a set of JSP pages (using Struts) that handle user signup, login, etc. I have written a Filter that checks credentials on each page. 2) The content is a bunch of static HTML, GIFs, Flash, etc. Down the road there will also be some JSP here. This stuff is written by another person, and mostly already exists. I'd like to have the directory| Accessed from URI's such as these: layout like this: | ./tomcat/webapps/control.war xyz.com/ ./web/public/*.html xyz.com/public/foo.html ./web/basic/*.html xyz.com/good/bar.html ./web/deluxe/*.html xyz.com/better/some.pdf ./web/premier/*.html xyz.com/best/cool.swf The first one seems straightforward. The others are a bit harder. It's not going to be possible to put them into a .WAR file, and they're going to be updated constantly. They're not under the $CATALINA_BASE/webapps directory, so I don't know how to tell Tomcat to find them. Maybe symbolic links? The hard part is context. My custom Filter has to apply to all the directories under ./web, but also access the Session and other data that is part of control.war, and I've had trouble doing that. It would be easy to have them be separate apps, but I can't get my authentication working that way. Any suggestions or ideas would be greatly appreciated. I'm still experimenting, but I feel like every idea I've tried is an ugly hack. I'd rather be elegant :-) Thanks! P.S. Infrastructure: Linux 2.4.x, Tomcat 4.1.27, Struts 1.1. Solutions don't have to be portable to other software. I'd rather not use Tomcat 5, though. (Yet) -- Bob Langford Silicon Masters Consulting, Inc.8207 Stone River Court, Richmond, VA 23235 phone: 804-674-1253 fax: 804-745-6650 http://www.silicon-masters.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]
Re: Servlet front page without redirect - Tomcat 4.1 with mod_rewrite and mod_jk2
Wouldnt it be possible to write a Filter to detect requests to the home page and internally redirect/rewrite the request to whatever Servlet or resource required? - Original Message - From: Bill Barker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 07, 2003 4:42 AM Subject: Re: Servlet front page without redirect - Tomcat 4.1 with mod_rewrite and mod_jk2 This can be done for: 1) TC 3.3.2-dev with a non-default setting. 2) TC 5.0.9+ with default settings. You can't currently do this on any 4.x version. A. Zazula [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Okay, I'm trying to solve my problem by using mod_rewrite with mod_jk2 now. I've spent several days on this problem to date and I'm more than a little frustrated. When the user types http://mysight.org; I want the page they get to be generated by a servlet but without a redirect. So they won't be redirected to http://mysight.org/index.jsp or something. When their browser location bar sees http://mysight.org; they'll be looking at a page generated by a java servlet. This can be obviously done with Perl (slashdot.org is proof---you aren't redirected to slashdot.org/index.pl) and it can probably be done with every other non-Java language. Can it be done with a Java servlet? Is the combination of Apache 2.0.47, Tomcat 4.1.27, mod_jk2, and mod_rewrite powerful enough to be able to accomplish this extraordinary technical feat or do I have to switch to Perl because that community obviously figured it out? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.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]
JNDI DataSource - need to synchronize?
Hello List... Some coding help please. Following earlier advice on this list and the TC datasource how-to, I've now got a working test servlet. Basically I declare the Context(s) and DataSource as instance variables, and initialize them in init: Context initContext = null; Context envContext = null; DataSource ds = null; public void init() throws ServletException { try { initContext = new InitialContext(); envContext = (Context) initContext.lookup( java:comp/env); ds = (DataSource) envContext.lookup( jdbc/jpdb); } catch (NamingException e) { throw new ServletException( Couldn't setup JNDI Context/DataSource, e); } } == If this is the correct approach, should I be synchronizing the Context(s)/DataSource in the doGet method? If another http request thread closes it's own connection, will it affect the Context or DataSource object of this request? Thanks for any clarification, /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI DataSource - need to synchronize?
Well, to be sure, put your variables inside the methods. This way, your data will be safe. One idea would be to create objects when you need them, and to close them when you've finished. Marco - Original Message - From: john-paul delaney [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, September 07, 2003 12:18 PM Subject: JNDI DataSource - need to synchronize? Hello List... Some coding help please. Following earlier advice on this list and the TC datasource how-to, I've now got a working test servlet. Basically I declare the Context(s) and DataSource as instance variables, and initialize them in init: Context initContext = null; Context envContext = null; DataSource ds = null; public void init() throws ServletException { try { initContext = new InitialContext(); envContext = (Context) initContext.lookup( java:comp/env); ds = (DataSource) envContext.lookup( jdbc/jpdb); } catch (NamingException e) { throw new ServletException( Couldn't setup JNDI Context/DataSource, e); } } == If this is the correct approach, should I be synchronizing the Context(s)/DataSource in the doGet method? If another http request thread closes it's own connection, will it affect the Context or DataSource object of this request? Thanks for any clarification, /j-p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
404 leaks (was: PROBLEMS: memory / cpu usage - Tomcat 3.2.1)
Hello, All! SS once the 404 is logged, the apache - tomcat connection does not SS terminate. it stays running, and starts to consume cpu time Is this a known issue? What connector + Tomcat versions are vulnerable? Anton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I still don't understand the need for the connection between Apache and Tomcat
Dear people, I still don't understand why is there a need for a connection between Apache and Tomcat since Tomcat can work on its own. Regards, Anson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL/Verisign Confusion
Hi Dave, how much does it cost at Verisign, and how long is it valid for? And is this 'openssl' you mentioned a free alternative? Adam On 09/06/2003 03:21 PM Dave Wood wrote: FINALLY! I still don't know what I did wrong in the first place, but after starting over with VeriSign, all is well now. I thought I'd share the (simple!) steps I took to get SSL running using keytool/tomcat in case anyone else might find this useful: # keytool -genkey -alias tomcat -keyalg RSA [enter a password and all necessary information, then just enter at next password prompt] # cp ~/.keystore ~/.keystore-backup # keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr [enter same password] [give contents of certreq.csr to VeriSign and wait for response...] [NOTE: when asked to select my server software, I chose apache since they didn't have Tomcat in their list...I don't know if this matters, but it worked] # keytool -import -trustcacerts -file intermediate.crt -alias root [enter same password] [NOTE: intermediate.crt is the file found here: http://www.verisign.com/support/install/intermediate.html] # keytool -import trustcacerts -file public.crt -alias tomcat [enter same password] [where public.crt is the certificate sent from VeriSign after they complete their approval process] [finally, edit ...tomcat/conf/server.xml and enable the SSL connector section, adding keystorePass=[password] as an attribute to the Factory tag] Hope this helps. Thanks to all who provided suggestions along the way. Dave -Original Message- From: Dave Wood [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 11:40 AM To: Tomcat Users List Subject: RE: SSL/Verisign Confusion Well, after all this, I just discovered that VeriSign will basically let you start over if it's within 30 days (which it is). So, for now, I'm going down this path. Just talked to someone at V/S who said it would take just a couple hours. Oh, and I made a BACKUP of my new keystore file this time that now contains a single keyEntry with the alias tomcat. I try to avoid being stupid in the same way more than once! :) As for the programmatic approach, FWIW, I started down that path as well, but somehow I had no private key entry in the keystore (best I can tell). Still not sure how I got in that messed up state. Thanks, Dave -Original Message- From: Christopher Williams [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 9:43 AM To: Tomcat Users List Subject: Re: SSL/Verisign Confusion Have you thought of manipulating the keystore programmatically? Here's what you'd do: 1. Open your existing keystore 2. Find the entry with your private key and (presumably) a temporary self-signed certificate. 3. Open the certificate you got from Versign. 4. Change the certificate in your key entry to your Verisign certificate. 5. Save and close the keystore. OpenSSL doesn't understand most of the Java keystore formats, although it can manipulate PKCS#12 files which Keytool can handle. If you download the BouncyCastle crypto provider, then you can use keytool to write PKCS#12 files as well. Also, if the person who originally posted the question doesn't feel up to monkeying around with the Keystore classes, I have some code that I can adapt to stick your Verisign certificate in your keystore. Get in touch with me personally and I'll see what I can do. - Original Message - From: Jay Garala [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, September 05, 2003 3:36 PM Subject: RE: SSL/Verisign Confusion NOTE: You cannot export private key from keystore. -Original Message- From: Dave Wood [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 10:32 AM To: Tomcat Users List Subject: RE: SSL/Verisign Confusion Thanks. With the exception of the openssl doc, I've been over these quite a bit. The result is the problem I've mentioned where keytool says it can't import my certificate because the alias already exists. After some help I got last night, I think the question boils down to this: * once I have extracted my private key from keytool (haven't done this yet), how do I take that key, the VeriSign intermediate certificate and my public key certificate and get them to play together. I'm hoping the openssl stuff will take care of this, because keytool doesn't really seem to recognize private keys as things that you can work with directly. Thanks again, Dave -Original Message- From: Jay Garala [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 7:12 AM To: 'Tomcat Users List' Subject: RE: SSL/Verisign Confusion Try the Java keytool help: http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html Tomcat how-to: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html If you have OpenSSL: http://forum.java.sun.com/thread.jsp?forum=2thread=4240 Jay -Original Message- From: Dave Wood [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 1:04 AM To: Tomcat Users List Subject: RE:
Re: SSL/Verisign Confusion
www.openssl.org is the website for OpenSSL. It's an open source implementation of SSL / TLS together with a tremendous amount of other stuff (such as X.509, S/MIME, every cryptographic algorithm you ever heard of). You can also use it to set up your own CA - it's not the easiest software to use as it takes a terrific number of command line switches, but it's probably more convenient than having to wait on Verisign and renew your certificates every couple of weeks. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, September 07, 2003 10:43 AM Subject: Re: SSL/Verisign Confusion Hi Dave, how much does it cost at Verisign, and how long is it valid for? And is this 'openssl' you mentioned a free alternative? Adam On 09/06/2003 03:21 PM Dave Wood wrote: FINALLY! I still don't know what I did wrong in the first place, but after starting over with VeriSign, all is well now. I thought I'd share the (simple!) steps I took to get SSL running using keytool/tomcat in case anyone else might find this useful: # keytool -genkey -alias tomcat -keyalg RSA [enter a password and all necessary information, then just enter at next password prompt] # cp ~/.keystore ~/.keystore-backup # keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr [enter same password] [give contents of certreq.csr to VeriSign and wait for response...] [NOTE: when asked to select my server software, I chose apache since they didn't have Tomcat in their list...I don't know if this matters, but it worked] # keytool -import -trustcacerts -file intermediate.crt -alias root [enter same password] [NOTE: intermediate.crt is the file found here: http://www.verisign.com/support/install/intermediate.html] # keytool -import trustcacerts -file public.crt -alias tomcat [enter same password] [where public.crt is the certificate sent from VeriSign after they complete their approval process] [finally, edit ...tomcat/conf/server.xml and enable the SSL connector section, adding keystorePass=[password] as an attribute to the Factory tag] Hope this helps. Thanks to all who provided suggestions along the way. Dave -Original Message- From: Dave Wood [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 11:40 AM To: Tomcat Users List Subject: RE: SSL/Verisign Confusion Well, after all this, I just discovered that VeriSign will basically let you start over if it's within 30 days (which it is). So, for now, I'm going down this path. Just talked to someone at V/S who said it would take just a couple hours. Oh, and I made a BACKUP of my new keystore file this time that now contains a single keyEntry with the alias tomcat. I try to avoid being stupid in the same way more than once! :) As for the programmatic approach, FWIW, I started down that path as well, but somehow I had no private key entry in the keystore (best I can tell). Still not sure how I got in that messed up state. Thanks, Dave -Original Message- From: Christopher Williams [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 9:43 AM To: Tomcat Users List Subject: Re: SSL/Verisign Confusion Have you thought of manipulating the keystore programmatically? Here's what you'd do: 1. Open your existing keystore 2. Find the entry with your private key and (presumably) a temporary self-signed certificate. 3. Open the certificate you got from Versign. 4. Change the certificate in your key entry to your Verisign certificate. 5. Save and close the keystore. OpenSSL doesn't understand most of the Java keystore formats, although it can manipulate PKCS#12 files which Keytool can handle. If you download the BouncyCastle crypto provider, then you can use keytool to write PKCS#12 files as well. Also, if the person who originally posted the question doesn't feel up to monkeying around with the Keystore classes, I have some code that I can adapt to stick your Verisign certificate in your keystore. Get in touch with me personally and I'll see what I can do. - Original Message - From: Jay Garala [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, September 05, 2003 3:36 PM Subject: RE: SSL/Verisign Confusion NOTE: You cannot export private key from keystore. -Original Message- From: Dave Wood [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 10:32 AM To: Tomcat Users List Subject: RE: SSL/Verisign Confusion Thanks. With the exception of the openssl doc, I've been over these quite a bit. The result is the problem I've mentioned where keytool says it can't import my certificate because the alias already exists. After some help I got last night, I think the question boils down to this: * once I have extracted my private key from keytool (haven't done this yet),
Re: I still don't understand the need for the connection between Apache and Tomcat
I still don't understand why is there a need for a connection between Apache and Tomcat since Tomcat can work on its own. Maybe this sheds some light on a few motivations http://jakarta.apache.org/tomcat/faq/connectors.html#integrate HTH, Yann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Running JSP....new to Tomcat 5.0
Hi, How can I setup the server configuration using TOMCAT Ver5.0? I follow the same method for TOMCAT Ver3.0 but it give error as below: SEVERE: Cannot find msg asso. with key stdContext.resourcesStart Document base does not exit or is not a readable directory What is the correct to initialize the docBase? My folder is stored in C:\SLF_proj. Where to put the code in server.xml? Thks!!! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to turn on the 'development' mode?
Hi, how could I turn on the 'development' mode, so that Tomcat checks everytime if the page has been updated and already been compiled? Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using OpenSSL to set up your own CA
Tons of people seem to have wondered whether they can use OpenSSL to set up their own CA and server certificates. The answer is most certainly and for people who've never encountered it before, I'll tell you how. SETTING UP YOUR CA --- Step 1. Go to www.openssl.org and download the source code. Even Windows users need to build it, so you'll need access to a C compiler. You may be able to get hold of prebuilt binaries on the web and you can certainly get hold of the GNU C compiler or you can use Borland and Microsoft compilers. There are good build instructions included with the source distribution, so I won't go into build details. Step 2. Create directories to hold your CA keys, your server keys and, if you want to use SSL client authentication, your client keys. For the sake of argument let's assume that these directories are called ssl/ca, ssl/server and ssl/client. Step 3. Create a private key and certificate request for your own CA: openssl req -new -newkey rsa:1024 -nodes -out ssl/ca/ca.csr -keyout ssl/ca/ca.key Step 4. Create your CA's self-signed certificate (note lasts one year - increase the days setting to whatever you want): openssl x509 -trustout -signkey ssl/ca/ca.key -days 365 -req -in ssl/ca/ca.csr -out ssl/ca/ca.pem WINDOWS USERS:If you copy the ca.pem file to ca.crt and edit the file so that the strings TRUSTED CERTIFICATE read CERTIFICATE, you can import your CA certificate into your trusted root certificates store. Step 5. Import the CA certificate into the JDK certificate authorities keystore: keytool -import -keystore $JAVA_JOME/jre/lib/security/cacerts -file ssl/ca/ca.pem -alias my_ca Windows users need to replace $JAVA_HOME with %JAVA_HOME%. Step 6. Create a file to hold your CA's serial numbers. This file starts with the number 2: echo 02 ssl/ca/ca.srl SETTING UP YOUR WEB SERVER Step 7. Create a keystore for your web server. keytool -genkey -alias tomcat -keyalg RSA -keysize 1024 -keystore ssl/server/server.ks -storetype JKS Step 8. Create a certificate request for your web server. keytool -certreq -keyalg RSA -alias tomcat -file ssl/server/server.csr -keystore ssl/server/server.ks You need to edit the certificate request file slightly. Open it up in a text editor and amend the text which reads NEW CERTIFICATE REQUEST to CERTIFICATE REQUEST Step 9. Have your CA sign your certificate request: openssl x509 -CA ssl/ca/ca.pem -CAkey ssl/ca/ca.key -CAserial ssl/ca/ca.srl -req -in ssl/server/server.csr -out ssl/server/server.crt -days 365 Step 10. Import your signed server certificate into your server keystore: keytool -import -alias tomcat -keystore ssl/server/server.ks -trustcacerts -file ssl/server/server.crt You should see a message Certificate reply was installed in keystore. Step 11. Import your CA certificate into your server keystore: keytool -import -alias my_ca -keystore ssl/server/server.ks -trustcacerts -file ssl/ca/ca.pem This step is only necessary if you wish to use SSL client authentication with Tomcat. Step 12. Set up an SSL connector for Tomcat. I assume that you know, or can find out, how to do this. Open up conf/server.xml in a text editor and search for the text keystoreFile. Ensure that the attribute value is the keystore you've created above. SETTING UP AN SSL CLIENT --- Step 13. Create a client certificate request: openssl req -new -newkey rsa:512 -nodes -out ssl/client/client1.req -keyout ssl/client/client1.key The common name of the client must match a user in Tomcat's user realm (e.g. an entry in conf/tomcat-users.xml). Step 14. Have your CA sign your client certificate. openssl x509 -CA ssl/ca/ca.pem -CAkey ssl/ca/ca.key -CAserial ssl/ca/ca.srl -req -in ssl/client/client1.req -out ssl/client/client1.pem -days 365 Step 15. Generate a PKCS12 file containing your server key and server certificate. openssl pkcs12 -export -clcerts -in ssl/client/client1.pem -inkey ssl/client/client1.key -out ssl/client/client1.p12 -name my_client_certificate Step 16. Import the PKCS12 file into your web browser to use as your client certificate and key. Repeat steps 13-16 as often as required. Step 17. Enable client certificate authentication in Tomcat. Open up conf/server.xml and search for the text clientAuth. Set the value of the attribute to true. I apologize in advance for any typing errors. Hopefully, it's all correct and you should all be able to get up to speed with OpenSSL. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Charset encoding issue
I've recently have a similar problem with spanish language. What OS are you running Tomcat on? What are your LOCALE settings? lima == lima [EMAIL PROTECTED] writes: lima Hi, guys. How are you ? I have a jsp page with some form lima fields. I don't know how is the right way to set the charset lima (because we're using portuguese characters). This is the only lima configuration that have worked for me : lima %@ page contentType=html/text; charset=UTF-8% lima (...) lima form (...) enctype=multipart/form-data lima Is it right ? Is there other way ? lima Thanks in advance. lima - lima To unsubscribe, e-mail: lima [EMAIL PROTECTED] For additional lima commands, e-mail: [EMAIL PROTECTED] -- +- | Francisco Vides Fernández [EMAIL PROTECTED] | Director técnico. | Teléfono fijo: 952 60 29 59 | Teléfono móvil: 661 67 32 73 | Fax: 952 60 29 59 | Dédalo Ingenieros http://www.dedaloingenieros.com/ | PGP: http://pgp.rediris.es:11371/pks/lookup?op=indexsearch=0x5AAE6285 +-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I still don't understand the need for the connection between Apache and Tomcat
Tomcat can act as a web server and serve static (html) pages as well as servlets and jsps, but tomcat is not as fast as apache web server. Another reason might be that most servers already have apache installed and also might already have multible sites including PHP pages. Regards, Amjad shahrour -Original Message- From: Anson Zeall [mailto:[EMAIL PROTECTED] Sent: Sunday, September 07, 2003 11:54 AM To: Tomcat Users List Subject: I still don't understand the need for the connection between Apache and Tomcat Dear people, I still don't understand why is there a need for a connection between Apache and Tomcat since Tomcat can work on its own. Regards, Anson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[3]: Charset encoding issue
Hi guys. I'll try to answer your questions : ((1)) I've found a message (at http://w6.metronet.com/~wjm/tomcat/2001/Mar/msg00547.html) that seems to explain this odd behaviour (but i'm not sure) : Tomcat follows the HTML standard, which explicitly declares that MIME type application/x-www-form-urlencoded is suitable ONLY for transferring ASCII (but will of course work for ISO 8859-1 as well). See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 It says: The content type application/x-www-form-urlencoded is inefficient for sending large quantities of binary data or text containing non-ASCII characters. The content type multipart/form-data should be used for submitting forms that contain files, non-ASCII data, and binary data. ((2)) Fernandez wrote : Fernandez I've recently have a similar problem with spanish language. Fernandez What OS are you running Tomcat on? What are your LOCALE settings? Anton wrote : Anton What browser are you using? Anton What OS are you on? Anton If it is Windows, what are the regional settings? Anton Is it an English or a localized version of Windows? Anton What language are you typing in? SO : Red Hat Linux 9 Browsers : Galeon e Mozilla Reg. Settings: English Keyboard Set.: English (internacional) Locale : Not modified. The JVM is using [us,EN], i think. But thats ok because i prefer to test my application without change locale to [pt,BR] (we never know when 2 webapp will run using differents locale settings) ((3)) I don't know why page contentType + form enctype multipart is the only working combination but its ok for me. I just would like to understand it :-| Thanks again, guys !!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I still don't understand the need for the connection between Apache and Tomcat
Oh thanks!.that solved my confusion =) -Original Message- From: Amjad Shahrour [mailto:[EMAIL PROTECTED] Sent: Sunday, September 07, 2003 7:26 PM To: 'Tomcat Users List' Subject: RE: I still don't understand the need for the connection between Apache and Tomcat Tomcat can act as a web server and serve static (html) pages as well as servlets and jsps, but tomcat is not as fast as apache web server. Another reason might be that most servers already have apache installed and also might already have multible sites including PHP pages. Regards, Amjad shahrour -Original Message- From: Anson Zeall [mailto:[EMAIL PROTECTED] Sent: Sunday, September 07, 2003 11:54 AM To: Tomcat Users List Subject: I still don't understand the need for the connection between Apache and Tomcat Dear people, I still don't understand why is there a need for a connection between Apache and Tomcat since Tomcat can work on its own. Regards, Anson - 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: I still don't understand the need for the connection between Apache and Tomcat
Yann Cébron wrote: I still don't understand why is there a need for a connection between Apache and Tomcat since Tomcat can work on its own. Maybe this sheds some light on a few motivations http://jakarta.apache.org/tomcat/faq/connectors.html#integrate HTH, Yann Yann, Thanks for that link. It has really good guidelines for both deployments. James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcate and Windows XP Question
Hi there, I installed Tomcate 5.0.9 on Windows XP Home edition. It seems the Tomcate starts sucessfully, but when I browse to http://127.0.0.1:8080, I get error message saying The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. Here is what I did: 1) I download and Install a Java Development Kit JDK1.3.1 an dinstalled it to C:\JDK1.3.1 2) I download and Installed the Tomcat 5 Binary Distribution to C:\jakarta-tomcat-5.0.9 3) I have set the following environment variables a: set variable JAVA_HOME to value: C:\JDK1.3.1 b: set variable CATALINA_HOME to value: C:\jakarta-tomcat-5.0.9 c: set variable JASPER_HOME to value: C:\jakarta-tomcat-5.0.9 d: set variable tomcat_home to value: C:\jakarta-tomcat-5.0.9 e: I added C:\JDK1.3.1;C:\jakarta-tomcat-5.0.9; to the Path variable 4) Start Up Tomcat 5 I the DOS window show the folloiwng: [INFO] Http11Protocol - -Initializing Coyote HT [INFO] Catalina - -Initialization processed in [INFO] StandardService - -Starting service Cata [INFO] StandardEngine - -Starting Servlet Engin [INFO] StandardHost - -Create Host deployer for [INFO] StandardHostDeployer - -Processing Conte \jakarta-tomcat-5.0.9\conf\Catalina\localhost\m [INFO] StandardHostDeployer - -Processing Conte \jakarta-tomcat-5.0.9\conf\Catalina\localhost\a [INFO] PropertyMessageResources - -Initializing LocalStrings', returnNull=true [INFO] PropertyMessageResources - -Initializing n.ActionResources', returnNull=true [INFO] PropertyMessageResources - -Initializing .ApplicationResources', returnNull=true [INFO] StandardHostDeployer - -Installing web a ets-examples from URL file:C:\jakarta-tomcat-5. [INFO] StandardHostDeployer - -Installing web a URL file:C:\jakarta-tomcat-5.0.9\webapps\ROOT [INFO] StandardHostDeployer - -Installing web a xamples from URL file:C:\jakarta-tomcat-5.0.9\w [INFO] StandardHostDeployer - -Installing web a t-docs from URL file:C:\jakarta-tomcat-5.0.9\we [INFO] Http11Protocol - -Starting Coyote HTTP/1 [INFO] ChannelSocket - -JK2: ajp13 listening on [INFO] JkMain - -Jk running ID=0 time=0/31 con jk2.properties [INFO] Catalina - -Server startup in 5218 ms I will appreacite If anyone can tell me what else shoud I do to run Tomcat on Windows XP Home edition. Thank You Az
Re: Tomcate and Windows XP Question
I installed Tomcate 5.0.9 on Windows XP Home edition. It seems the Tomcate starts sucessfully, but when I browse to http://127.0.0.1:8080, I get error message saying The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. Here is what I did: snip/ This looks allright Seems like you're having a network/proxy configuration problem. From RUNNING.txt in your TOMCAT installation directory: * 3) The 'localhost' machine isn't found. This could happen if you're behind a proxy. If that's the case, make sure the proxy configuration for your browser knows that you shouldn't be going through the proxy to access the localhost. In Netscape, this is under Edit/Preferences - Advanced/Proxies, and in Internet Explorer, Tools - Internet Options - Connections - LAN Settings. * Yann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem building mod_jk2 on Freebsd 4.8-RELEASE
Hi Dean, I have the same Apache and Tomcat versions on Redhat 9. I'm not sure if setup is the same but what I did was a lot shorter and worked, no probs, first you need the jk2 connectors file jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz untar it somewhere, then cd to the jk/native2 directory and do: ./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-tomcat41=/usr/local/tomcat/jakarta-tomcat-4.1.27 \ --with-apache2-lib=/usr/local/apache2/lib \ --with-apr-lib=/usr/local/apache2/lib --with-jni then make, then cp build/jk2/apache2/mod_jk2.so /usr/local/apache2/modules/ cp build/jk2/apache2/jkjni.so /usr/local/apache2/modules/ then ## from tomcat-docs/jk2/jk2/confighowto.html # Minimum configuration is the simplest one to make the JK2 working. The used channel will be socket, and lot of options are used by default. Both the Tomcat and web server are on the same computer. jk2.properties: # The default port is 8009 but you can use another one # channelSocket.port=8019 That is all needed on the Tomcat side to configure the JK2. workers2.properties: # Define the communication channel [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] info=Map the whole webapp Start the Tomcat and Web server and browse to the http://localhost/examples/ ### for me that worked hope this helps, kind regards, Luke On Mon, 2003-09-01 at 16:13, Dean Searle wrote: Hello All! I am new to this mailing list and somewhat new to Apache and Tomcat. I recently have rebuilt my server from the ground up and need to rebuild mod_jk2. Here is what I have so far: Freebsd 4.8 Release Apache 2.0.47 Tomcat 4.1.27 Ant 1.5.4 JDK 1.4.1p3_3 I was following the instructions outline in the book called Tomcat: The Definitive Guide by O'Reilly: ---BEGIN SNIPPET--- 1. Download a new source code release of jakarta-tomcat-connectors from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release. 2. Unpack the archive and change directory into the new jakarta-tomcat-connectors source directory: # gunzip jakarta-tomcat-connectors-4.1.24-src.tar.gz # tar xvf jakarta-tomcat-connectors-4.1.24-src.tar # cd jakarta-tomcat-connectors-4.1.24-src 3. Make sure that your PATH environment variable points to the bin/ directory of the latest release of Apache Ant. Download Ant from http://ant.apache.org and add $ANT_HOME/bin to your PATH if you haven't already: # PATH=$PATH:/usr/local/apache-ant-1.5.2 # export PATH # which ant /usr/local/apache-ant-1.5.2/bin/ant 4. Make sure that your JAVA_HOME environment variable is set and points to your JDK: # JAVA_HOME=/usr/local/jdk1.3.1_02 # export JAVA_HOME # echo $JAVA_HOME /usr/local/jdk1.3.1_02 5. Create a usable copy of the util/build.properties file: # cp util/build.properties.sample util/build.properties 6. Create a usable copy of the jk/build.properties file: # cp jk/build.properties.sample jk/build.properties 7. Edit the new jk/build.properties file, changing only the lines that apply to the Tomcat and Apache httpd versions that you have and want to use. For example, if you have Tomcat 4.1 and Apache httpd 2, change the following lines to point to where yours are installed (leave everything else in this file alone): tomcat41.home=/usr/local/jakarta-tomcat-4.1.24 apache2.home=/usr/local/apache2 8. Create a usable copy of the coyote/build.properties file: # cp coyote/build.properties.sample coyote/build.properties 9. Edit the new coyote/build.properties file, changing the value of catalina.home to point to your Tomcat installation directory: catalina.home=/usr/local/jakarta-tomcat-4.1.24 10. Run ant from the top level of the jakarta-tomcat-connectors source directory to build mod_jk2 and the Java side of the connector: # cd /usr/local/jakarta-tomcat-connectors-4.1.24-src # ant 11. If you're building on Linux, copy the linux headers into the root of the JDK's include directory (this will allow you to avoid a known build problem with mod_jk2 and Linux): # cd $JAVA_HOME/include # cp linux/* . 12. Build mod_jk2 by calling the native build target from within the jk directory: # cd jk # ant native ---END SNIPPET--- When I ran ant native here is the response I get: fbsd2# ant native Buildfile: build.xml jkant: [mkdir] Created dir: /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class es [mkdir] Created dir: /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class es/META-INF [mkdir] Created dir: /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/lib [javac] Compiling 17 source files to /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/class es [copy] Copying 1 file to
jdbc servlets and jsp
Hi, I'm having a few probs (fun) getting jdbc to work in servlets and jsp, tomcat in other words. I've successfully got jdbc working with postgresql in a regular java class. I have tried using the same code adapted to a servlet and jsp to get a database connection happening from there, however no luck, Is there anything I need to set up in server.xml or web.xml before it can work? here is my jsp and servlet code: jsp file -=-=-=-= html head /head %@ page language=java import=java.sql.* % body % Class.forName(org.postgresql.Driver); Connection myConn=DriverManager.getConnection(jdbc:postgresql:mboard, luke, ); % /body /html =-=-=-=-=-=-=-=-=-=-=-=-=-= servlet code =-=-=-=-=-=-=-=-=-=-=-=-=-= import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import java.text.DateFormat; /** * ShowEmployees creates an HTML table containing a list of all * employees (sorted by last name) and the departments to which * they belong. */ public class ShowEmployees extends HttpServlet { Connection dbConn = null; /** * Establishes a connection to the database. */ public void init() throws ServletException { String jdbcDriver = org.postgresql.Driver; String dbURL = \jdbc:postgresql:mboard\, \luke\, \\; try { Class.forName(org.postgresql.Driver).newInstance(); //load driver dbConn = DriverManager.getConnection(jdbc:postgresql:megaboard, luke, ); //connect } catch (ClassNotFoundException e) { throw new UnavailableException(JDBC driver not found: + jdbcDriver); } catch (SQLException e) { throw new UnavailableException(Unable to connect to: + dbURL); } catch (Exception e) { throw new UnavailableException(Error: + e); } } /** * Displays the employees table. */ public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/html); PrintWriter out = response.getWriter(); try { //join EMPLOYEE and DEPARTMENT tables to get all data String sql = select * from message;; Statement stmt = dbConn.createStatement(); ResultSet rs = stmt.executeQuery(sql); out.println(HTML); out.println(HEADTITLEShow Employees/TITLE/HEAD); out.println(BODY); out.println(TABLE BORDER=\1\ CELLPADDING=\3\); out.println(TR); out.println(THName/TH); out.println(THDepartment/TH); out.println(THPhone/TH); out.println(THEmail/TH); out.println(THHire Date/TH); out.println(/TR); while (rs.next()) { out.println(TR); out.println(TD + rs.getString(resusername) + /td); out.println(/TR); } out.println(/TABLE); out.println(/BODY/HTML); rs.close(); stmt.close(); } catch (SQLException e) { out.println(H2Database currently unavailable./H2); } out.close(); } } any help would be greatly appreciated. thanks, kind regards Luke -- when my computer smiles, I'm happy ===.~ ~, Luke Vanderfluit |'/'] Mobile: 0421 276 282\~/` - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet/JSP Lifecycle and Performance
AFAIK, no such benchmarks have been made. Once tomcat loads a servlet, it is loaded. Tomcat currently does not unload servlets due to lack of use. Is this the case with Tomcat 5? Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bit confused: Admin Tool vs Manager Application
THX, but where does 404 fit in. It's neither 3.3+ or 4.1+ TIA Bill Barker wrote: The 'admin' Context in 3.3.x is similar tothe 'manager' Context in 4.1.x. There are big difference when you get down to the specifics (e.g. 3.3 doesn't include Ant tasks), but in Big Picture terms, they do much the same thing from the HTML interface. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All. I'm on TC404, looking at manager configuration. Is Administration Tool only available in TC3.x? Is the Manager Applicatio only available in TC4.1+? Seems like TC404 is somewhere in between. - 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[4]: Charset encoding issue
Hello, Lima! lccb I've found a message (at lccb http://w6.metronet.com/~wjm/tomcat/2001/Mar/msg00547.html) : lccb Tomcat follows the HTML standard, Hmm.., to me it looks like a browser issue, not Tomcat. Hence its a bit OT here, but still we have started the discussion :-) (again, as I have suggested before, Lima, you may want to spy your browser-tomcat traffic to make sure what bytes are transferred exactly, then you'll be sure who is mangling the data: Tomcat or browser, my feeling is that this is browser) lccb which explicitly declares that MIME type lccb application/x-www-form-urlencoded is suitable ONLY for transferring ASCII practice seems to be different lccb (but will of course work for ISO 8859-1 as well). look, it's already funny: according to the standard application/x-www-form-urlencoded is suitable ONLY for transferring ASCII but according to this message the existing software will of course work for ISO 8859-1 did you enjoy this of course? ;-) lccb See lccb http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 lccb It says: lccb The content type application/x-www-form-urlencoded is inefficient lccb for sending large quantities of binary data or text containing non-ASCII lccb characters. The content type multipart/form-data should be used for lccb submitting forms that contain files, non-ASCII data, and binary data. Yup, but in practice I beleive that we have succeded many times to send cyrillics this way. The browser was running on Windows however. All the browsers (huh, do I remember it correctly?) were using windows-1251 and koi8-r when the page was encoded with the respective encoding). lccb SO : Red Hat Linux 9 I assume, both browser and Tomcat, right? lccb Browsers : Galeon e Mozilla lccb Reg. Settings: English lccb Keyboard Set.: English (internacional) lccb Locale : Not modified. The JVM is using [us,EN], i think. But thats lccb ok because i prefer to test my application without change lccb locale to [pt,BR] (we never know when 2 webapp will run using differents lccb locale settings) what language are you typing in? what kind of characters get mungled? lccb ((3)) I don't know why page contentType + form enctype multipart is lccb the only working combination but its ok for me. I just would like to lccb understand it :-| So do we :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bit confused: Admin Tool vs Manager Application
Tomcat 4.0.4 only has the 'manager' (which is similar to the 4.1.x 'manager' (but with fewer features), and the 3.3.x 'admin'). [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] THX, but where does 404 fit in. It's neither 3.3+ or 4.1+ TIA Bill Barker wrote: The 'admin' Context in 3.3.x is similar tothe 'manager' Context in 4.1.x. There are big difference when you get down to the specifics (e.g. 3.3 doesn't include Ant tasks), but in Big Picture terms, they do much the same thing from the HTML interface. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All. I'm on TC404, looking at manager configuration. Is Administration Tool only available in TC3.x? Is the Manager Applicatio only available in TC4.1+? Seems like TC404 is somewhere in between. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet/JSP Lifecycle and Performance
Lukas Bradley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] AFAIK, no such benchmarks have been made. Once tomcat loads a servlet, it is loaded. Tomcat currently does not unload servlets due to lack of use. Is this the case with Tomcat 5? Currently, yes. Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bit confused: Admin Tool vs Manager Application
Hi. Is it a simple mater of downloading some java code from jakarta.apache.org and putting it in the proper folder ? Does it require an upgrade from 404 to get the full functionalities? TIA :-) Bill Barker wrote: Tomcat 4.0.4 only has the 'manager' (which is similar to the 4.1.x 'manager' (but with fewer features), and the 3.3.x 'admin'). [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] THX, but where does 404 fit in. It's neither 3.3+ or 4.1+ TIA Bill Barker wrote: The 'admin' Context in 3.3.x is similar tothe 'manager' Context in 4.1.x. There are big difference when you get down to the specifics (e.g. 3.3 doesn't include Ant tasks), but in Big Picture terms, they do much the same thing from the HTML interface. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All. I'm on TC404, looking at manager configuration. Is Administration Tool only available in TC3.x? Is the Manager Applicatio only available in TC4.1+? Seems like TC404 is somewhere in between. - 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: Running JSP....new to Tomcat 5.0
Urm, there is almost nothing in common between setting up Tomcat 3.x and setting up Tomcat 5.x (except that the name of the 'server.xml' file has stayed the same ;-). Almost all of the directories have changed (with the exceptions of 'conf' and 'webapps'), the syntax of 'server.xml' is completely different, if you are using app-context.xml files the location has changed as well as the content. My advice is to go to http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html and re-learn how to setup Tomcat as though you never knew how to setup Tomcat 3.x. Amy Cheung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, How can I setup the server configuration using TOMCAT Ver5.0? I follow the same method for TOMCAT Ver3.0 but it give error as below: SEVERE: Cannot find msg asso. with key stdContext.resourcesStart Document base does not exit or is not a readable directory What is the correct to initialize the docBase? My folder is stored in C:\SLF_proj. Where to put the code in server.xml? Thks!!! __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcate and Windows XP Question
Is Tomcat running on port 8080 or is it 8180 like in TC4.1.27. It's tough to tell because your log message is partially cut off where it tells you which ports it's listening to. If I remember correctly the [INFO] Http11Protocol line should tell you which port it is listening to. snip [INFO] Http11Protocol - -Starting Coyote HTTP/1 [INFO] ChannelSocket - -JK2: ajp13 listening on [INFO] JkMain - -Jk running ID=0 time=0/31 con jk2.properties [INFO] Catalina - -Server startup in 5218 ms /snip Dean Searle Computing Oasis 989.245.7369 (p) 989.921.3904 (f) -Original Message- From: Yann Cébron [mailto:[EMAIL PROTECTED] Sent: Sunday, September 07, 2003 3:15 PM To: [EMAIL PROTECTED] Subject: Re: Tomcate and Windows XP Question I installed Tomcate 5.0.9 on Windows XP Home edition. It seems the Tomcate starts sucessfully, but when I browse to http://127.0.0.1:8080, I get error message saying The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. Here is what I did: snip/ This looks allright Seems like you're having a network/proxy configuration problem. From RUNNING.txt in your TOMCAT installation directory: * 3) The 'localhost' machine isn't found. This could happen if you're behind a proxy. If that's the case, make sure the proxy configuration for your browser knows that you shouldn't be going through the proxy to access the localhost. In Netscape, this is under Edit/Preferences - Advanced/Proxies, and in Internet Explorer, Tools - Internet Options - Connections - LAN Settings. * Yann - 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: Deployment problems in tomcat 4.1.27 : jdbc and properties files
Hi James, It is classes.jar and now it is being picked up when i kept it in \common\lib directory. But properties files(configuration files) for my web-app are not getting picked up. I have tried following ways one by one: 1. kept them in \WEB-INF\classes folder 2. kept them in \WEB-INF\lib 3. made the jar out of them and kept that jar in lib directory too but whenever my bootstrap code runs, it doesn't find these properties files. Code is : InputStream myStream = ClassLoader.getSystemResourceAsStream(framework.properties); or InputStream myStream = ClassLoader.getSystemResourceAsStream(/WEB-INF/properties/framework.propert ies); The same code was working in tomcat 3 where i used to specify classpath but not in tomcat 4.1.27 ? Please let me know what else can be done ? Thanks a lot Regards , Shailesh -Original Message- From: James Harman [mailto:[EMAIL PROTECTED] Sent: Saturday, September 06, 2003 9:05 AM To: Tomcat Users List Subject: Re: Deployment problems in tomcat 4.1.27 : jdbc and properties files Shailesh, Is it classes12.jar or classes12.zip? Your first post said zip. If it is zip make sure you rename it to jar. If you rename it to classes12.jar and put it in WEB-INF\lib it will be picked up. James Shailesh Modi wrote: Hi, I have kept classes12.jar in every possible places in tomcat 4 directory(C:\jakarta-tomcat-4.1.27\common\lib or C:\jakarta-tomcat-4.1.27\server\lib), but no help. Also keeping properties files into my web-app's WEB-INF/classes directory too not able to help me out. Alternatively, I have tried giving relative path (eg /WEB-INF/properties/framework.properties) , still my Loader class is not able to locate the framework properties file. InputStream myStream = ClassLoader.getSystemResourceAsStream(framework.properties); or InputStream myStream = ClassLoader.getSystemResourceAsStream(/WEB-INF/properties/framework.proper t ies); both are not working. One more thing, in tomcat 3 , I had modified server.xml by placing following code for authentication. RequestInterceptor className=com.remind.securetomcat.SecRealm debug=0 initCtx=com.sun.jndi.ldap.LdapCtxFactory ldapHost=ldap://ldap.mycompany.com:389; baseDn=ou=active,ou=employees,ou=people,o=mycompany.com maxDnAge=300 maxPwAge=6000 maxFilterAge=6000 / where as 'com.remind.securetomcat.SecRealm' is my class to authenticates user by ldap. Where should i place this tag in server.xml in tomcat 4.1.27 configuration to make this work? Thanks a Lot. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 2:54 PM To: Tomcat Users List Subject: RE: deployment problems in tomcat 4.1.27 It is sayed that property file should be in your classpath! So I allways put my property file under WEB-INF/classes/ directory which seems to be fine. I am using Struts, but I guess the Struts uses the same mechanism to access properties! As I understand your oracle12.zip is needed to startup tomcat server in this case it should be under %CATALINA_HOME%/server/lib directory. And I suggest to transfert it into .jar file! Atleast I am using mysql connector (it is in jar file) and I allways have to put it under %CATALINA_HOME%/server/lib directory to make my JDBC realm work! If your .jar file is needed only for your own application then WEB-INF/lib should do! Also there is %CATALINA_HOME%/common/ directory which has /lib directory where you can put different stuff. This stuff will be visible to all your web applications! For example appache suggeests to put different jars from their common project. ___ Living things are systems that tend to respond to changes in their environment, and inside themselves, in such a way as to promote their own continuation. Janis Olekss Exigen Latvia System Analyst (Office) +371 7072900 (Cell) +371 9136267 Shailesh Modi [EMAIL PROTECTED] 09/04/2003 12:20 Please respond to Tomcat Users List To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:RE: deployment problems in tomcat 4.1.27 Thanks Janis, it was great help. I am having another problem regarding classpath of tomcat. My application property files and oracle classes (classes12.zip) are not being picked up, when tomcat deploys my web app. my properties files are in /WEB-INF/properties folder and classes12.zip is in /WEB-INF/lib folder. I have tried putting classes12.zip in Tomcat's %CATALINA_HOME%/common/lib and my properties files in /WEB-INF/lib directory, but no help. At application startup , I am loading my properties file as InputStream myStream = ClassLoader.getSystemResourceAsStream(framework.properties); But myStream is getting null. This code was working fine in tomcat 3 (as we used to specify classpath to tomcat startup for properties files, jars and other