RE: Oracle connection pooling
Hi Eric, I am executing as Stand-alone(my .class file out the tomcat), Is it possible to lookup for JNDI, As Tomcat running in the same machine. Thanks and Regards Uma Maheswara Rao Gudi Tata Consultancy Services Mailto: uma.g...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing "Hamacher, Eric" 02/13/2009 11:14 PM Please respond to "Tomcat Users List" To Tomcat Users List cc Subject RE: Oracle connection pooling I was just putting some fake values there. But I got around the problem (although I can't remember how) Now I put: into META-INF/context.xml. The type "javax.sql.DataSource" didn't work. Now when I call getConnection() on the OracleDataSource I get: java.sql.SQLException: User credentials doesn't match the existing ones at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:258) at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:314) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159) This looks like an Oracle problem. Thanks for all your help!! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Thursday, February 12, 2009 4:27 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling Yeah -- looked like an odd port to me, too -- I've only seen 1521, 1526 and 1527 before. I figured his SID was just a generic placeholder for his real SID. -Original Message- From: Jorge Medina [mailto:jmed...@e-dialog.com] Sent: Thursday, February 12, 2009 4:12 PM To: Tomcat Users List Subject: RE: Oracle connection pooling Is your Oracle database port and is the name of your SID "SID"? We use Oracle jdbc driver with Oracle 10g. I set the attributes on the resource to: type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" and no factory -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, February 12, 2009 3:52 PM To: users@tomcat.apache.org Subject: Oracle connection pooling Hello: I am in a bind. I am getting: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:351) at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66) at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137) at util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7 8) when I add: to either server.xml (under ), config/context.xml (under ), or in META-INF/context.xml. Here's what these files look like when I place in them: ** SERVER.XML *** *** CONFIG/CONTEXT.XML *** WEB-INF/web.xml *** META-INF/CONTEXT.XML *** Here is the offending code: Context context = new InitialContext(); DataSource pds = null; pds = (DataSource)context.lookup("jdbc/GFDataSource"); Connection conn = pds.getConnection(); context.close(); I have tried java:comp/env/jdbc/GFDataSource as well. I am using ojdbc14dms.jar and dms.jar. J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.o
RE: accepting requests from outside the host?
> I can't telnet or ping. Our ISP sysadmin disabled those on > the firewall. Nice guy. He said it was a security precaution. Actually I don't blame him. > Someone else said I need to bind it to the ipaddr of the box > (OpenSolaris btw), but I'm not sure how to do that. Set the address attribute of your element(s) in conf/server.xml to the desired IP address: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html Ah... I see what the problem was. I had the port set to 8080 but the port was still set to 80. Once I set the Connector port to 8080, I got in. Thanks for your help Chuck! I owe you one. Frank G. -- +==+ | Crossroads Technologies Inc. | | www.CrossroadsTech dot com | | fgreco at REMOVEtheX!cross!roads!tech!dotXcom| +==+ -- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Failed installing 'Tomcat5' service
No, it is my 1st Tomcat Service. Len Popp wrote: > > Is there another version of Tomcat (5.0 or 6.0) already installed? I > have seen that error when installing two different versions of Tomcat > because both versions try to use the same name for the service, which > is not allowed. > -- > Len > > > > On Thu, Feb 12, 2009 at 17:15, boraldo wrote: >> >> Please help me with this problem. >> From this message I even can't understand what is going wrong. >> >> I'm installing Tomcat 5.5.17 as a Service on Windows Vista Home Basic >> -- >> View this message in context: >> http://www.nabble.com/Failed-installing-%27Tomcat5%27-service-tp21986081p21986081.html >> Sent from the Tomcat - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/Failed-installing-%27Tomcat5%27-service-tp21986081p22008399.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Weblogic library and Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 2/12/2009 10:12 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: Weblogic library and Tomcat >> >> log4j:ERROR LogMananger.repositorySelector was null likely >> due to error in class reloading, using NOPLoggerRepository. >> >> I'm a little unclear as to whether that log4j error message is coming >> from Tomcat trying to shut down log4j or what. log4j.jar is only >> available in my webapp's WEB-INF/lib directory. > > It's likely from having this system property: > org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES > set to true (the default). > > [http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Other] Heh. From the docs: " There have been some issues reported with log4j when this option is true. " There is hope, though: " Applications without memory leaks using recent JVMs should operate correctly with this option set to false. " Just like every other member of the list, my webapp absolutely positively without a question has no memory leaks at all. No, sir-ee! Not me! :) > https://issues.apache.org/bugzilla/show_bug.cgi?id=41939 I think this guy has the problem nailed: https://issues.apache.org/bugzilla/show_bug.cgi?id=43867#c39 I am also using struts-validator which is why I'm getting the message he outlines. It's odd that the class appears to be re-initialized, though. I'll have to do some more reading - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmWGqwACgkQ9CaO5/Lv0PD34gCfaqPJ1uNsbwOVspUw8K/MHLlf psgAn2Sm8XjPWCa8G8lXMdgY44Xw805m =fDD7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat admin console set values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Srinivas, On 2/13/2009 12:21 PM, Srinivas Jonnalagadda wrote: > Sorry for not mentioning. I am using tomcat 5.5.9 on a solaris > machine and 5.5.27 on a windows machine. I tried to set the JnDi > DataSource and i was successful on 5.5.27 windows version. I already > had the same settings in my context.xml so got a [question] regarding > location where the values i set thru admin console of Admin web app > are persisted. For example in a properties file. That's exactly the point: they are NOT PERSISTED AT ALL. No properties file. No JNDI directory. No text file. No database. It's all in memory. When you shut down Tomcat, it's gone. Feel free to patch it yourself, but the TC devs have completely abandoned the admin webapp. You should stick to editing the server.xml file by hand. Oh, and your JNDI resources are better-off in context.xml files, anyway. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmWFc4ACgkQ9CaO5/Lv0PC5XwCdEpcc+34rJoo0FKyfsYOVh16Q 72sAn3WRhLRxIEUJwBC1N5vv2uf1MFex =TmV/ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
filter debugging or logging?
Is there a logger that can emit information about when servlet filters are invoked? I'm having trouble with some filters and it feels like I'm completely blind and unable to see what's going on. I have multiple filters that have been provided by 3rd party libraries and it is very difficult to know when they are invoked, and in what order. I've resorted to adding log messages to some of the various 3rd party libraries and recompiling them, but this doesn't seem like the right way to go about things. I'd primarily like to know when doFilter() is invoked (along with the name of the filter). I think this would be enough to follow the chains. Thanks, Brad -- View this message in context: http://www.nabble.com/filter-debugging-or-logging--tp22007573p22007573.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AJP13 Connector and JKOptions
I have a Tomcat application that happily serves up a web app when I use a URL like this: http://www.mywebsite.com:8080/MyAPP Which I wanted to change to this: http://www.mywebsite.com/MyAPP Using Apache I added the worker.properties file and the following directives to an existing Apache server that has been serving several sites. #Tomcat Settings # Mount the worker containing MyAPP JKMount /MyAPP myappw # Globally deny access to the WEB-INF directory AllowOverride None deny from all The pages display but none of the images display and several of the webapps links are broken. So, something isn't quite right. It is almost as though the application links aren't relative to the correct root. I read through the JKOptions for Apache but can't tell if I need to add one or more options to allow the links to correctly display. Using Tomcat 5.5 and Apache 2.2 any hints would be appreciated. I have connected Apache and Tomcat using AJP13 on a different server and I had no problems. The only difference here is that I am not using a virtual hosts entry to route to the Tomcat site because this app will display at the same URL/port as all the other applications in Apache. Thanks, Pete - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WebdavServlet + custom DirContext = unexpected behaviour
Can anyone help me with this? I'm completely stuck! I have a Tomcat 6.0.18 installation with WebdavServlet enabled. If I use the following file, WebDAV works OK: type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="..." username="..." password="..." maxActive="20" maxIdle="10" maxWait="-1"/> However, I want to use WebDAV to access a database, so I've written my own DirContext. I declare the DirContext as a handler in the file as follows: type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="..." username="..." password="..." maxActive="20" maxIdle="10" maxWait="-1"/> But when I do this, WebdavServlet is ignored and HTTP sessions are created with HttpServlet / DefaultServlet, which fail, of course, because they know nothing about WebDAV. The handler seems effectively to make WebdavServlet invisible... I've googled for just about every combination of dirContext, classloader, Tomcat 6, resources, context.xml, WebdavServlet. There are 2 people who have asked before about how to access a database from WebdavServlet, but no answers. I guess I'm missing something dead simple, but I don't know what to look for. Steve On 13 Feb 2009, at 13:33, Stephen Winnall wrote: Thanks for your feedback. On 13 Feb 2009, at 05:04, Caldarale, Charles R wrote: From: Stephen Winnall [mailto:st...@winnall.ch] Subject: WebdavServlet + custom DirContext = unexpected behaviour My Tomcat is as installed by NetBeans 6.5, that is with a separate CATALINA_HOME and CATALINA_BASE. I'd strongly recommend that you first learn how to run Tomcat directly, outside of any IDE, before muddying the picture with an extra layer of obfuscation. Problem solving will be much simpler. Fair comment. So I have now installed Tomcat 6.0.18 from scratch. I modified $CATALINA_BASE/conf/catalina.properties to make common.loader look also in $CATALINA_BASE/common/lib and I put DBDirContext and supporting cast into there. Now you've already gone off the deep end; that's not something you should have to (or want to) do. By default, there is no common/lib in Tomcat 6.0, and you don't need to resurrect the past. Any jars or classes Tomcat needs access to should be in Tomcat's lib directory, nowhere else. If you provide a replacement for the default handler, it must go into Tomcat's lib directory, since it's used by Tomcat, not the webapp. I did originally put everything into $CATALINA_HOME/lib. However, I like to keep my stuff separate from the base product, which is why I had created a separate folder. However, with my new installation I put DBDirContext and friends into $CATALINA_HOME/lib as you suggest. When I started up the new installation, I got exactly the same behaviour as before. The Tomcat documentation suggests that changing the to something other than the filesystem results in Tomcat not being able to read files it needs: Not true - it says the *webapp* won't be able to access the file system; it says nothing about Tomcat's ability to do so. Thanks, that has cleared up an uncertainty for me. do I have to make a hybrid DBDirContext that gets the files Tomcat needs from the filesystem and the data I want from the database? I don't think so. Start over with a clean Tomat install (not the one bundled with the IDE) and go from there. Done that and there's no change in behaviour. When I switch on the handler, the OPTIONS request is apparently handled out of HttpServlet; when I switch it off, it is handled out of WebdavServlet. Steve - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Resource JDBC connection pooling USING LDAP
I have found lot of examples on how to set up JDBC connection pooling using the tags in context.xml. My goal is to NOT embed the database connection user name, password, or even server url like it is shown below. I have the ApacheDS LDAP server set up, and would like to retrieve the credentials/server from that. Is there a way to get the entire URL string from LDAP? Is there some other way to do what I would like to do? Would I have to write my own Resource Factory? -- View this message in context: http://www.nabble.com/Resource-JDBC-connection-pooling-USING-LDAP-tp22005711p22005711.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Access Valve
Mohit Anchlia wrote: Currently we are logging in default format. Is it possible to add "Xforwarded by" info to default logging. Here is the config: Mohit, the Tomcat on-line documentation describes that Valve. Go have a look. I'll be nice and even give you the link : http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Oracle connection pooling
I guess I'm not sure why...I have all kinds of packages and stored procs in mine, and yet I'm never using Oracle-specific classes. It's probably too lengthy an explanation for you as to why you have to or need to use them. -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Friday, February 13, 2009 1:55 PM To: Tomcat Users List Subject: RE: Oracle connection pooling Thanks, I was able to get connections that way. However, I use Oracle-specific classes like: oracle.jdbc.OracleTypes; oracle.jdbc.internal.OracleCallableStatement; oracle.sql.ARRAY; oracle.sql.ArrayDescriptor; which require Oracle-specific connections. I've filed a Service Request with MetaLink to see if Oracle folks know what to do. I had the exact same problems with jBoss, too. The remedy there was to put jBoss-specfic code in the application - not an option with us. J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Friday, February 13, 2009 12:12 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling For factory, I have factory org.apache.commons.dbcp.BasicDataSourceFactory type="javax.sql.DataSource"/> I'd try taking out that line you have -- type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" And switch up accordingly. See if that doesn't work. -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Friday, February 13, 2009 11:45 AM To: Tomcat Users List Subject: RE: Oracle connection pooling I was just putting some fake values there. But I got around the problem (although I can't remember how) Now I put: into META-INF/context.xml. The type "javax.sql.DataSource" didn't work. Now when I call getConnection() on the OracleDataSource I get: java.sql.SQLException: User credentials doesn't match the existing ones at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:258) at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:314) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159) This looks like an Oracle problem. Thanks for all your help!! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Thursday, February 12, 2009 4:27 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling Yeah -- looked like an odd port to me, too -- I've only seen 1521, 1526 and 1527 before. I figured his SID was just a generic placeholder for his real SID. -Original Message- From: Jorge Medina [mailto:jmed...@e-dialog.com] Sent: Thursday, February 12, 2009 4:12 PM To: Tomcat Users List Subject: RE: Oracle connection pooling Is your Oracle database port and is the name of your SID "SID"? We use Oracle jdbc driver with Oracle 10g. I set the attributes on the resource to: type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" and no factory -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, February 12, 2009 3:52 PM To: users@tomcat.apache.org Subject: Oracle connection pooling Hello: I am in a bind. I am getting: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:351) at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66) at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137) at util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7 8) when I add: to either server.xml (under ), config/context.xml (under ), or in META-INF/context.xml. Here's what these files look like when I place in them: ** SERVER.XML *
RE: Oracle connection pooling
Eric- the serviceID in your connect string should match the supplied SID from %ORACLE_HOME%/network/admin/tnsnames.ora if no SID is supplied Oracle takes the TNS entryname e.g. contents of %TOMCAT_HOME%/network/admin/tnsnames.ora FOOBAR = .. (SID=FOOBAR2) the SID is FOOBAR2 if SID is not present SID is assigned FOOBAR As a quick check go to sqlplus login with supplied username/password (verify credentials for current TNS) HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > From: eric_hamac...@gallup.com > To: users@tomcat.apache.org > Date: Fri, 13 Feb 2009 11:44:43 -0600 > Subject: RE: Oracle connection pooling > > I was just putting some fake values there. > > But I got around the problem (although I can't remember how) Now I put: > > type="oracle.jdbc.pool.OracleDataSource" > factory="oracle.jdbc.pool.OracleDataSourceFactory" > connectionCachingEnabled="true" > maxActive="30" > maxIdle="2" > maxWait="1000" > username="username" > password="password" > driverClassName="oracle.jdbc.driver.OracleDriver" > url="jdbc:oracle:thin:@server:port:SID"/> > > into META-INF/context.xml. The type "javax.sql.DataSource" didn't work. Now > when I call getConnection() on the OracleDataSource I get: > > java.sql.SQLException: User credentials doesn't match the existing ones > at > oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) > at > oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) > at > oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) > at > oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:258) > at > oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:314) > at > oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286) > at > oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) > at > oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159) > > This looks like an Oracle problem. > > Thanks for all your help!! > > J. ERIC HAMACHER > Software Application Developer > 608.664.3859 > 8476 Greenway Boulevard > Suite 100 > Middleton, WI 53562 > USA > GALLUP Technology > > Achiever | Learner | Restorative | Intellection | Deliberative > > -Original Message- > From: Propes, Barry L [mailto:barry.l.pro...@citi.com] > Sent: Thursday, February 12, 2009 4:27 PM > To: 'Tomcat Users List' > Subject: RE: Oracle connection pooling > > Yeah -- looked like an odd port to me, too -- I've only seen 1521, 1526 > and 1527 before. > I figured his SID was just a generic placeholder for his real SID. > > -Original Message- > From: Jorge Medina [mailto:jmed...@e-dialog.com] > Sent: Thursday, February 12, 2009 4:12 PM > To: Tomcat Users List > Subject: RE: Oracle connection pooling > > > Is your Oracle database port and is the name of your SID "SID"? > > We use Oracle jdbc driver with Oracle 10g. > I set the attributes on the resource to: >type="javax.sql.DataSource" >driverClassName="oracle.jdbc.OracleDriver" > and no factory > > > -Original Message- > From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] > Sent: Thursday, February 12, 2009 3:52 PM > To: users@tomcat.apache.org > Subject: Oracle connection pooling > > Hello: > > I am in a bind. > > I am getting: > > javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at > org.apache.naming.NamingContext.lookup(NamingContext.java:770) > at org.apache.naming.NamingContext.lookup(NamingContext.java:153) > at > org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) > at javax.naming.InitialContext.lookup(InitialContext.java:351) > at > survey.db.SurveyConnection.getConnection(SurveyConnection.java:66) > at > util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137) > at > util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7 > 8) > > when I add: > >type="oracle.jdbc.pool.OracleDataSource" > factory="oracle.jdbc.pool.OracleDataSourceFactory" > connectionCachingEnabled="true" > maxActive="30" > maxIdle="2" > maxWait="1000" > username="GLP_S
RE: Oracle connection pooling
Thanks, I was able to get connections that way. However, I use Oracle-specific classes like: oracle.jdbc.OracleTypes; oracle.jdbc.internal.OracleCallableStatement; oracle.sql.ARRAY; oracle.sql.ArrayDescriptor; which require Oracle-specific connections. I've filed a Service Request with MetaLink to see if Oracle folks know what to do. I had the exact same problems with jBoss, too. The remedy there was to put jBoss-specfic code in the application - not an option with us. J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Friday, February 13, 2009 12:12 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling For factory, I have factory org.apache.commons.dbcp.BasicDataSourceFactory type="javax.sql.DataSource"/> I'd try taking out that line you have -- type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" And switch up accordingly. See if that doesn't work. -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Friday, February 13, 2009 11:45 AM To: Tomcat Users List Subject: RE: Oracle connection pooling I was just putting some fake values there. But I got around the problem (although I can't remember how) Now I put: into META-INF/context.xml. The type "javax.sql.DataSource" didn't work. Now when I call getConnection() on the OracleDataSource I get: java.sql.SQLException: User credentials doesn't match the existing ones at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:258) at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:314) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159) This looks like an Oracle problem. Thanks for all your help!! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Thursday, February 12, 2009 4:27 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling Yeah -- looked like an odd port to me, too -- I've only seen 1521, 1526 and 1527 before. I figured his SID was just a generic placeholder for his real SID. -Original Message- From: Jorge Medina [mailto:jmed...@e-dialog.com] Sent: Thursday, February 12, 2009 4:12 PM To: Tomcat Users List Subject: RE: Oracle connection pooling Is your Oracle database port and is the name of your SID "SID"? We use Oracle jdbc driver with Oracle 10g. I set the attributes on the resource to: type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" and no factory -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, February 12, 2009 3:52 PM To: users@tomcat.apache.org Subject: Oracle connection pooling Hello: I am in a bind. I am getting: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:351) at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66) at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137) at util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7 8) when I add: to either server.xml (under ), config/context.xml (under ), or in META-INF/context.xml. Here's what these files look like when I place in them: ** SERVER.XML *** *** CONFIG/CONTEXT.XML *** WEB-INF/web.xml *** META-INF/CONTEXT.XML *** Here is the offending code: Context context = new InitialContext(); DataSource pds = null;
Re: Tomcat unexpectedly shuts down
Adlane ACHAB wrote: > hi, below is my tomcat config > > Tomcat VersionJVM VersionJVM VendorOS NameOS VersionOS ArchitectureApache > Tomcat/6.0.181.6.0-b105Sun Microsystems Inc.Linux2.6.23.12i386 > > > Essentially what happens is this: > > The server is running along fine, and then all of a sudden, for no apparent > reason that we can find, the server shuts down. The timing does not seem to > coincide with any stack trace. > > Just Tomcat service terminated unexpectedly. I did see something like this, quite some time ago. Details differ a lot; the env was Tomcat 4.something, running on Solaris. However the symptoms did match: the Tomcat process just disappeared. What did help in our case was to wrap the startup in another layer of scripts which did redirect all the standard file descriptors to/from specified files (or /dev/null in case of standard input), and additionally start tomcat under "nohup" (protected from session hangup signal). What we suppose did happen: - admin started the tomcat (on a shell session) - the shell session was forgotten open, and the corresponding TCP connection later timed out at firewall - at some point some piece of code attempted to write to System.out or System.err, or read from System.in - this activity caused the machine TCP layer to notice that the TCP connection was not valid any longer, and so the shell from which Tomcat was started (and the Tomcat process, too) did get a hangup signal, causing both the shell and Tomcat to just stop and exit We could never positively prove the above, but that would suit the symptoms, and also the above would be something for which our cure would be effective. -- ..Juha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: accepting requests from outside the host?
> From: Frank D. Greco [mailto:fgr...@crossroadstech.com] > Subject: RE: accepting requests from outside the host? > > I took a look at the tomcat process on my box and it has this: > sockname: AF_INET6 :::127.0.0.1 port: 8080 That's not pretty. Must be some odd rules in place here (besides the IPv6). Is IPv4 disabled on this box? The current JVM levels can't run IPv6 only. > I can't telnet or ping. Our ISP sysadmin disabled those on > the firewall. Nice guy. > Someone else said I need to bind it to the ipaddr of the box > (OpenSolaris btw), but I'm not sure how to do that. Set the address attribute of your element(s) in conf/server.xml to the desired IP address: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html What version of Tomcat are you using, and what JRE/JDK? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Access Valve
Currently we are logging in default format. Is it possible to add "Xforwarded by" info to default logging. Here is the config: - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
catalina.out
Is there a way to just log SEVERE or ERROR messages to catalina.out? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Oracle connection pooling
For factory, I have factory org.apache.commons.dbcp.BasicDataSourceFactory type="javax.sql.DataSource"/> I'd try taking out that line you have -- type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" And switch up accordingly. See if that doesn't work. -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Friday, February 13, 2009 11:45 AM To: Tomcat Users List Subject: RE: Oracle connection pooling I was just putting some fake values there. But I got around the problem (although I can't remember how) Now I put: into META-INF/context.xml. The type "javax.sql.DataSource" didn't work. Now when I call getConnection() on the OracleDataSource I get: java.sql.SQLException: User credentials doesn't match the existing ones at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:258) at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:314) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159) This looks like an Oracle problem. Thanks for all your help!! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Thursday, February 12, 2009 4:27 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling Yeah -- looked like an odd port to me, too -- I've only seen 1521, 1526 and 1527 before. I figured his SID was just a generic placeholder for his real SID. -Original Message- From: Jorge Medina [mailto:jmed...@e-dialog.com] Sent: Thursday, February 12, 2009 4:12 PM To: Tomcat Users List Subject: RE: Oracle connection pooling Is your Oracle database port and is the name of your SID "SID"? We use Oracle jdbc driver with Oracle 10g. I set the attributes on the resource to: type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" and no factory -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, February 12, 2009 3:52 PM To: users@tomcat.apache.org Subject: Oracle connection pooling Hello: I am in a bind. I am getting: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:351) at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66) at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137) at util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7 8) when I add: to either server.xml (under ), config/context.xml (under ), or in META-INF/context.xml. Here's what these files look like when I place in them: ** SERVER.XML *** *** CONFIG/CONTEXT.XML *** WEB-INF/web.xml *** META-INF/CONTEXT.XML *** Here is the offending code: Context context = new InitialContext(); DataSource pds = null; pds = (DataSource)context.lookup("jdbc/GFDataSource"); Connection conn = pds.getConnection(); context.close(); I have tried java:comp/env/jdbc/GFDataSource as well. I am using ojdbc14dms.jar and dms.jar. J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: accepting requests from outside the host?
Thanks for the response Chuck. I took a look at the tomcat process on my box and it has this: sockname: AF_INET6 :::127.0.0.1 port: 8080 Basically, its localhost. I can't telnet or ping. Our ISP sysadmin disabled those on the firewall. Someone else said I need to bind it to the ipaddr of the box (OpenSolaris btw), but I'm not sure how to do that. Frank > Can someone pls point me in the right direction on > how to configure tomcat to accept browser requests > from outside the box? No configuration necessary - unless you changed something in server.xml, To= mcat binds to 0.0.0.0, so it listens on all IP addresses configured for the= box it's running on. There very likely *is* a firewall blocking port 8080= somewhere between your browser and the Tomcat system - it might even be on= your XP box at home. Can you reach the target system with a ping? -- +==+ | Crossroads Technologies Inc. | | www.CrossroadsTech dot com | | fgreco at REMOVEtheX!cross!roads!tech!dotXcom| +==+ -- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Oracle connection pooling
I was just putting some fake values there. But I got around the problem (although I can't remember how) Now I put: into META-INF/context.xml. The type "javax.sql.DataSource" didn't work. Now when I call getConnection() on the OracleDataSource I get: java.sql.SQLException: User credentials doesn't match the existing ones at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:258) at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:314) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159) This looks like an Oracle problem. Thanks for all your help!! J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Thursday, February 12, 2009 4:27 PM To: 'Tomcat Users List' Subject: RE: Oracle connection pooling Yeah -- looked like an odd port to me, too -- I've only seen 1521, 1526 and 1527 before. I figured his SID was just a generic placeholder for his real SID. -Original Message- From: Jorge Medina [mailto:jmed...@e-dialog.com] Sent: Thursday, February 12, 2009 4:12 PM To: Tomcat Users List Subject: RE: Oracle connection pooling Is your Oracle database port and is the name of your SID "SID"? We use Oracle jdbc driver with Oracle 10g. I set the attributes on the resource to: type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" and no factory -Original Message- From: Hamacher, Eric [mailto:eric_hamac...@gallup.com] Sent: Thursday, February 12, 2009 3:52 PM To: users@tomcat.apache.org Subject: Oracle connection pooling Hello: I am in a bind. I am getting: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:351) at survey.db.SurveyConnection.getConnection(SurveyConnection.java:66) at util.LoadDropdownListener.loadAllCodes(LoadDropdownListener.java:137) at util.LoadDropdownListener.contextInitialized(LoadDropdownListener.java:7 8) when I add: to either server.xml (under ), config/context.xml (under ), or in META-INF/context.xml. Here's what these files look like when I place in them: ** SERVER.XML *** *** CONFIG/CONTEXT.XML *** WEB-INF/web.xml *** META-INF/CONTEXT.XML *** Here is the offending code: Context context = new InitialContext(); DataSource pds = null; pds = (DataSource)context.lookup("jdbc/GFDataSource"); Connection conn = pds.getConnection(); context.close(); I have tried java:comp/env/jdbc/GFDataSource as well. I am using ojdbc14dms.jar and dms.jar. J. ERIC HAMACHER Software Application Developer 608.664.3859 8476 Greenway Boulevard Suite 100 Middleton, WI 53562 USA GALLUP Technology Achiever | Learner | Restorative | Intellection | Deliberative - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat admin console set values
Chuck, Sorry for not mentioning. I am using tomcat 5.5.9 on a solaris machine and 5.5.27 on a windows machine. I tried to set the JnDi DataSource and i was successful on 5.5.27 windows version. I already had the same settings in my context.xml so got a doubt regarding location where the values i set thru admion console of Admini web app are persisted. For example in a properties file. Thanks Srinivas Jonnalagadda -Original Message- >From: "Caldarale, Charles R" >Sent: Feb 10, 2009 10:16 AM >To: Tomcat Users List >Subject: RE: tomcat admin console set values > >> From: Srinivas Jonnalagadda [mailto:sarinivas7...@earthlink.net] >> Subject: tomcat admin console set values >> >> When i set the DataSource values thru the Tomcat >> Administration web application. Where are these values >> physically stored? > >First off, tell us your Tomcat level - we're not psychics. > >The lack of persistent storage by the admin app is just one of the reasons it >is no longer present in newer levels of Tomcat. You can access much of the >same information via JConsole or similar JMX tools, but I'm not aware of any >means of persisting any changes made across a Tomcat restart. > > - Chuck > > >THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY >MATERIAL and is thus for use only by the intended recipient. If you received >this in error, please contact the sender and delete the e-mail and its >attachments from all computers. > >- >To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hello
André Warnier wrote: > Mark Thomas wrote: >> Caldarale, Charles R wrote: > [...] >>> I'm not privy to the thought processes behind the packaging of the >>> .exe and .zip downloads, but I don't like it, whatever it was. I >>> think all bits and pieces should be in all the packages. The .exe >>> installer could be made smart enough to detect the platform and JVM >>> it's running on, and choose the 32- or 64-bit service wrapper as >>> appropriate. The service.bat script would probably have to use a >>> command line option to select 32- or 64-bit, but that's way better >>> than the current state of affairs. >> >> Patches are always welcome ;) >> > One would have to find things first in order to patch them. ;-) > > Seriously, on the same principle as eating an elephant but tiny bits at > a time, is there something that militates against adding the various > tomcat.exe and tomcatw.exe to the zip distribution ? Not at all. I'm more than happy to add them to the Tomcat 7 build, get it working and then propose a port to 6.0.x and possibly earlier versions. Option 1: Wait for me (or another committer) to find the time to do this and continue to complain that it isn't so until once of us does. Option 2: Write a patch for the build script, service.bat and the windows installer to do this. I'll accept patching the windows installer is a little tricky but the others should be trivial. If someone wants to take a crack at doing this I'll willingly give them all the help they need if they pop over to the dev list. > I'm willing to write a HowTo for Windows in the FAQ, but having in > addition to direct people to these external links seems a bit > extra-confusing. Agreed. I'd rather get this fixed than document a workaround. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hello
Mark Thomas wrote: Caldarale, Charles R wrote: [...] I'm not privy to the thought processes behind the packaging of the .exe and .zip downloads, but I don't like it, whatever it was. I think all bits and pieces should be in all the packages. The .exe installer could be made smart enough to detect the platform and JVM it's running on, and choose the 32- or 64-bit service wrapper as appropriate. The service.bat script would probably have to use a command line option to select 32- or 64-bit, but that's way better than the current state of affairs. Patches are always welcome ;) One would have to find things first in order to patch them. ;-) Seriously, on the same principle as eating an elephant but tiny bits at a time, is there something that militates against adding the various tomcat.exe and tomcatw.exe to the zip distribution ? I'm willing to write a HowTo for Windows in the FAQ, but having in addition to direct people to these external links seems a bit extra-confusing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] of the different methods to get a user-id
Peter Crowther wrote: From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Hear, hear! In a past life, a guy I know actually wrote a suite of production programs in APL - which was even more cryptic (but also more logical) than Perl. Dedication indeed! Did he need the custom golfball for the teletype with the special symbols, or was the interface a little more modern than that? I have to admit that we have several production applications written almost entirely in Perl. They chug along since several years, processing several thousand documents a day, from MS-Word through PDFs to CAD/CAM drawings and emails, digesting them and making them searchable for grateful users. Their merit is all the greater since they work in the obscure non-graphical background, they never get any of the attention, and they have to share machines with some Java programs, which means they get only the usage of a tiny fraction of the RAM and CPU cycles, although they do most of the real work and have to do it with a single thread each. But such is the the deplorable state of our educational systems nowadays that one can no longer find real sharp logical young minds capable of designing efficient and reliable systems from scratch. So one has to depend instead on rigid frameworks and on programming languages like Java, which severely constrain the programmer's imagination, but make it less likely that one would land in trouble. Even some of the old-school programmers, mostly in their later years, succumb to the what-the-heck syndrome and come to appreciate the sense of security and comfort provided by strongly-typed and rigidly object-oriented languages, with which one can just dedicate one thread to collect the memory garbage left over by sloppy programs, another to collect loose database connections, another to kill off poor abandoned objects, another to optimise badly-written lines of code etc. One has to wonder however if some day, the same kind of meltdown as we are currently seeing in the bloated world of finance, will not strike these over-engineered monsters, and if there will not be massive thread and memory layoffs. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Hello
anyone coming aboard sonny crockett's boat would meet Security Chief Elvis..elvis was an alligator Topic: does TC work with or should we be invoking TC64 Bit in 'Windows Compatibility Mode' aka32bit ? Thanks Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > From: chuck.caldar...@unisys.com > To: users@tomcat.apache.org > Date: Fri, 13 Feb 2009 08:55:16 -0600 > Subject: RE: Hello > > > From: André Warnier [mailto:a...@ice-sa.com] > > Subject: Re: Hello > > > > I understand that, but how would a newbie understand this ? > > Read the mailing list? > > > I didn't know that. But who (other than an expert) would > > know that, looking at those links alone ? > > Actually, Intel seems to have deliberately added to the confusion, since they > recently renamed the current 64-bit architecture to "Intel 64" (even though > AMD invented it). This is exceedingly close to their older, Really Bad Idea > architecture IA64, aka Itanium. Other synonyms for AMD64 include x86-64 (the > original AMD name for it), x64, EM64T, and IA32e (the latter two names are > from Intel). > > Who could possibly be confused? :-( > > > I posted another message a couple of days ago that > > asked why these 64-bit versions of tomcat.exe and > > tomcatw.exe were not just included in the zip version. > > Any idea of the reason ? > > I'm not privy to the thought processes behind the packaging of the .exe and > .zip downloads, but I don't like it, whatever it was. I think all bits and > pieces should be in all the packages. The .exe installer could be made smart > enough to detect the platform and JVM it's running on, and choose the 32- or > 64-bit service wrapper as appropriate. The service.bat script would probably > have to use a command line option to select 32- or 64-bit, but that's way > better than the current state of affairs. Finding the 64-bit versions right > now is a lot like Arthur Dent's run-in with the planning commission: > > "It was on display on the bottom of a locked filing cabinet stuck in a > disused lavatory with a sign on the door saying 'Beware of the Leopard'." > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _ Windows Live™: Keep your life in sync. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009
Re: Hello (Dave's not here!)
Can people please use something a little more descriptive than "Hello"? - Original Message - From: "Mark Thomas" To: "Tomcat Users List" Sent: Friday, February 13, 2009 10:19 AM Subject: Re: Hello Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Hello I understand that, but how would a newbie understand this ? Read the mailing list? I didn't know that. But who (other than an expert) would know that, looking at those links alone ? Actually, Intel seems to have deliberately added to the confusion, since they recently renamed the current 64-bit architecture to "Intel 64" (even though AMD invented it). This is exceedingly close to their older, Really Bad Idea architecture IA64, aka Itanium. Other synonyms for AMD64 include x86-64 (the original AMD name for it), x64, EM64T, and IA32e (the latter two names are from Intel). Who could possibly be confused? :-( I posted another message a couple of days ago that asked why these 64-bit versions of tomcat.exe and tomcatw.exe were not just included in the zip version. Any idea of the reason ? I'm not privy to the thought processes behind the packaging of the .exe and .zip downloads, but I don't like it, whatever it was. I think all bits and pieces should be in all the packages. The .exe installer could be made smart enough to detect the platform and JVM it's running on, and choose the 32- or 64-bit service wrapper as appropriate. The service.bat script would probably have to use a command line option to select 32- or 64-bit, but that's way better than the current state of affairs. Patches are always welcome ;) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hello
Caldarale, Charles R wrote: >> From: André Warnier [mailto:a...@ice-sa.com] >> Subject: Re: Hello >> >> I understand that, but how would a newbie understand this ? > > Read the mailing list? > >> I didn't know that. But who (other than an expert) would >> know that, looking at those links alone ? > > Actually, Intel seems to have deliberately added to the confusion, since they > recently renamed the current 64-bit architecture to "Intel 64" (even though > AMD invented it). This is exceedingly close to their older, Really Bad Idea > architecture IA64, aka Itanium. Other synonyms for AMD64 include x86-64 (the > original AMD name for it), x64, EM64T, and IA32e (the latter two names are > from Intel). > > Who could possibly be confused? :-( > >> I posted another message a couple of days ago that >> asked why these 64-bit versions of tomcat.exe and >> tomcatw.exe were not just included in the zip version. >> Any idea of the reason ? > > I'm not privy to the thought processes behind the packaging of the .exe and > .zip downloads, but I don't like it, whatever it was. I think all bits and > pieces should be in all the packages. The .exe installer could be made smart > enough to detect the platform and JVM it's running on, and choose the 32- or > 64-bit service wrapper as appropriate. The service.bat script would probably > have to use a command line option to select 32- or 64-bit, but that's way > better than the current state of affairs. Patches are always welcome ;) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Starting tomcat from jar file (from another service)
Hello all, I want to make a service program for windows that runs tomcat standalone in it. I did a win32 .exe that creates service and runs jar file with JNI code. Firstly I made my own jar file which writes to a file with start command and it worked. Then I used this exe with tomcat's bootstrap.jar and I used "apache/org/catalina/startup/Bootstrap" as class path. However tomcat didn't work with this. On windows command line I started tomcat with "java -jar bootstrap.jar start". and it works. However it doesn't work from my service. I am trying to do something like procrun(tomcat6w.exe and tomcat6.exe). I searched for procrun code but it is not up-to-date I think. I couldn't compile it with visual studio(gives errors). So I am searching for, how I can run tomcat from jar file in my service. Any help appreciated !Thanks,Fatih. _ Windows Live™ Photos ile fotoğraflarınızı kolayca paylaşımı. http://www.microsoft.com/windows/windowslive/products/photos.aspx
RE: Hello
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: Hello > > I understand that, but how would a newbie understand this ? Read the mailing list? > I didn't know that. But who (other than an expert) would > know that, looking at those links alone ? Actually, Intel seems to have deliberately added to the confusion, since they recently renamed the current 64-bit architecture to "Intel 64" (even though AMD invented it). This is exceedingly close to their older, Really Bad Idea architecture IA64, aka Itanium. Other synonyms for AMD64 include x86-64 (the original AMD name for it), x64, EM64T, and IA32e (the latter two names are from Intel). Who could possibly be confused? :-( > I posted another message a couple of days ago that > asked why these 64-bit versions of tomcat.exe and > tomcatw.exe were not just included in the zip version. > Any idea of the reason ? I'm not privy to the thought processes behind the packaging of the .exe and .zip downloads, but I don't like it, whatever it was. I think all bits and pieces should be in all the packages. The .exe installer could be made smart enough to detect the platform and JVM it's running on, and choose the 32- or 64-bit service wrapper as appropriate. The service.bat script would probably have to use a command line option to select 32- or 64-bit, but that's way better than the current state of affairs. Finding the 64-bit versions right now is a lot like Arthur Dent's run-in with the planning commission: "It was on display on the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying 'Beware of the Leopard'." - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Tomcat installation for Flyswatter
Caldarale, Charles R wrote: [...] ... (possibly brain fade due to exposure to Perl). ... although Tomcat is getting better at detected such illogical configurations ... See, here is the difference : Perl, in contrast to some Microsoft products (and now apparently also Tomcat), makes no assumptions that it is smarter than you are and has to correct your mistakes. It assumes that you know what you're doing and lets you damn yourself if that's what you want to do. Some (granted, mostly in the Perl world) argue that it keeps the mind alert and the arteries young. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Recommendation # webapps
> From: Pieter Temmerman [mailto:ptemmerman@sadiel.es] > Subject: Recommendation # webapps > > The most logical answer would be; Use one Tomcat per webapp, whenever > possible. However, the administration overhead is so much bigger than > using a single Tomcat. Not just administration overhead, but also that of physical resources - primarily memory. There's a lot of virtual and real memory consumption by each process, so how much RAM you have is often the limiting factor. You really don't want to get into paging in a production environment. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] of the different methods to get a user-id
> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > Hear, hear! In a past life, a guy I know actually wrote a > suite of production programs in APL - which was even more > cryptic (but also more logical) than Perl. Dedication indeed! Did he need the custom golfball for the teletype with the special symbols, or was the interface a little more modern than that? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] of the different methods to get a user-id
> From: Peter Crowther [mailto:peter.crowt...@melandra.com] > Subject: RE: [OT] of the different methods to get a user-id > > Thank you. Although I don't need any further reasons to > avoid that camel of a language whenever I can, it's always > nice to find another really good reason to avoid it... Hear, hear! In a past life, a guy I know actually wrote a suite of production programs in APL - which was even more cryptic (but also more logical) than Perl. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat installation for Flyswatter
> From: Pieter Temmerman [mailto:ptemmerman@sadiel.es] > Subject: RE: Tomcat installation for Flyswatter > > Maybe stupid question, but why do you need to put the webapp > out of the Tomcat folder, in order to make it the root app? The key clause in the statement was "If you want to keep the directory name for your webapp as ParticleBoard"; some people insist on deploying webapps in a directory different from the URL path, for no discernible reason (possibly brain fade due to exposure to Perl). Normally, one would place the default webapp in the webapps/ROOT directory (or webapps/ROOT.war) and be done with it. As Andre pointed out, placing a webapp under the docBase with one name *and* having a conf/Catalina/[host]/[otherAppName].xml file will likely get you double deployment, although Tomcat is getting better at detected such illogical configurations. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WebdavServlet + custom DirContext = unexpected behaviour
Thanks for your feedback. On 13 Feb 2009, at 05:04, Caldarale, Charles R wrote: From: Stephen Winnall [mailto:st...@winnall.ch] Subject: WebdavServlet + custom DirContext = unexpected behaviour My Tomcat is as installed by NetBeans 6.5, that is with a separate CATALINA_HOME and CATALINA_BASE. I'd strongly recommend that you first learn how to run Tomcat directly, outside of any IDE, before muddying the picture with an extra layer of obfuscation. Problem solving will be much simpler. Fair comment. So I have now installed Tomcat 6.0.18 from scratch. I modified $CATALINA_BASE/conf/catalina.properties to make common.loader look also in $CATALINA_BASE/common/lib and I put DBDirContext and supporting cast into there. Now you've already gone off the deep end; that's not something you should have to (or want to) do. By default, there is no common/lib in Tomcat 6.0, and you don't need to resurrect the past. Any jars or classes Tomcat needs access to should be in Tomcat's lib directory, nowhere else. If you provide a replacement for the default handler, it must go into Tomcat's lib directory, since it's used by Tomcat, not the webapp. I did originally put everything into $CATALINA_HOME/lib. However, I like to keep my stuff separate from the base product, which is why I had created a separate folder. However, with my new installation I put DBDirContext and friends into $CATALINA_HOME/lib as you suggest. When I started up the new installation, I got exactly the same behaviour as before. The Tomcat documentation suggests that changing the to something other than the filesystem results in Tomcat not being able to read files it needs: Not true - it says the *webapp* won't be able to access the file system; it says nothing about Tomcat's ability to do so. Thanks, that has cleared up an uncertainty for me. do I have to make a hybrid DBDirContext that gets the files Tomcat needs from the filesystem and the data I want from the database? I don't think so. Start over with a clean Tomat install (not the one bundled with the IDE) and go from there. Done that and there's no change in behaviour. When I switch on the handler, the OPTIONS request is apparently handled out of HttpServlet; when I switch it off, it is handled out of WebdavServlet. Steve - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Can I access Tomcat's JNDI provider from outside tomcat?
How to access Tomcat's JNDI provider from outside tomcat 5.5.27 ? Uma Maheswara Rao Gudi Tata Consultancy Services Mailto: uma.g...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: Tomcat installation for Flyswatter
Pieter Temmerman wrote: If you want to keep the directory name for your webapp as ParticleBoard, then do not put it under Tomcat's webapps directory, but do remove the existing ROOT directory there. Put your webapp somewhere outside of Tomcat's directory structure, and create the file conf/Catalina/localhost/ROOT.xml containing the following: Maybe stupid question, but why do you need to put the webapp out of the Tomcat folder, in order to make it the root app? Proably because if you leave it as .../webapps/ParticleBoard/.. , then it will be /both/ the "ParticleBoard" /and/ the ROOT application (with the context file above), which may create some confusion. Is this the right explanation, experts ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat installation for Flyswatter
> If you want to keep the directory name for your webapp as ParticleBoard, then > do not put it under Tomcat's webapps directory, but do remove the existing > ROOT directory there. Put your webapp somewhere outside of Tomcat's > directory structure, and create the file conf/Catalina/localhost/ROOT.xml > containing the following: > > Maybe stupid question, but why do you need to put the webapp out of the Tomcat folder, in order to make it the root app? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] of the different methods to get a user-id
> From: André Warnier [mailto:a...@ice-sa.com] > I was going to let that one pass, but now I'm provoked. > The expressions above do work differently in Perl. [...] > However, the calle sub can be cleverer and anticipate this, by doing : > return wantarray ? (i++) : i++; > thus checking in which context it is being called, and returning the > appropriate form of response. > > Perl is great ! Thank you. Although I don't need any further reasons to avoid that camel of a language whenever I can, it's always nice to find another really good reason to avoid it... - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hello
Pieter Temmerman wrote: Luckily I'm not a windows user, because all of this seems rather confusing to me. It is confusing to anyone, except the wizards themselves. There are rumors going around that this is exactly the point. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Recommendation # webapps
Pieter Temmerman wrote: The most logical answer would be; Use one Tomcat per webapp, whenever possible. However, the administration overhead is so much bigger than using a single Tomcat. And how if each webapp uses a specificity of a special version of Tomcat? If that usecase is not possible, then "one Tomcat for all" would be my answer. -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby System: xUbuntu 8.10 with almost all from package install - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hello
Luckily I'm not a windows user, because all of this seems rather confusing to me. On Fri, 2009-02-13 at 09:25 +0100, André Warnier wrote: > So apparently, I did end up make it more complicated than it is. > > Caldarale, Charles R wrote: > >> From: André Warnier [mailto:a...@ice-sa.com] > >> Subject: Re: Hello > >> > >> Vista 32-bit -> 32-bit Java JDK or JRE > >> Vista 64-bit -> 64-bit Java JDK or JRE > > > > Not necessarily true. I run both 32- and 64-bit versions of the JVM on my > > Vista 64 box, because some browsers only come in 32-bit versions and > > therefore need the 32-bit plugin to run applets. > Allright, good to know. > > > > >> For a 64-bit Vista, we first tried the Service Installer. It installed > >> properly, but we could not get it to run. > > > > That depends on the JRE/JDK installed. >To use the tomcat6.exe program that's included with the .zip and .exe > downloads, > you must associate it with a 32-bit JVM - even on a 64-bit platform. > I understand that, but how would a newbie understand this ? > > > > >> So we removed the 64-bit Service Installer > > > > There is no 64-bit service installer. > Sorry, typo. Should have been "the Service Installer", tout court. > > > > >> To make it work, we had to download 2 additional files > >> (tomcat5.exe and tomcat5w.exe), rename them respectively > >> to tomcat6.exe and tomcat6w.exe, and (I think) rerun the > >> service.bat script. > > > > What you downloaded was the 64-bit versions, necessary to run Tomcat as a > > service > with a 64-bit JVM. > Same remark as the newbie one above. > > It should not be necessary to rerun the service.bat script. > Ok, just wasn't sure. > > > > >> We downloaded them from here : > >> http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ > >> Oh, and there are 2 versions of each of the above files, depending on > >> whether your CPU is an Intel-64 or an AMD-64. > > > > Not correct. Use the AMD64 version, which applies to current 64-bit chips > > from both AMD and Intel; the IA64 version is for an older Intel 64-bit > > architecture which has pretty much been killed off (just not soon enough > > for those of us that had to use it). > > > I didn't know that. But who (other than an expert) would know that, > looking at those links alone ? > > I believe that this definitely needs at least a HowTo on the Tomcat > site. I'll get to it. > Unfortunately, I think that the current structure of the downloadable > versions does not make this really easy to explain. > I posted another message a couple of days ago that asked why these > 64-bit versions of tomcat.exe and tomcatw.exe were not just included in > the zip version. Any idea of the reason ? > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -- Pieter Temmerman email: ptemmerman@sadiel.es skype: ptemmerman.sadiel SADIEL TECNOLOGÍAS DE LA INFORMACIÓN, S.A. http://www.sadiel.es. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: nio connector configuration
I'm trying to figure out how best to configure nio so that my comet timeout events get generated in a timely manner. I have the comet events set to generate a timeout every 50 seconds. Works fine with few users. Under a moderate but reasonable load the timeout gets generated on average every 113 seconds. My configuration tweaks haven't yielded any noticeable changes (see below). Test results... Background: - using JMeter - 300 threads executing normal http requests, averaging ~9.8 requests/second. - 300 threads executing comet requests that simply wait for the server to close the connection every 50 seconds, averaging ~2.6 requests/second. - server is ubuntu 8.10 running tomcat 6.0.18. - server is not cpu constrained, averaging about 8-12% cpu - server doesn't seem to be memory constrained. top shows 80% of memory after hours of test (machine has 512MB physical memory and tomcat has a max heap set to 384MB) - network latency isn't a problem I ran 2 tests with different configurations for the nio connector: 1 test with bare-bones settings, and 1 test with everything that seemed like it might make a difference. Ran for 3+ hours. 8-12% cpu. 12.4 requests/second. comet requests: average response time 112 secs, min 21 secs, max 179 secs Ran for 1 1/2 hours. 8-12% cpu. 12.2 requests/second. comet requests: average response time 113 secs, min 50 secs, max 133 secs So how can I get my comet timeouts generated at close to 50 secs under load? I thought maybe the poller thread priority was too low (does the poller thread generate the timeouts?), but setting its priority to max didn't change anything. Just to make sure I wasn't doing anything dumb in my client code, I replaced my event() method with the one below and still got the same disparity in comet timeouts, ranging from 50 to 120 secs: public void event(CometEvent event) throws IOException, ServletException { HttpServletRequest request = event.getHttpServletRequest(); if (event.getEventType() == CometEvent.EventType.BEGIN) { event.setTimeout(5); } else if (event.getEventType() == CometEvent.EventType.ERROR) { event.close(); } else if (event.getEventType() == CometEvent.EventType.END) { event.close(); } else if (event.getEventType() == CometEvent.EventType.READ) { InputStream is = request.getInputStream(); byte[] buf = new byte[512]; do { is.read(buf); // can throw an IOException } while (is.available() > 0); } } I just checked the priority of the thread issuing the comet timeout event and its priority is 5. I have both the acceptor and poller thread priorities set to 10. How can I bump up the priority of the thread that issues the timeout events (in this case named "http-80-exec-1")? Thanks for any ideas, Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] of the different methods to get a user-id
Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: [OT] of the different methods to get a user-id I don't understand that, either. I suppose this works differently in different languages, though: return i++; return (i++); Not any that I'm aware of; the value of the i++ expression is the same, regardless of the number of parentheses you wrap it in. I tried in C and Java and got the same result (both return the original value of i), though I would have expected something different. Nope; the parentheses in such a statement control only operator precedence, not anything else. Don't confuse parentheses used in an expression with those used for function calls or if/while statements - they're syntactically different, even if they share the same code point. I was going to let that one pass, but now I'm provoked. The expressions above do work differently in Perl. 1) caller side : a) my $var = getRemoteUser(); sets a /scalar/ context for the call. Means that the caller expects a single value in return. b) my @var = getRemoteUser(); sets a /list/ context for the call. Indicates that the caller expects a list (an array) in return. 2) callee side : a) return i++; Returns the value of i prior to the post-increment, as a scalar value. So it "fits" with 1a. b) return (i++); Returns a list composed of 1 element : the value of i before the post-increment. So it "fits" with 1b. But.. if you combine the call 1a my $var = getRemoteUser(); with the version 2b : return (i++) then when you get in $var is 1, always. That is because since my $var = getRemoteUser(); expects a scalar, but what it gets is a list, it does an implicit my $var = (list), which equivalent to my $var = scalar(list) which returns the number of elements present in the array/list. However, the calle sub can be cleverer and anticipate this, by doing : return wantarray ? (i++) : i++; thus checking in which context it is being called, and returning the appropriate form of response. Perl is great ! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Recommendation # webapps
Hi list, I realize my question may be very dependent on the environment, requirements and scope, but I was wondering if you guys recommend the use one Tomcat instance per webapp (on the same server), or rather several webapps in one Tomcat? Note that I'm talking about applications in production, not in development. The most logical answer would be; Use one Tomcat per webapp, whenever possible. However, the administration overhead is so much bigger than using a single Tomcat. What are your experiences? -Pieter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hello
So apparently, I did end up make it more complicated than it is. Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Hello Vista 32-bit -> 32-bit Java JDK or JRE Vista 64-bit -> 64-bit Java JDK or JRE Not necessarily true. I run both 32- and 64-bit versions of the JVM on my Vista 64 box, because some browsers only come in 32-bit versions and therefore need the 32-bit plugin to run applets. Allright, good to know. For a 64-bit Vista, we first tried the Service Installer. It installed properly, but we could not get it to run. That depends on the JRE/JDK installed. To use the tomcat6.exe program that's included with the .zip and .exe downloads, you must associate it with a 32-bit JVM - even on a 64-bit platform. I understand that, but how would a newbie understand this ? So we removed the 64-bit Service Installer There is no 64-bit service installer. Sorry, typo. Should have been "the Service Installer", tout court. To make it work, we had to download 2 additional files (tomcat5.exe and tomcat5w.exe), rename them respectively to tomcat6.exe and tomcat6w.exe, and (I think) rerun the service.bat script. What you downloaded was the 64-bit versions, necessary to run Tomcat as a service with a 64-bit JVM. Same remark as the newbie one above. It should not be necessary to rerun the service.bat script. Ok, just wasn't sure. We downloaded them from here : http://svn.apache.org/repos/asf/tomcat/connectors/trunk/procrun/bin/ Oh, and there are 2 versions of each of the above files, depending on whether your CPU is an Intel-64 or an AMD-64. Not correct. Use the AMD64 version, which applies to current 64-bit chips from both AMD and Intel; the IA64 version is for an older Intel 64-bit architecture which has pretty much been killed off (just not soon enough for those of us that had to use it). I didn't know that. But who (other than an expert) would know that, looking at those links alone ? I believe that this definitely needs at least a HowTo on the Tomcat site. I'll get to it. Unfortunately, I think that the current structure of the downloadable versions does not make this really easy to explain. I posted another message a couple of days ago that asked why these 64-bit versions of tomcat.exe and tomcatw.exe were not just included in the zip version. Any idea of the reason ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org