Re: .htaccess + htpasswd NOT working
Manu, Make sure that you have your apache config file set up with AllowOverride AuthConfig for your app dir. Manu Kits wrote: Hello: I am using Apache+Tomcat and would like to configure it for Authorization/Authentication. I read the article posted at http://httpd.apache.org/docs/howto/auth.html I made all the changes to my config to make it work. When I start my APache and point in my Browser https://My.IP.ADDR.ESS I simply get the html page What I wanted is a PROMPT for User to enter the UserName and Password (which was created by htaccess command) This is what I did: # htpasswd -c /usr/local/apache/passwd/passwords bill New password: gates Re-type new password: gates Adding password for user bill # My .htaccess file has following: AuthType Basic AuthName By Invitation Only AuthUserFile /usr/local/apache/passwd/passwords Require user bill Can anyone there help me out on how to get a UserPrompt when USers click my web site? THANKS! _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Zachary Kuhn Fusion Enterprises - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
new instalation missing startup scripts
Hi everyone. I just installed the 4.1.8 release of Tomcat via the linux binary RPM. However, when I go to /var/tomcat4/bin i have no startup scripts, only a couple jar files. The docs say the startup files should be there. Is there something I am missing? Zak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getting exception when trying to close connection
It would be halpful to see the declaration of con, and the type of driver you are using -Original Message- From: Christian J. Dechery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:41 AM To: [EMAIL PROTECTED] Subject: getting exception when trying to close connection I know my implementation isn't the best there is... take a look at this code: protected void finalize() { try { if( con!=null !con.isClosed() con.getAutoCommit() ) { con.close(); } } catch(SQLException sqle) { System.out.println([+this.getClass().getName()+] Não foi possível fechar a conexão. +sqle.toString()+\n); // sqle.printStackTrace(); } } that's what I use to TRY to close all connections... this code is in my DAO class. Sometimes I have up to four DAO classes instantiated in a single JSP... I debugged it... at least one always fails to close giving me this exception: I/O error: socket closed what does that mean? what socket? And why did all the other connections closed and this didn't? .:| Christian J. Dechery .:| FINEP - Depto. de Sistemas .:| [EMAIL PROTECTED] .:| (21) 2555-0332 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: getting exception when trying to close connection
OK well, a couple answers first. The socket that is being referred to is the underlying (usually tcp/ip) socket that your driver uses to connect to the database. A connection is an abstraction from what the implementation socket is. A couple things could be happening with your oracle driver. First, there can be an inactive timeout set on your oracle database, where connections are closed after a timeout period to free up resources. You would get the same error if for instance the server on the other end lost power, and therefore closed the connection by being turned off. The other thing is, your driver could have a timeout set. I haven't used the oracle driver extensively, so i'm not really sure how you configure it. Look in the docs. The other thing you want to do is separate out those three boolean statements so you can determine which one is failing. Checking for null is not going to throw the exception so pretty much focus on your last two. (and look at your driver configuration docs) you may want to try this method instead. static Connection getConnection(String url, Properties info); //Attempts to establish a connection to the given database URL. In properties, you can specify driver settings. Zak -Original Message- From: Christian J. Dechery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: RE: getting exception when trying to close connection ok... there you go: public DAOFundos(Esquema esq) { if( esq==null ) { esq = esquemaDefault; } try { Class.forName( esq.getDriver() ); con = DriverManager.getConnection(esq.getUrl(), esq.getUser(), esq.getPassword()); } catch(ClassNotFoundException cnf) { System.out.println (Erro: driver nao encontrado! +cnf.getMessage()); } catch(SQLException sql) { System.out.println(Erro ao obter conexão! +sql.getMessage() ); } } this is the code for the default constructor... in this case the class Esquema contains info about: drivers, user, url and pwd. the driver is always oracle.jdbc.driver.OracleDriver thanks again .:| Christian J. Dechery .:| FINEP - Depto. de Sistemas .:| [EMAIL PROTECTED] .:| (21) 2555-0332 [EMAIL PROTECTED] 11/06/02 16:03 It would be halpful to see the declaration of con, and the type of driver you are using -Original Message- From: Christian J. Dechery [ mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:41 AM To: [EMAIL PROTECTED] Subject: getting exception when trying to close connection I know my implementation isn't the best there is... take a look at this code: protected void finalize() try if( con!=null !con.isClosed() con.getAutoCommit() ) con.close(); } } catch(SQLException sqle) System.out.println([+this.getClass().getName()+] Não foi possível fechar a conexão. +sqle.toString()+\n); // sqle.printStackTrace(); } } that's what I use to TRY to close all connections... this code is in my DAO class. Sometimes I have up to four DAO classes instantiated in a single JSP... I debugged it... at least one always fails to close giving me this exception: I/O error: socket closed what does that mean? what socket? And why did all the other connections closed and this didn't? .:| Christian J. Dechery .:| FINEP - Depto. de Sistemas .:| [EMAIL PROTECTED] .:| (21) 2555-0332 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Memory Leak?
Have you tried explicitly saying new Outerclass.InnerClass() ? maybe that will help. Zak -Original Message- From: Jay Burgess [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:26 AM To: [EMAIL PROTECTED] Subject: RE: Memory Leak? Doesn't matter, you don't name an instance variable and a parameter the same thing.??? Unless I'm completely missing the point of your comment, Of course you can. I do it all the time, and it's in lots of books that way. Prefixing with this. separates the two variables. Your suggestion of looking at the generated code is a good one. Tomcat may have trouble parsing a JSP with an inner class, and be generating something different than what we'd expect. I don't see anything obviously wrong looking at the sample code. Jay -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Memory Leak?
I'm sorry, I don't have access to my tomcat server at the moment, but if you replace that String.valueOf(double) call to a Double.toString(double) does the same problem occur? I would also suggest you throw some printlines of that value out so you can more closely trace the problem. Zak -Original Message- From: Mark Shurgot [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 5:26 PM To: 'Tomcat Users List' Subject: RE: Memory Leak? We have narrowed it down to a simple test page. Try this out and see if you have the same problem. Attached is the test page, the correct results, and the corrupted results. Run the test page a few times. Take note that the first three or four times you access the page, all is fine. The fourth or fifth time the numbers are corrupt. If you change line# 26 to not check the String value of the double, the error never occurs. (This is the only way we could reproduce the error in such a simple page. The production versions that are having these errors are very large, complex pages with multiple data members in their inner classes: Strings, ints, doubles, etc.) Thanks everyone for you help! -Original Message- From: Zachary Kuhn [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:59 AM To: Tomcat Users List Subject: RE: Memory Leak? Have you tried explicitly saying new Outerclass.InnerClass() ? maybe that will help. Zak -Original Message- From: Jay Burgess [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:26 AM To: [EMAIL PROTECTED] Subject: RE: Memory Leak? Doesn't matter, you don't name an instance variable and a parameter the same thing.??? Unless I'm completely missing the point of your comment, Of course you can. I do it all the time, and it's in lots of books that way. Prefixing with this. separates the two variables. Your suggestion of looking at the generated code is a good one. Tomcat may have trouble parsing a JSP with an inner class, and be generating something different than what we'd expect. I don't see anything obviously wrong looking at the sample code. Jay -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat, mod_jk and Apache...again!
Tore, In order to help, please be more descriptive about your access restrictions, and the way you have set up your directories. Based on the things you have said so far, this may be your problem: Tomcat looks in its webapp directory for webapps to deploy. Even a single jsp page constitutes a webapp(albeit a simple one). I think you are missing this fundamental point of tomcat. Tomcat needs to look for your jsp pages, then compile them, and put them in a working directory where they can be served. It has no idea that there is such a place as /var/www/html, only a $TOMCAT_HOME/webapps directory. The only way you could let it know about /var/www/html would be to modify the xml config file. But it is much easier to just put your jsp pages in $TOMCAT_HOME/webapps, the way the system was designed. Sorry for any errors, but that is my understanding of it. Zak -Original Message- From: Tore Skogly [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 11:17 AM To: [EMAIL PROTECTED] Subject: Tomcat, mod_jk and Apache...again! I'll give it another try, and hope someone can help me in sorting this problem out... Due to access restrictions my jsp files are located with my static pages under the /var/www/html directory. I will use Apache 1.3.23 to serv my static pages. As I will not be deploying any webapps - only a few jsp pages - i would prefer to use mod_jk instead of mod_webapp. When I browse jsp pages located in /var/www/html they are displayed as pure text pages and not as html Please anyone - I have struggeled with this for several days - can anyone help?? This is what I have added in my httpd.conf file: LoadModule jk_module modules/mod_jk.so AddModule mod_jk.c Include /var/tomcat4/conf/auto/mod_jk.conf # Configure mod_jk # JkWorkersFile /var/tomcat4/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkMount /*.jsp ajp13 === This is my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/etc/httpd/modules/mod_jk.so/ !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Apache !-- Define a non-SSL HTTP/1.1 Connector on port 8180 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8180 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8543 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8109 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/etc/httpd/modules/mod_jk.so/ w are you today? Valve className=org.apache.catalina.valves.AccessLogValve directory=w are you today? logs prefix=localhost_access_log. suffix=.txt pattern=common/ !-- Logger shared by all Contexts related to this virtual host. By default (when using FileLogger), log files are created in the logs directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the directory attribute. Specify either a relative (to $CATALINA_HOME) or absolute path to the desired directory.-- Logger className=org.apache.catalina.logger.FileLogger directory=/var/log/httpd prefix=tomcat_localhost_log. suffix=.txt timestamp=true/ !-- Tomcat Manager Context -- Context path=/manager docBase=manager debug=0 privileged=true/ /Host /Engine /Service /Server -- regards, Tore Skogly -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat, mod_jk and Apache...again!
I haven't tried this yet, but you could just try linking your esternal jsp directoy into the webapps directory. in otherwords create a link $TOMCAT_HOME/webapps/yourapplication - /var/www/html/jsps -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 4:30 PM To: Tomcat Users List Subject: Re: Tomcat, mod_jk and Apache...again! Personally, I would like to have the choice to put my jsp/html/images etc. somewhere besides the tomcat installation directory. It's just one less hassle to deal with when you're upgrading tomcat. Tore Skogly tore.skogly@c2i To: Tomcat Users List [EMAIL PROTECTED] .netcc: Subject: Re: Tomcat, mod_jk and Apache...again! 05/10/2002 05:48 PM Please respond to Tomcat Users List Thanks for your help. It made things clearer to me. I am using ldap to allow only some users to access webpages in different directories. Therefore it would be easier for me to keep the jsp pages with my html stuff. I guess I could try to edit the server.xml file and set /var/www/html as my webapp directory, but I might have to settle with what you suggests - put them in the $TOMCAT_HOME/webapps directory. Thanks again for your assistance! ToreS - Original Message - From: Zachary Kuhn [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 8:36 PM Subject: RE: Tomcat, mod_jk and Apache...again! Tore, In order to help, please be more descriptive about your access restrictions, and the way you have set up your directories. Based on the things you have said so far, this may be your problem: Tomcat looks in its webapp directory for webapps to deploy. Even a single jsp page constitutes a webapp(albeit a simple one). I think you are missing this fundamental point of tomcat. Tomcat needs to look for your jsp pages, then compile them, and put them in a working directory where they can be served. It has no idea that there is such a place as /var/www/html, only a $TOMCAT_HOME/webapps directory. The only way you could let it know about /var/www/html would be to modify the xml config file. But it is much easier to just put your jsp pages in $TOMCAT_HOME/webapps, the way the system was designed. Sorry for any errors, but that is my understanding of it. Zak -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: My Tomcat server doesn't run??????
Hey your problem is a misspelling. In your message it says Using JAVA_HOME: D:\jd2sdk1.4.0 notice that this is the wrong spelling. It should be D:\j2sdk1.4.0 you have an extra d in there Zak -Original Message- From: Lecaros, Noel [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 10:37 AM To: 'Tomcat Users List' Subject: RE: My Tomcat server doesn't run?? You might have misspelled your JAVA_HOME, assuming this was a direct cut-and-paste from the command window. You also need to set CATALINA_HOME to your Tomcat install directory. Cheers, Sponks -Original Message- From: Suresh Akula [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 10:17 AM To: [EMAIL PROTECTED] Subject: RE: My Tomcat server doesn't run?? these are the steps i took 1)extracted jakarta-tomcat-4.0.3.zip onto D: drive 2)set environment variable JAVA_HOME = D:\j2sdk1.4.0 2)Run startup.bat from D:\jakarta-tomcat-4.0.3\bin folder I get the following error: D:\jakarta-tomcat-4.0.3\binstartup The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program The system cannot find the batch label specified - end Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CATALINA_TMPDIR: ..\temp Using JAVA_HOME: D:\jd2sdk1.4.0 *** My comment followed by error dialog -Djava.endorsed.dirs=(Title of the error dialog) windows can't find '-Djava.endorsed.dirs='.. make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search Once i click ok button on this error dialog i get the last error line on command prompt which is The system cannot find the file -Djava.endorsed.dirs=. I have no clue. My friend runs the same tomcat on windows 200 and it works fine. i doubt setting up variables in windows XP??? Please help me Thanks From: Lecaros, Noel [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: My Tomcat server doesn't run?? Date: Thu, 25 Apr 2002 13:02:53 -0400 Could you outline the steps you took? We can help you better if we knew exactly what you did. Cheers, Sponks -Original Message- From: Suresh Akula [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 9:54 AM To: [EMAIL PROTECTED] Subject: Re: My Tomcat server doesn't run?? I am beginner on tomcat..i havent got any solution yet..i am running tomcat server on windows XP and the error is JAVA_HOME is not defined..when i set that variable to the parent directory where my java is installed(JAVA_HOME = D:\j2sdk1.4.0) still it doesn't work but the error message is JAVA_HOME is not defined correctly..help on this is highly appreciated THANKS MUCH From: Suresh Akula [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: My Tomcat server doesn't run?? Date: Thu, 25 Apr 2002 15:17:28 + Hi All I have downloaded jakarta-tomcat-3.1.1.zip and installed tomcat onto my D:drive. When i start the tomcat server by clicking on D:\jakarta-tomcat\bin\starttup.bat ..server doesn't run..wut is the problem???. I tried to download the latest version jakarta-tomcat-4.0.3 it also had the same problem. I am using tomcat to implement SOAP services using XML.Can anyone help me why the server doesn't run.My aim is if server runs ..i will configure server to use apache soap and set the server classpath to use apache xerces and soap.jar to implement soap services using xml in tomcat.. Thanks much in advance _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]