RE: FW: Os X
Erm, the .java file is incorrectly named: HttpSessionAttruteListener.java Should matcht he class declaration: HttpSessionAttributeListener.java (the missing i) Carl -Original Message- From: Andrew Robinson [mailto:[EMAIL PROTECTED] Sent: 11 April 2004 09:44 PM To: 'Tomcat Users List' Subject: RE: FW: Os X Good point, I tried to do the build and I got a few of these errors [javac] public interface HttpSessionActivationListener extends EventListener { [javac]^ [javac] /Users/macusr/Desktop/apache-ant-1.6.1/jakarta-tomcat-5.0.19-src/ jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/ HttpSessionAttruteListener.java:71: class HttpSessionAttributeListener is public, should be declared in a file named HttpSessionAttributeListener.java Any ideas? Thanks, Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] rg] On Behalf Of Hassan Schroeder Sent: Sunday, April 11, 2004 3:24 PM To: Tomcat Users List Subject: Re: FW: Os X Andrew Robinson wrote: I'm new to this list...Has anyone sucessfully installed tomcat on an OS X machine, I can't seem to get it to work. Yes. It would probably be more useful if you specified what exactly you did and what exact problem you're having, eh? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
5.0 Documentation: missing link
The address http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/installation.html refers to Detailed instructions for downloading and installing Tomcat 5 are available here. where 'here' hyperlinks to http://jakarta.apache.org/tomcat/tomcat-5.0-doc/RUNNING.txt which appears to not be there. Not a big problem because the binary was easy to install anyway. Just wasn't sure who to let know... Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authentication in tomcat
Hello. I'm a bit confused. I'm trying tomcat's authentication with bad or no results. The documentation is very simple and I don't understand so well. I've a web application and I want to make authentication with a user role and a admin role. The admin can administrate permissions and roles. I want to use form authentication. Each role can access a part of the application web. I must check if the user has a session and has permission for the accessing. I've got a connection pool with JNDI in mysql. Has anybody a full example? Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception processing JAR at resource path
hi, i am using tomcat 4.1.30. when i start the server i get the error at the end of this mail. i get this only when i set docBase in my server.xml for this context. when i copy the files in the webapp dir everything works fine. there are no xml parsing jars in the WEB-INF/lib dir. the temp dir is also there in the CATALINA_HOME dir. just before emitting this error the log says that it was able to deploy this jar. thanks in advance, nishant. 2004-04-12 13:32:01 ContextConfig[reports] Exception processing JAR at resource path /WEB-INF/lib/commons-fileupload.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/commons-fileupload.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3587) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.FileNotFoundException at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:344) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3587) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4 vs 5 form based container auth filters
Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in tomcat
On 04/12/2004 10:31 AM [EMAIL PROTECTED] wrote: Hello. I'm a bit confused. I'm trying tomcat's authentication with bad or no results. The documentation is very simple and I don't understand so well. I've a web application and I want to make authentication with a user role and a admin role. The admin can administrate permissions and roles. I want to use form authentication. Each role can access a part of the application web. I must check if the user has a session and has permission for the accessing. I've got a connection pool with JNDI in mysql. Has anybody a full example? You need to set up a realm. Presumably a JNDI or JDBC realm would suit you. Realms are IMO well documented on the tomcat website at jakarta, and with examples as well I believe. Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH
Hi, I have a jsp page which is refreshed atuomatically every 10 seconds.I get and put values in the session by using the implicit session variable . Everything works fine for say 2-3 mins after that the session becomes null and throws a null pointer exception. IN the try block I even have a code as try { if (session == null || session.isNew()) { //do something } else { //do otherwise } }catch(Exception e ) { //print stack trace and value of session } I get a null pointer exception and session is preinted as null but even the if block is noit executed . I printed the value of request.getSession(false);.This gives me session object ,where as the implicit session does not have this after many refresh interval . During the first few refresh both have the same value. Also note that this runs fine in Windows ,I get this problem only in UNIX . I use tomcat 3.2 in unix and view using IE in windows Please help me out as to where I am going wrong . thanks and Regards Mukund
Re: tomcat 4 vs 5 form based container auth filters
Yes your observations are correct. It's my understanding that filters are not invoked until after authentication. i.e. after the form-based login. I have no experience of site-mesh, but it seems a bit weird anyway to put decorations on a page via a filter - surely you should be encapsulating that sort of stuff in a JSP or taglib? Adam On 04/12/2004 11:02 AM Martin Alley wrote: Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH
Hi There, The NPE is coming from the { if (session == null || session.isNew()) } since even if session is null then you are still trying to call a method of session. a safer alternative would be if (session == null) { //error } else { if (session.isNew()) { } else { } } Thanks Pete -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:19 To: [EMAIL PROTECTED] Subject: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH Hi, I have a jsp page which is refreshed atuomatically every 10 seconds.I get and put values in the session by using the implicit session variable . Everything works fine for say 2-3 mins after that the session becomes null and throws a null pointer exception. IN the try block I even have a code as try { if (session == null || session.isNew()) { //do something } else { //do otherwise } }catch(Exception e ) { //print stack trace and value of session } I get a null pointer exception and session is preinted as null but even the if block is noit executed . I printed the value of request.getSession(false);.This gives me session object ,where as the implicit session does not have this after many refresh interval . During the first few refresh both have the same value. Also note that this runs fine in Windows ,I get this problem only in UNIX . I use tomcat 3.2 in unix and view using IE in windows Please help me out as to where I am going wrong . thanks and Regards Mukund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH
Hi , Thank you for your reply . Guess I did not put my qn the right way . In the code block if (session == null || session.isNew() I do not access any session variables Actually I just redirect the page. I am unable to understand why the implicit session variable becomes null suddenly after some refresh and why this occurs only when tomcat runs in UNIX .I don't get this problem in Windows Thanks and Regards Mukund -Original Message- From: Peter Guyatt [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 4:10 PM To: Tomcat Users List Subject: RE: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH Hi There, The NPE is coming from the { if (session == null || session.isNew()) } since even if session is null then you are still trying to call a method of session. a safer alternative would be if (session == null) { //error } else { if (session.isNew()) { } else { } } Thanks Pete -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:19 To: [EMAIL PROTECTED] Subject: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH Hi, I have a jsp page which is refreshed atuomatically every 10 seconds.I get and put values in the session by using the implicit session variable . Everything works fine for say 2-3 mins after that the session becomes null and throws a null pointer exception. IN the try block I even have a code as try { if (session == null || session.isNew()) { //do something } else { //do otherwise } }catch(Exception e ) { //print stack trace and value of session } I get a null pointer exception and session is preinted as null but even the if block is noit executed . I printed the value of request.getSession(false);.This gives me session object ,where as the implicit session does not have this after many refresh interval . During the first few refresh both have the same value. Also note that this runs fine in Windows ,I get this problem only in UNIX . I use tomcat 3.2 in unix and view using IE in windows Please help me out as to where I am going wrong . thanks and Regards Mukund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: directory structure and porting issues
QM wrote: : - Finally, is it the best practice to hard-code the 'context' prefix in : your application? JSTL. I forget the exact tag names, but any JSTL reference will have them listed. There's a tag for creating context-relative links, and (I believe) one for creating context-relative image tags. Yes, William, take a look at JSTL specification, it's here: http://jcp.org/aboutJava/communityprocess/final/jsr052/ . See subsection 7.1 . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using the request object and EL
I have a jsp page that has the following code %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % %@ taglib tagdir=/WEB-INF/tags prefix=tag % html head title${param.title}/title /head body pThis shows the usage of a tag file/p request as EL: ${request.contextPath} br/ request using page context as EL: ${pageContext.request.contextPath} br/ request as scriptlet: %= request.getContextPath() %br/ param is: ${param.test}br/ tag:Simple/ pa href=${pageContext.request.contextPath}Home/a /body /html This is my tags code Context path via request is:${request.contextPath}br/ I thought that according the to spec that the request was an implicit object for both the jsp page and the tag file but I can not get it to work in either. Am I doing something wrong? I am using the latest from cvs as of Friday morning Thanks, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4 vs 5 form based container auth filters
Hi Adam, Why do you think this behaviour changed from tomcat4 ? I haven't gone into the full architecture of sitemesh, as yet, but I know it includes a filter. Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:26 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters Yes your observations are correct. It's my understanding that filters are not invoked until after authentication. i.e. after the form-based login. I have no experience of site-mesh, but it seems a bit weird anyway to put decorations on a page via a filter - surely you should be encapsulating that sort of stuff in a JSP or taglib? Adam On 04/12/2004 11:02 AM Martin Alley wrote: Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH
Peter Guyatt wrote: Hi There, The NPE is coming from the { if (session == null || session.isNew()) } since even if session is null then you are still trying to call a method of session. According to Java language specification, 15.24 Conditional-Or Operator ||, it's not so. That says that right-hand operator only executes when left-hand operator is false, so in this code session!=null. -Original Message- From: MUKUND Premchander [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:19 To: [EMAIL PROTECTED] Subject: SESSION VARIABLE BECOMES NULL AFTER SOME REFRESH Hi, I have a jsp page which is refreshed atuomatically every 10 seconds.I get and put values in the session by using the implicit session variable . Everything works fine for say 2-3 mins after that the session becomes null and throws a null pointer exception. IN the try block I even have a code as try { if (session == null || session.isNew()) { //do something } else { //do otherwise } }catch(Exception e ) { //print stack trace and value of session } I get a null pointer exception and session is preinted as null but even the if block is noit executed . I printed the value of request.getSession(false);.This gives me session object ,where as the implicit session does not have this after many refresh interval . During the first few refresh both have the same value. May be some logic deep in your code invalidates session somehow? You can set up RequestDumperFilter to look at HTTP headers you (your browser) send and what is received. I don't know if that filter available in Tomcat 3.2, 'cause I use it since 4.1 time, but you can grab it from recent Tomcat distribution. Or you can use javax.servlet.http.HttpSessionListener to be notified when a session is about to be invalidated or timed out. Also note that this runs fine in Windows ,I get this problem only in UNIX . I use tomcat 3.2 in unix and view using IE in windows - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2 + apache vhosts + tomcat sessions
Hi, I have multiple vhosts on an apache 1.3.x connected to a tomcat 5 via jk2. e.g.: [EMAIL PROTECTED] (apache http) -jk2--- v [EMAIL PROTECTED] (apache http) -jk2--- single tomcat instance [EMAIL PROTECTED] (apache http) -jk2---^ ... Is it possible for those vhosts to somehow share the same tomcat http session? The vhosts are just needed as entry points to an application running inside tomcat. Maybe there is a better solution? Any hints/ ideas? cheers, Jens - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2 + apache vhosts + tomcat sessions
oops, of course i ment vh1.foobar.com and so on ... =) Jens Saade wrote: Hi, I have multiple vhosts on an apache 1.3.x connected to a tomcat 5 via jk2. e.g.: [EMAIL PROTECTED] (apache http) -jk2--- v [EMAIL PROTECTED] (apache http) -jk2--- single tomcat instance [EMAIL PROTECTED] (apache http) -jk2---^ ... Is it possible for those vhosts to somehow share the same tomcat http session? The vhosts are just needed as entry points to an application running inside tomcat. Maybe there is a better solution? Any hints/ ideas? cheers, Jens - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- PIRONET NDH AG Jens Saade - Application Developer - Business Center Industry Maarweg 149-161, 50825 Cologne - Germany Phone: +49 (0)221-770-1794 - Fax: +49 (0)221-770 1005 Mail to: [EMAIL PROTECTED] - http://www.pironet-ndh.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4 vs 5 form based container auth filters
AFAIK it has something to do with providing a clean seperation between the authentication (tomcat) and the application (your filter). I think there were probably several reasons though for it, which outweighed the reasons against, and I have heard a few of them. Adam On 04/12/2004 01:50 PM Martin Alley wrote: Hi Adam, Why do you think this behaviour changed from tomcat4 ? I haven't gone into the full architecture of sitemesh, as yet, but I know it includes a filter. Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:26 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters Yes your observations are correct. It's my understanding that filters are not invoked until after authentication. i.e. after the form-based login. I have no experience of site-mesh, but it seems a bit weird anyway to put decorations on a page via a filter - surely you should be encapsulating that sort of stuff in a JSP or taglib? Adam On 04/12/2004 11:02 AM Martin Alley wrote: Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Global resource JDBC/JNDI
Should I do it for all applications ? I try this in META-INF/context.xml and it don't work - when I add jndi with tomcat admin it work, but add all parameters in conf/Catalina/host/app.xml Is it correct behavior ? Thanks Haris Peco On Sunday 11 April 2004 02:56 pm, D'Alessandro, Arthur wrote: You need to make a refernce in your web app contexts to the global resource: ResourceLink name=jdbc/myresourcename global=jdbc/myresourcename type=javax.sql.DataSource/ -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 12:49 PM To: [EMAIL PROTECTED] Subject: Global resource JDBC/JNDI Hello, I set jdbc/jndi for web application, but I want set jdbc/jndi for all applications I try set jdbc/jndi in GlobalResource, but this resources don't see in web application automatic Is it possible regards Haris Peco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding host and context information on the fly
Hi, You need to restart the server after adding hosts. You can add hosts manually in server.xml, via the Admin webapp that ships with tomcat, or with your own custom code programmatically, but in any case the server must be restarted. Yoav Shapira Millennium Research Informatics -Original Message- From: Fedor Smirnoff [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 7:22 PM To: 'Tomcat Users List' Subject: Adding host and context information on the fly Hi I was wondering if there is a way to add host records to Tomcat 5 configurations on the fly without restarting the server. I found out that adding appname.xml file with context info in it to conf/Catalina/localhost/ directory will make this application available right away. I cannot figure out how to add new virtual host in a similar way without manually changing server.xml file and than restarting tomcat. Could someone please help? Thank you Fedor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4 vs 5 form based container auth filters
Except with form based auth, you want the look at feel to be part of the application? What reasons did you hear? :-) Whilst not knowing the full reasons, it would be nice if there was some config switch to control this, other wise it increases application maintainence overhead if you want to change the look and feel. I'll see if I can find anything in the tc5 release notes on this. Thanks again Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 13:13 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters AFAIK it has something to do with providing a clean seperation between the authentication (tomcat) and the application (your filter). I think there were probably several reasons though for it, which outweighed the reasons against, and I have heard a few of them. Adam On 04/12/2004 01:50 PM Martin Alley wrote: Hi Adam, Why do you think this behaviour changed from tomcat4 ? I haven't gone into the full architecture of sitemesh, as yet, but I know it includes a filter. Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:26 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters Yes your observations are correct. It's my understanding that filters are not invoked until after authentication. i.e. after the form-based login. I have no experience of site-mesh, but it seems a bit weird anyway to put decorations on a page via a filter - surely you should be encapsulating that sort of stuff in a JSP or taglib? Adam On 04/12/2004 11:02 AM Martin Alley wrote: Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: directory structure and porting issues
Hi, Your problems arise because of imperfect/relaxed implementations of the servlet spec by earlier containers. Tomcat is strict. I don't think there's a double-meaning to 'context' personally but that's a minor point anyways. In addition to the spec, see this for directory structures: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html Yoav Shapira Millennium Research Informatics -Original Message- From: William Claxton [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 6:52 AM To: [EMAIL PROTECTED] Subject: directory structure and porting issues Folks, hi - I keep stumbling into porting issues when moving older servlet applications from Jrun or Servlet Exec to Tomcat. A couple issues related to directory structure always seem to arise. One issue is that an application expecting all servlets to be loaded from a single classpath may not have the 'context' prefix. For example, an application 'app1' that posts to '/servlet/Controller' may not work unless 'app1' is defined as Tomcat's default context. It would work if you change the code so that it posts to 'app1/servlet/Controller'. But that's a global change that hardcodes the context name. Incidentally, I observed the same issue when changing the 'appbase' in Tomcat's server.xml - the Tomcat home page is no longer accessible. Even if you create a new 'tomcat' context, the admin, manager and servlet examples linked from Tomcat's homepage don't work. A solution I found works in Tomcat 5 is to create new contexts for each, such as: Context path=tomcat/servlets-examples docBase=c:\apps\java\tomcat\webapps\servlets-examples debug=0 / As I recall, this didn't work in Tomcat 4. Another issue is that 'context' seems to function as both a 'script-alias' and an 'alias' for static files, but with differing results. For example, suppose that in the application called 'app1', I create a static web page that does 3 things: - displays an image at 'app1/images/button.gif' - loads a stylesheet from '/app1/includes/default.css' - posts a form to '/app1/servlet/Controller' It seems that the images and includes folders are expected to appear in the folder 'app1' directly below my appbase, whereas the Controller servlet is expected in the 'app1/WEB-INF/classes' folder. This is different from where these folders resided in other servlet containers that did not use 'WEB-INF'. Apparently 'app1' is a 'script-alias' for servlets, and an ordinary 'alias' for static files, with different meanings for each. The problem can be resolved if I use a connector to Apache or IIS, and then create the 'alias' for static files in the web server. But in a standalone instance of Tomcat there is no separate alias definition - 'context' is the only way to create aliases. - Am I right about the double-meaning of 'context'? - Do others experience similar porting issues? - Is there an online guide that helps app developers select a directory structure that is portable across servlet containers? - Finally, is it the best practice to hard-code the 'context' prefix in your application? Cheers. Regards, Bill Claxton [EMAIL PROTECTED] OpenAsia Solutions provides streaming media payment solutions. Check out http://www.openasia.net ::: :: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: starting out with tomcat and struts
Hi, there are distributions of tomcat that do not come bundled with the examples. Normally there is another more complete download, or you can get them separately...take a look in the binaries on jakarta.apache.org under tomcat, I know they are there :) What on earth are you talking about? I spilled my coffee reading this (though thankfully only on this keyboard, and I'm tired of this keyboard anyways, but that's a long story). All tomcat distributions contain all the examples, always have. Recently they're not in the webapps directory: they're declared in conf/Catalina/localhost/examples.xml just like admin, manager, balancer. The docBase in example.xml will point to a directory under $CATALINA_HOME/server/webapps. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and my application's performance ... time being lost?
Hi, Use a Profiler to show you exactly where time is spent. Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:51 PM To: [EMAIL PROTECTED] Subject: Tomcat and my application's performance ... time being lost? Hello Guys *sigh* I am trying to make my app work as quick as possible but look at these stats... Page name: page_6 page_7 page_8 page_9 page_10 page_11 Min web transaction (without images): 460.79 1962.42 2296.12 2881.90 2660.72 1640.80 Avg web transaction (without images): 3681.05 3637.22 3472.87 3935.36 4368.14 3877.93 Max web transaction (without images): 5425.64 5875.14 5977.36 6194.46 7140.51 6557.30 That's 20 users x 3 iterations. What is puzzling me is that I have wrapped code-level timings around the very top entry point of the Struts action and the very bottom. These timings are coming out at sub 0.5s. I also have done the same in the top level template JSP that includes every page and the pages for the most part are timed at sub 0.4s. In general though add them together and I get sub 0.5s for execution of backend and frontend code. But look at the average transaction time above and 3+s is the best my Tomcat configuration is doing. I am beginning to suspect that this is not to do with my application code if my timings are so fast?? I suppose these type of timings are only for the running of the code and do not cover the time it takes for the user click to the Action itself, and also again for sending the page as a response stream?? Although the timings show fast execution, does this include sending the response stream itself - I don't think it does. I have tried this now on my home machine and 2 servers so I don't think it is to do with network latency or anything like that. I am pretty sure something in the application is slowing down but I have timed pretty much everything from database calls, page compilation and so fourth and it is all ultra-fast...so where is my time going? -- User Click -- My Action Servlet extends Struts Action Servlet framework -- Action Servlet calls Struts framwork I presume -- Struts framework calls my BaseAction (this is what I time) -- My Action class does it's work -- my BaseAction returns (output total time here = sub 0.5s) -- Struts/tiles handles sending JSP view to user -- My template JSP is called by Struts (this is timed again 0.4s) So if my code timings are really fast, then it could be Struts that is consuming the extra time? Advice on where can I turn next to determine the missing time is so very much appreciated. ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unexpected tomcat 4.1.27-30 shutdown problem
Hi, I am running tomcat 4.1.27/29/30 on a Solaris 5.7 or 5.8 and it shutsdown for no apparent reason. Sometimes it can go for hours without a problem, othetimes it stops much sooner. There is no obvious error, just a shutdown. The same code built on another Solaris box and/or HPUX runs without a problem. Any ideas how I can debug this? When it shuts down, are there files named 'core' and 'hs_err_pid' (where is the process ID of the server) in the working directory? If so, what do those files contain? The advice at this point is generic: make sure the box has the latest Sun OS patches required for your JDK (these patches are available on the JDK download page near the bottom), and make sure the user account running the server has sufficient file descriptors and threads (the ulimit settings). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trying to start tomcat. Should be so simple
Hi, Don't make the jar a symlink. Yoav Shapira Millennium Research Informatics -Original Message- From: Randy Paries [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 3:26 PM To: 'Tomcat Users List' Subject: RE: Trying to start tomcat. Should be so simple Thanks of the help ls -lsL /home/unitnetWebapps/WEB-INF/lib/mm.mysql-2.0.2-bin.jar 76 -rwxrwxrwx1 apache apache 71328 Mar 24 16:23 /home/unitnetWebapps/WEB-INF/lib/mm.mysql-2.0.2-bin.jar ls -ls /home/unitnetWebapps/WEB-INF/lib/mm.mysql-2.0.2-bin.jar 0 lrwxrwxrwx1 root root 58 Apr 10 12:27 /home/unitnetWebapps/WEB-INF/lib/mm.mysql-2.0.2-bin.jar - /usr/java/jakarta-tomcat/common/lib/mm.mysql-2.0.2-bin.jar I also have this in my server.xml Resources className=org.apache.naming.resources.FileDirContext allowLinking=true / I have also tried putting a phyichal file there instead of a link This is driving me crazy Thanks for any help -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 1:32 PM To: Tomcat Users List Subject: Re: Trying to start tomcat. Should be so simple On Sat, Apr 10, 2004 at 12:46:02PM -0500, Randy Paries wrote: : I have two identical boxes. Tomcat starts on one and not the other : : The jar that it says it can not find is there. : /WEB-INF/lib/mm.mysql-2.0.2-bin.jar : If I do ls -ls /home/unitnetWebapps/WEB-INF/lib/mm.mysql-2.0.2-bin.jar : It is there : [snip] : - Root Cause - : java.io.FileNotFoundException What are the perms on said file? i.e. what's the output of ls -l on each host? If the jar is a symlink, try ls -lL -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4 vs 5 form based container auth filters
I can see Yoav is blitzing the mailing list right now. Perhaps you'll get a more authoritative answer from him or the other hardcore tomcat people. One of the problems of excluding filters from the authentication request is to do with character-encoding in the request - I remember someone whose realm included users with user-names containing accented characters that had to be converted to the correct character-encoding for the realm database. He had used a filter to do it but obviously had to find another way. Adam On 04/12/2004 02:34 PM Martin Alley wrote: Except with form based auth, you want the look at feel to be part of the application? What reasons did you hear? :-) Whilst not knowing the full reasons, it would be nice if there was some config switch to control this, other wise it increases application maintainence overhead if you want to change the look and feel. I'll see if I can find anything in the tc5 release notes on this. Thanks again Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 13:13 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters AFAIK it has something to do with providing a clean seperation between the authentication (tomcat) and the application (your filter). I think there were probably several reasons though for it, which outweighed the reasons against, and I have heard a few of them. Adam On 04/12/2004 01:50 PM Martin Alley wrote: Hi Adam, Why do you think this behaviour changed from tomcat4 ? I haven't gone into the full architecture of sitemesh, as yet, but I know it includes a filter. Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:26 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters Yes your observations are correct. It's my understanding that filters are not invoked until after authentication. i.e. after the form-based login. I have no experience of site-mesh, but it seems a bit weird anyway to put decorations on a page via a filter - surely you should be encapsulating that sort of stuff in a JSP or taglib? Adam On 04/12/2004 11:02 AM Martin Alley wrote: Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Global resource JDBC/JNDI
If you want the resource available in all applications, make it a global environment entry and put the link in the default context for the host. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:41 PM To: Tomcat Users List Subject: Re: Global resource JDBC/JNDI Should I do it for all applications ? I try this in META-INF/context.xml and it don't work - when I add jndi with tomcat admin it work, but add all parameters in conf/Catalina/host/app.xml Is it correct behavior ? Thanks Haris Peco On Sunday 11 April 2004 02:56 pm, D'Alessandro, Arthur wrote: You need to make a refernce in your web app contexts to the global resource: ResourceLink name=jdbc/myresourcename global=jdbc/myresourcename type=javax.sql.DataSource/ -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 12:49 PM To: [EMAIL PROTECTED] Subject: Global resource JDBC/JNDI Hello, I set jdbc/jndi for web application, but I want set jdbc/jndi for all applications I try set jdbc/jndi in GlobalResource, but this resources don't see in web application automatic Is it possible regards Haris Peco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 5.0 Documentation: missing link
Hi, I've fixed this in CVS. Future distros and the next website update will show the fix. Thanks for pointing it out, Yoav Shapira Millennium Research Informatics -Original Message- From: Stephen Tredrea [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 4:20 AM To: [EMAIL PROTECTED] Subject: 5.0 Documentation: missing link The address http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/installation.htm l refers to Detailed instructions for downloading and installing Tomcat 5 are available here. where 'here' hyperlinks to http://jakarta.apache.org/tomcat/tomcat-5.0-doc/RUNNING.txt which appears to not be there. Not a big problem because the binary was easy to install anyway. Just wasn't sure who to let know... Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't access tomcat manager
If you had logged in to another application before you try Tomcat manager the authentication would not allow you to go through. You will have to close the browser and relaunch it again and go to Tomcat Manager first. Hope this helps. Kal -Original Message- From: Mario St-Gelais [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:22 PM To: Tomcat Users List Subject: Can't access tomcat manager As soon as I click on Tomcat Magager, I get the message The request requires HTTP authentication without even being ask for username and password. I just reinstalled Tomcat 5.0.19 because I wasa getting that messge, but the problem did not get solved. Curiously enough, if I acces Tomcat from another machine, then I have no problem getting to the manager. So it must be a machine issue??? -- _ Mario St-Gelais Good judgment comes from experience- usually experience which was the result of poor judgment Bill Putnam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] CONFIDENTIALITY NOTE: All e-mail sent to or from this address will be received by the Waterfield Group corporate e-mail system and is subject to archival, monitoring, and/or review by someone other than the recipient or the sender. This e-mail and any of its attachments may contain proprietary information, which is privileged and confidential. This e-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this e-mail is strictly prohibited and may be unlawful. If you have received this e-mail in error, please notify the sender immediately and permanently delete the original and any copy of this e-mail and any printout. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Global resource JDBC/JNDI
Why MET-INF/context.xml don't work ? Thanks On Monday 12 April 2004 12:53 pm, Benjamin Armintor wrote: If you want the resource available in all applications, make it a global environment entry and put the link in the default context for the host. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:41 PM To: Tomcat Users List Subject: Re: Global resource JDBC/JNDI Should I do it for all applications ? I try this in META-INF/context.xml and it don't work - when I add jndi with tomcat admin it work, but add all parameters in conf/Catalina/host/app.xml Is it correct behavior ? Thanks Haris Peco On Sunday 11 April 2004 02:56 pm, D'Alessandro, Arthur wrote: You need to make a refernce in your web app contexts to the global resource: ResourceLink name=jdbc/myresourcename global=jdbc/myresourcename type=javax.sql.DataSource/ -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 12:49 PM To: [EMAIL PROTECTED] Subject: Global resource JDBC/JNDI Hello, I set jdbc/jndi for web application, but I want set jdbc/jndi for all applications I try set jdbc/jndi in GlobalResource, but this resources don't see in web application automatic Is it possible regards Haris Peco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Global resource JDBC/JNDI
Is this TC4 or TC5? META-INF/context.xml only works with TC5 to my understanding. -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 11:09 AM To: [EMAIL PROTECTED] Subject: Re: Global resource JDBC/JNDI Why MET-INF/context.xml don't work ? Thanks On Monday 12 April 2004 12:53 pm, Benjamin Armintor wrote: If you want the resource available in all applications, make it a global environment entry and put the link in the default context for the host. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:41 PM To: Tomcat Users List Subject: Re: Global resource JDBC/JNDI Should I do it for all applications ? I try this in META-INF/context.xml and it don't work - when I add jndi with tomcat admin it work, but add all parameters in conf/Catalina/host/app.xml Is it correct behavior ? Thanks Haris Peco On Sunday 11 April 2004 02:56 pm, D'Alessandro, Arthur wrote: You need to make a refernce in your web app contexts to the global resource: ResourceLink name=jdbc/myresourcename global=jdbc/myresourcename type=javax.sql.DataSource/ -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 12:49 PM To: [EMAIL PROTECTED] Subject: Global resource JDBC/JNDI Hello, I set jdbc/jndi for web application, but I want set jdbc/jndi for all applications I try set jdbc/jndi in GlobalResource, but this resources don't see in web application automatic Is it possible regards Haris Peco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: starting out with tomcat and struts
From a clean binary distro of tomcat 5 this is all i have in there -rw--- 1 root root 673 Feb 14 21:26 admin.xml -rw--- 1 root root 321 Feb 14 21:26 balancer.xml -rw--- 1 root root 418 Feb 14 21:26 manager.xml and just to prove to you the webapps are missing bash-2.05# ls -l total 0 bash-2.05# pwd /tomcat/webapps/jsp-examples/cal -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:41 PM To: Tomcat Users List Subject: RE: starting out with tomcat and struts Hi, there are distributions of tomcat that do not come bundled with the examples. Normally there is another more complete download, or you can get them separately...take a look in the binaries on jakarta.apache.org under tomcat, I know they are there :) What on earth are you talking about? I spilled my coffee reading this (though thankfully only on this keyboard, and I'm tired of this keyboard anyways, but that's a long story). All tomcat distributions contain all the examples, always have. Recently they're not in the webapps directory: they're declared in conf/Catalina/localhost/examples.xml just like admin, manager, balancer. The docBase in example.xml will point to a directory under $CATALINA_HOME/server/webapps. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IIS Tomcat 5.0.19 - using jk2
Maybe this can help... www.dynamichostings.com/TomCat5IIS5.do -Original Message- From: Shlomi Levi [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: IIS Tomcat 5.0.19 - using jk2 Hi, I downloaded the jk2.0.4 for win32 from the jakarta site. And I followed step by step the configuration with the IIS (5sp4). But with no success. the mappings doesn't work, it looks for the server but it isn't found. (Config:1.A virtual directory under the IIS named 'jakarta' exists, and mapped to the ${TOMCAT_HOME}/bin dir, which in turn contains the isapi_redirector2.dll file. 2.A filter was set using isapi_redirector2.dll 3.The registry was set according to the instructions) ports: IIS:80,tomcat http:8080,tomcat ajp:8009 10x ahead, Shlomi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jdk1.4 tomcat5 log4j finds java.util.logging Logger not l og4j
my imports are import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; is that the problem? maybe when the author wrote these examples he was running jdk1.3 so it was not an issue, but running under 1.4 seems to find jdk1.4 logging thanks for any help, just tryin to get a handle on whats happening -Original Message- From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 5:37 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: jdk1.4 tomcat5 log4j finds java.util.logging Logger not log4j What are your imports? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Fri Apr 09 16:58:08 2004 To: [EMAIL PROTECTED] Subject:jdk1.4 tomcat5 log4j finds java.util.logging Logger not log4j hi all I am running tomcat 5, with jdk 1.4 and have not changed any of the jar directories (server/lib or common/lib) by adding my log4j.jar and the problem is when I got log, it is finding the jdk1.4 logging and not log4j. I have do log4j.jar in my WEB-INF/lib below is my init log4j init servlet and snippet of web.xml, all seems fine in the 1st servlet I hit, i do a private Log log = LogFactory.getLog(this.getClass().getName()); and then a print which Logger i am using and it shows java.util.logging.Logger System.out.println(* log= +log); which yields [EMAIL PROTECTED] and then System.out.println(* log.getLogger() = +((org.apache.commons.logging.impl.Jdk14Logger)log).getLogger()); which yields log.getLogger() [EMAIL PROTECTED] How can I get it to use log4j, i dropped log4j.jar in myapp/WEB-INF/lib/ and thought that would be enough any suggestions, and thanks for the help, Happy Easter this is an example from Struts Framework book (Switchback Software LLC), almost exact so I thought it should work === public class Log4jInitServlet extends HttpServlet { public void init() { String prefix = getServletContext().getRealPath(/); String file = getInitParameter(log4j-init-file); log(prefix+file= +prefix+file); if (file != null) { PropertyConfigurator.configure(prefix+file); } else { BasicConfigurator.configure(); } } public void doGet(HttpServletRequest req, HttpServletResponse res) { } } and web.xml --- servlet servlet-namelog4j-init/servlet-name servlet-classcdmanager.Log4jInitServlet/servlet-class init-param param-namelog4j-init-file/param-name param-valueWEB-INF\log4j.properties/param-value /init-param load-on-startup1/load-on-startup /servlet and my log4j.properties --- # Set root category priority to DEBUG and its only appender to A1. log4j.rootCategory=DEBUG,A1,F1 log4j.category.cdmanager=DEBUG,A1,F1 # A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout # log4j.appender.A1.layout.ConversionPattern=%d %-4r [%t](%F:%L) %-5p %c %x - %m%n log4j.appender.A1.layout.ConversionPattern=%d [%t](%F:%L) %-5p %x - %m%n # F1 is set to be a RollingFileAppender that uses PatternLayout, add F1 # to the desired categories to enable file trace log4j.appender.F1=org.apache.log4j.RollingFileAppender log4j.appender.F1.layout=org.apache.log4j.PatternLayout log4j.appender.F1.layout.ConversionPattern=%p %t %c - %m%n log4j.appender.F1.File=D:\\Tomcat5.0\\logs\\mylog.log log4j.appender.F1.MaxFileSize=100KB log4j.appender.F1.MaxBackupIndex=1 log4j.category.org=WARN,A1,F1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: directory structure and porting issues
QM - Thanks very much for your detailed reply. I have Shawn Bayern's JSTL in Action, and you're right - the URL issue is covered. I have also reviewed relevant portions of the Servlet Spec 2.4, which sets out the general approach to directory structure in applications. It seems safest to place the 'context' prefix before any URL. Cheers. At 11:36 AM 4/10/04 -0500, you wrote: : - Is there an online guide that helps app developers select a directory : structure that is portable across servlet containers? The servlet spec. Do a search at java.sun.com for it. You'll want 2.3 if you're running Tomcat 4, or 2.4 if you're running Tomcat 5. Either way, it's available as a PDF. As a Java web developer, the spec is your guide to webapp standards and portability. At the risk of sounding facetious, it answers all of your questions except this one: : - Finally, is it the best practice to hard-code the 'context' prefix in : your application? JSTL. I forget the exact tag names, but any JSTL reference will have them listed. There's a tag for creating context-relative links, and (I believe) one for creating context-relative image tags. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Regards, Bill Claxton [EMAIL PROTECTED] OpenAsia Solutions provides streaming media payment solutions. Check out http://www.openasia.net : - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: starting out with tomcat and struts
Hi, What distro is this from? 5.0.22 has examples.xml, 5.0.19 has webapps/jsp-examples and webapps/servlets-examples, 4.x. has webapps/examples. Maybe you have a .tar.gz distro that you unpacked with a non-GNU tar? Yoav Shapira Millennium Research Informatics -Original Message- From: electroteque [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 9:11 AM To: Tomcat Users List Subject: RE: starting out with tomcat and struts From a clean binary distro of tomcat 5 this is all i have in there -rw--- 1 root root 673 Feb 14 21:26 admin.xml -rw--- 1 root root 321 Feb 14 21:26 balancer.xml -rw--- 1 root root 418 Feb 14 21:26 manager.xml and just to prove to you the webapps are missing bash-2.05# ls -l total 0 bash-2.05# pwd /tomcat/webapps/jsp-examples/cal -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:41 PM To: Tomcat Users List Subject: RE: starting out with tomcat and struts Hi, there are distributions of tomcat that do not come bundled with the examples. Normally there is another more complete download, or you can get them separately...take a look in the binaries on jakarta.apache.org under tomcat, I know they are there :) What on earth are you talking about? I spilled my coffee reading this (though thankfully only on this keyboard, and I'm tired of this keyboard anyways, but that's a long story). All tomcat distributions contain all the examples, always have. Recently they're not in the webapps directory: they're declared in conf/Catalina/localhost/examples.xml just like admin, manager, balancer. The docBase in example.xml will point to a directory under $CATALINA_HOME/server/webapps. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using the request object and EL
On Mon, Apr 12, 2004 at 07:14:19AM -0400, John Trollinger wrote: : : I have a jsp page that has the following code : [snip] : request as EL: ${request.contextPath} br/ : request using page context as EL: : ${pageContext.request.contextPath} br/ You're using JSTL EL, but you're not closing those expressions in JSTL tags. That's the only way the page is going to know what you've included is meant to be JSTL-style dynamic content. btw, change request to requestScope inside JSTL EL. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI and DataSource
Hi everybody, This is a fairly simple problem, however this is one of those days a huge truck could easily pass over you without you even noticing it... anyway, here it goes! The environment is: JBuilder X + Tomcat 4.1 + DBCP The problem: I want to obtain a DB connection through a DataSource that I'm looking up using JNDI, configuring it inside server.xml So far, I'm obtaining a reference to the DataSource object as expected, using the jdbc/cnid name (that's the one I gave to that resource) on the java:comp/env Context. However, that object is not initialized and - the most bizarre part - the properties that I specified for that resource inside serverXXX.xml are not populated. I've read many postings and tutorials, even cut / pasted (adapted) several similar examples I've found throughout the web, but can't seem to make them work. I've already tested DB connections without DataSources and they work just fine. This is the server.xml file: ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true Context path=wa docBase=..\..\Testing debug=5 reloadable=true Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server This is the exception thrown when attempting to obtain a Connection from the DataSource I just looked-up (note that I'm printing the DataSource object on the second line of the log below): StandardHost[localhost]: Mapped to context '/wa' [EMAIL PROTECTED] org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:244) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:518) at com.bilbomatica.cnid.services.DBServiceProvider.getConnection(DBServiceP rovider.java:71) at org.apache.jsp.test_jsp._jspService(test_jsp.java:103) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at
How two tomcats share share DocRoot
Hello, I will try to be brief , but this will a little explanation of my config to under stand the question. I have two boxes. (rh9, tomcat 4.1.30, apache ) Box1 Host name=localhost debug=0 appBase=/home/unit unpackWARs=true Context path= docBase=/home/unit crossContext=true debug=0 reloadable=false Box 2 is configured the same but /home/unit is an nfs mount. The problem is they now share the same WEB-INF dir with all the classes, etc... What I would like to do is have box 2 have it own WEB-INF, but it still needs the DocBase to point to /home/unit I though I could make the appBase /home/foo and the docBase /home/unit, but when tomcat starts up on box 2 all the jars (and I assume other working class files are still begin deployed to Deploy JAR /WEB-INF/lib/activation.jar to /home/unit/WEB-INF/lib/activation.jar I hope I have described my problem correctly Thanks for any help Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and my application's performance ... time being lost?
Hi Yoav, That's what I have been doing the past 3 weeks but does the profiler not show time spent relative to the code execution ... my timings show the code and page execution to be very fast under load and so I deduced the time was being spent somewhere else. If the time was between Tomcat and IIS or network bandwidth then the Profiler is not going to pick that up I don't think? This is stressful in the extreme .. launch in the morning :( Cheers, ADC. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 13:42 To: Tomcat Users List Subject: RE: Tomcat and my application's performance ... time being lost? Hi, Use a Profiler to show you exactly where time is spent. Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:51 PM To: [EMAIL PROTECTED] Subject: Tomcat and my application's performance ... time being lost? Hello Guys *sigh* I am trying to make my app work as quick as possible but look at these stats... Page name: page_6 page_7 page_8 page_9 page_10 page_11 Min web transaction (without images): 460.79 1962.42 2296.12 2881.90 2660.72 1640.80 Avg web transaction (without images): 3681.05 3637.22 3472.87 3935.36 4368.14 3877.93 Max web transaction (without images): 5425.64 5875.14 5977.36 6194.46 7140.51 6557.30 That's 20 users x 3 iterations. What is puzzling me is that I have wrapped code-level timings around the very top entry point of the Struts action and the very bottom. These timings are coming out at sub 0.5s. I also have done the same in the top level template JSP that includes every page and the pages for the most part are timed at sub 0.4s. In general though add them together and I get sub 0.5s for execution of backend and frontend code. But look at the average transaction time above and 3+s is the best my Tomcat configuration is doing. I am beginning to suspect that this is not to do with my application code if my timings are so fast?? I suppose these type of timings are only for the running of the code and do not cover the time it takes for the user click to the Action itself, and also again for sending the page as a response stream?? Although the timings show fast execution, does this include sending the response stream itself - I don't think it does. I have tried this now on my home machine and 2 servers so I don't think it is to do with network latency or anything like that. I am pretty sure something in the application is slowing down but I have timed pretty much everything from database calls, page compilation and so fourth and it is all ultra-fast...so where is my time going? -- User Click -- My Action Servlet extends Struts Action Servlet framework -- Action Servlet calls Struts framwork I presume -- Struts framework calls my BaseAction (this is what I time) -- My Action class does it's work -- my BaseAction returns (output total time here = sub 0.5s) -- Struts/tiles handles sending JSP view to user -- My template JSP is called by Struts (this is timed again 0.4s) So if my code timings are really fast, then it could be Struts that is consuming the extra time? Advice on where can I turn next to determine the missing time is so very much appreciated. ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDI and DataSource
I MEANT OVER ME!!! Sorry... as you can see, I'm a little burned-out here... Thankx. -Mensaje original- De: Freddy Villalba Arias Enviado el: lunes, 12 de abril de 2004 15:44 Para: [EMAIL PROTECTED] Asunto: JNDI and DataSource Hi everybody, This is a fairly simple problem, however this is one of those days a huge truck could easily pass over you without you even noticing it... anyway, here it goes! The environment is: JBuilder X + Tomcat 4.1 + DBCP The problem: I want to obtain a DB connection through a DataSource that I'm looking up using JNDI, configuring it inside server.xml So far, I'm obtaining a reference to the DataSource object as expected, using the jdbc/cnid name (that's the one I gave to that resource) on the java:comp/env Context. However, that object is not initialized and - the most bizarre part - the properties that I specified for that resource inside serverXXX.xml are not populated. I've read many postings and tutorials, even cut / pasted (adapted) several similar examples I've found throughout the web, but can't seem to make them work. I've already tested DB connections without DataSources and they work just fine. This is the server.xml file: ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true Context path=wa docBase=..\..\Testing debug=5 reloadable=true Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server This is the exception thrown when attempting to obtain a Connection from the DataSource I just looked-up (note that I'm printing the DataSource object on the second line of the log below): StandardHost[localhost]: Mapped to context '/wa' [EMAIL PROTECTED] org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:244) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:518) at com.bilbomatica.cnid.services.DBServiceProvider.getConnection(DBServiceP rovider.java:71) at org.apache.jsp.test_jsp._jspService(test_jsp.java:103) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193)
Managing Tomcat Connections - Newbie
Hi all! I am using Tomcat (4.1.24) through my app vendor. I want to be able to manage my connections from the command line. I have found some info on ant and being able to do things like start/stop/reload/etc. I have not seen how this can be applied to managing connections. Here is my problem in a nut shell: When Tomcat starts, I get a minimum number of connections, let's say this is 2 and a maximum of 20. What is happening is that Tomcat is opening new sessions each and every time that a new session is requested. This number eventually reaches 20. At that point, I may have only two busy sessions and the remaining 18 are idle. These idle sessions are considered as resources connected to my database. I have top keep the number of resources down as low as possible. These idle sessions need to be trimmed if they have been in an idle state for too long. Is there any way of doing this with Tomcat from the command line? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using the request object and EL
QM, But the ${pageContext.request.contextPath} prints fine its only the ${request.contextPath} that does not display And if I do a c:if ${empty request} it returns true but a c:if ${empty pageContext.request} returns false. It is like I can get to the request through the page context just not directly john -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 9:44 AM To: Tomcat Users List Subject: Re: Using the request object and EL On Mon, Apr 12, 2004 at 07:14:19AM -0400, John Trollinger wrote: : : I have a jsp page that has the following code : [snip] : request as EL: ${request.contextPath} br/ : request using page context as EL: : ${pageContext.request.contextPath} br/ You're using JSTL EL, but you're not closing those expressions in JSTL tags. That's the only way the page is going to know what you've included is meant to be JSTL-style dynamic content. btw, change request to requestScope inside JSTL EL. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and my application's performance ... time being lost?
Hi, The profiler will show all time spent in java code, including for example the HTTP connector's read and write operations. It will not, as you surmise, show network transmission time, but since you said the behavior was the same using only your local machine (so nearly zero transmission time), I thought that was OK. I hope you can relax a bit, either before or after the launch -- spring is here, nice weather, outdoor activities, fun ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 9:57 AM To: Tomcat Users List Subject: RE: Tomcat and my application's performance ... time being lost? Hi Yoav, That's what I have been doing the past 3 weeks but does the profiler not show time spent relative to the code execution ... my timings show the code and page execution to be very fast under load and so I deduced the time was being spent somewhere else. If the time was between Tomcat and IIS or network bandwidth then the Profiler is not going to pick that up I don't think? This is stressful in the extreme .. launch in the morning :( Cheers, ADC. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 13:42 To: Tomcat Users List Subject: RE: Tomcat and my application's performance ... time being lost? Hi, Use a Profiler to show you exactly where time is spent. Yoav Shapira Millennium Research Informatics -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 3:51 PM To: [EMAIL PROTECTED] Subject: Tomcat and my application's performance ... time being lost? Hello Guys *sigh* I am trying to make my app work as quick as possible but look at these stats... Page name: page_6 page_7 page_8 page_9 page_10 page_11 Min web transaction (without images): 460.79 1962.42 2296.12 2881.90 2660.72 1640.80 Avg web transaction (without images): 3681.05 3637.22 3472.87 3935.36 4368.14 3877.93 Max web transaction (without images): 5425.64 5875.14 5977.36 6194.46 7140.51 6557.30 That's 20 users x 3 iterations. What is puzzling me is that I have wrapped code-level timings around the very top entry point of the Struts action and the very bottom. These timings are coming out at sub 0.5s. I also have done the same in the top level template JSP that includes every page and the pages for the most part are timed at sub 0.4s. In general though add them together and I get sub 0.5s for execution of backend and frontend code. But look at the average transaction time above and 3+s is the best my Tomcat configuration is doing. I am beginning to suspect that this is not to do with my application code if my timings are so fast?? I suppose these type of timings are only for the running of the code and do not cover the time it takes for the user click to the Action itself, and also again for sending the page as a response stream?? Although the timings show fast execution, does this include sending the response stream itself - I don't think it does. I have tried this now on my home machine and 2 servers so I don't think it is to do with network latency or anything like that. I am pretty sure something in the application is slowing down but I have timed pretty much everything from database calls, page compilation and so fourth and it is all ultra-fast...so where is my time going? -- User Click -- My Action Servlet extends Struts Action Servlet framework -- Action Servlet calls Struts framwork I presume -- Struts framework calls my BaseAction (this is what I time) -- My Action class does it's work -- my BaseAction returns (output total time here = sub 0.5s) -- Struts/tiles handles sending JSP view to user -- My template JSP is called by Struts (this is timed again 0.4s) So if my code timings are really fast, then it could be Struts that is consuming the extra time? Advice on where can I turn next to determine the missing time is so very much appreciated. ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
RE: Managing Tomcat Connections - Newbie
Hi, There's no way to manage connections from the command line, and you probably don't want to do it anyways. Consider: - Using shorter session timeouts (change from the default 30 minutes to 3 for example), - Redesigning your app so that a session doesn't have a one to one correlation with a database connection. That leads to horrible scalability anyhow. Use a connection pool. Yoav Shapira Millennium Research Informatics -Original Message- From: David Langschied [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:02 AM To: [EMAIL PROTECTED] Subject: Managing Tomcat Connections - Newbie Hi all! I am using Tomcat (4.1.24) through my app vendor. I want to be able to manage my connections from the command line. I have found some info on ant and being able to do things like start/stop/reload/etc. I have not seen how this can be applied to managing connections. Here is my problem in a nut shell: When Tomcat starts, I get a minimum number of connections, let's say this is 2 and a maximum of 20. What is happening is that Tomcat is opening new sessions each and every time that a new session is requested. This number eventually reaches 20. At that point, I may have only two busy sessions and the remaining 18 are idle. These idle sessions are considered as resources connected to my database. I have top keep the number of resources down as low as possible. These idle sessions need to be trimmed if they have been in an idle state for too long. Is there any way of doing this with Tomcat from the command line? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using the request object and EL
On Mon, Apr 12, 2004 at 10:03:09AM -0400, John Trollinger wrote: : But the ${pageContext.request.contextPath} prints fine its only the : ${request.contextPath} that does not display Fair cup -- I can't tell you what you've seen; I can only tell you what (I thought) shouldn't work ;) You're using one of the new JSP 2.0 JSP file tags, I take it? : And if I do a c:if ${empty request} it returns true but a c:if : ${empty pageContext.request} returns false. What about the other info I gave you? Changing request to requestScope w/in JSTL EL? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
write access to c:\winnt\system32
I searched the mailing list archives, and found that the jsp compiler needs write access to c:\winnt\system32. Is there a way to configure tomcat 4.1.24 so that write access to c:\winnt\system32 is not required? I'm working on an application that needs to be hosted in a secure environment. One of the steps the network administrators want to take to help secure the environment, is to not allow tomcat to have write access to system32. Thanks, Chris Gunn Titan Corporation (804) 550-7272 office (804) 651-8953 cell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Managing Tomcat Connections - Newbie
I can certainly shorten the session timeout. When a user connects to the application, this does not generate a any activity in Tomcat. When the user accesses a program, then the user is using a connection. This connection is part of a connection pool. What I find odd is that the connection used is not the oldest idle session, but a new connection is created (if the max has not been reached). On top of this, the minimum idle sessions do not get used unless the max has been reached and all of the sessions above min are busy, Is this the way Tomcat functions or just the way the application is accessing Tomcat? --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, There's no way to manage connections from the command line, and you probably don't want to do it anyways. Consider: - Using shorter session timeouts (change from the default 30 minutes to 3 for example), - Redesigning your app so that a session doesn't have a one to one correlation with a database connection. That leads to horrible scalability anyhow. Use a connection pool. Yoav Shapira Millennium Research Informatics -Original Message- From: David Langschied [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:02 AM To: [EMAIL PROTECTED] Subject: Managing Tomcat Connections - Newbie Hi all! I am using Tomcat (4.1.24) through my app vendor. I want to be able to manage my connections from the command line. I have found some info on ant and being able to do things like start/stop/reload/etc. I have not seen how this can be applied to managing connections. Here is my problem in a nut shell: When Tomcat starts, I get a minimum number of connections, let's say this is 2 and a maximum of 20. What is happening is that Tomcat is opening new sessions each and every time that a new session is requested. This number eventually reaches 20. At that point, I may have only two busy sessions and the remaining 18 are idle. These idle sessions are considered as resources connected to my database. I have top keep the number of resources down as low as possible. These idle sessions need to be trimmed if they have been in an idle state for too long. Is there any way of doing this with Tomcat from the command line? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: write access to c:\winnt\system32
Hi, I searched the mailing list archives, and found that the jsp compiler needs write access to c:\winnt\system32. It doesn't. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Managing Tomcat Connections - Newbie
Hi, What I find odd is that the connection used is not the oldest idle session Please clarify this, as a connection is not a session. If you're using a tomcat-managed connection pool, you're most likely using DBCP. The full docs for DBCP, which include significant tuning abilities regarding connection usage and creation, are at http://jakarta.apache.org/commons/dbcp/. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
¼Ú¬ü¡B¤é¥»¦P¨B¬y¦æ°ª¦w¥þ©Ê¤â®M
±zÁÙ¦bÀ¹¦Ñ´ڦ¡ªº¤â®M¶Ü? ±z»{¬°¤â®M¥u¯à¿m´H¨¾«B¶Ü? ¦ý±z©¿²¤¤F³Ì«nªº¬O.¦w¥þ©Ê? [EMAIL PROTECTED], [EMAIL PROTECTED], ¦¹´Ú¤â®M¥Dn±j½Õ¨ä¦w¥þ©Ê, ¾A¦X¦h¥\¯à¹B°Ê, ¯S®í§÷½èªº¶WÅÖ¥Ö, ¥[¤W¶W¼u©Êºô ¥¬, [EMAIL PROTECTED], [EMAIL PROTECTED],[EMAIL PROTECTED] ¦¹´Ú¤â®M¦P¨B¦b¼Ú¬ü ¡B¤é¥»µo°â,[EMAIL PROTECTED]@ªº,§O¦Ah«Ý±zªºÂù¤â¤F,[EMAIL PROTECTED] §Ú¦b eBay »OÆW¡]¥þ²yºô¸ô¥«¶°¡^¬Ý¨ì¦¹ª««~n¥X°â¡Aı±o§AÀ³¸Ó·|¦³¿³½ì¡I ª««~¼ÐÃD¡G¼Ú¬ü¡B¤é¥»¬y¦æ¤â®M ½æ®a¡Gav8doa ¶}©l®É¶¡¡G2004-04-05 09:39:01, TW µ²§ô®É¶¡¡G2004-04-15 09:39:01, TW n¹ïª««~¥X»ù¡A½Ð¦Ü¡Ghttp://cgi.tw.ebay.com/aw-cgi/eBayISAPI.dll?RedirectEnterpartner=14loc=http%3A%2F%2Fcgi%2Etw%2Eebay%2Ecom%2Fws%2FeBayISAPI%2Edll%3FViewItem%26item%3D3670637672%26category%3D2904%26ssPageName%3DADME%3AB%3AEF%3ATW%3A1 ª««~»¡©ú¡G ¼Ú¬ü¡B¤é¥»¬y¦æ¤â®M [EMAIL PROTECTED]@«¬¤â®M ¥D§÷®Æ¡G¶WÅÖ¥Ö¡B¶W¼u©Êºô¥¬¡B¨¾¼²Áû²É ÃC¦â¡G¶À¡B¬õ¡BÂÅ¡B¶Â ¤Ø¤o¡GM¡BL 175cm¥H¤U¾A¦XM¡B175cm¥H¤W¾A¦XL ¯Â¤â¤u»s³y ¼Æ¶q¦³ ÅwªïqÁÊ [EMAIL PROTECTED] Ápµ¸¹q¸Ü¡G0910-976976 ³¯¥ý¥Í - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Managing Tomcat Connections - Newbie
Since I am a newbie, I may not be getting the point across effectively by mixing terms. I have the ability to go to my connection manager and see a graphic representation of the current connections be they idle, busy, or initializing. Therefore, please disregard the term session. What I am referring to is these connections. On the other point of connection pool, I may be wrong, via terminology, on this as well. I have these connections out there and they are connected to my database and waiting for activity. If this is not a connection pool, I need to find out more about this method. --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, What I find odd is that the connection used is not the oldest idle session Please clarify this, as a connection is not a session. If you're using a tomcat-managed connection pool, you're most likely using DBCP. The full docs for DBCP, which include significant tuning abilities regarding connection usage and creation, are at http://jakarta.apache.org/commons/dbcp/. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Objects using thread on Start/Stop of Tomcat
Thanks Yoav, sudhakar -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 6:24 PM To: Tomcat Users List Subject: RE: Objects using thread on Start/Stop of Tomcat Hi, It's funny that you wrote your own thread manager and have to ask this question. No, tomcat cannot destroy all your threads and objects referred to from these threads. Tomcat can only destroy daemon threads for you. You need to take care of the rest by yourself. A ServletContextListener's contextDestroyed method is an excellent place to do this: shut down your thread manager and all your threads, otherwise tomcat's JVM process will not die. Yoav Shapira Millennium Research Informatics -Original Message- From: Namasivayam, Sudhakar (Cognizant) [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 2:10 AM To: Tomcat Users List Subject: Objects using thread on Start/Stop of Tomcat hi all, I have a Thread mgr which will create a thread. No if i Start and Stop the Tomcat, The older mgr object seems to be still in the JVM and this causes a problem because a new mgr is created and i have two copies of threads running simultaneously.. Can any one tell me whether all objects will be destroyed if i do start and stop of tomcat? Should i do anything in the Context Destroyed method od context listener? The older object is null in the context destroyed but the thread seems to be alive? Configuration : Linux + tomcat 4.0.4 + JDK 1.4 thanks in advance sudhakar This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clustering Application Scope Objects
and that is why we don't focus on implementing this, cause it not defined on how to resolve name/value pair conflicts if different servers set different values for the same name. If I were to implement this I would allow the user to have two ways of configure conflict resolution: 1. set-is-set, meaning that if the attribute with a given name is set, it can not be overwritten To set a new value, simply remove the old one, then set a new one. 2. override, meaning that whenever a broad cast with a new value, the last value is set To set a new value, just call context.setAttribute Filip -Original Message- From: Mike Duffy [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 10:53 PM To: Tomcat Users List; Struts Users Mailing List Subject: RE: Clustering Application Scope Objects how would you solve conflicts? For my purposes, I would let the database manage conflicts. Each application scope object would be tied to the database, a change made on a specific application server would first update the database. For example, the information from a table containing label/value pairs for product categories would be stored in application scope on each server at system startup. If a change were made to the product categories, the change would first made to the database and then a change notification would be broadcast to all servers in the cluster, each server would then reload the information from the database. In other cases, where application scoped objects are not backed by a database, the task of handling conflicts becomes more difficult. I think you would almost need to create some sort of locking mechanism that does not allow changes to be made during an update. Mike --- Filip Hanik (lists) [EMAIL PROTECTED] wrote: not implemented right now, how would you solve conflicts? Filip -Original Message- From: Mike Duffy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 5:48 PM To: Tomcat Users List Subject: Clustering Application Scope Objects I've read documentation for The Tomcat 5 Servlet/JSP Container: Clustering/Session Replication HOW-TO http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html I understand clustering for individual user sessions. Are there any correlated methods for clustering application scope objects? The J2EE API for the Interface ServletContext states, In the case of a web application marked distributed in its deployment descriptor, there will be one context instance for each virtual machine. In this situation, the context cannot be used as a location to share global information (because the information won't be truly global). Use an external resource like a database instead. Rather than use a database, what I would like to be able to do is make a call to servlet.getServletContext().setAttribute(key, object); and have the object stored in the application scope of all servers in the cluster. I know that EJBs were designed to serve this purpose; however, I would like to bypass the overhead and complexities of EJBs. If there isn't a switch that can be flipped in Tomcat, there might be a way to create a lightweight JMS administration class to serve this purpose. Has anyone tried this? If the answer to this question is RTFM, please send a link; I've looked through the documentation and I can't seem to find a clear reference. Thanks for your time and consideration. Mike __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To
RE: IIS Tomcat 5.0.19 - using jk2
It worked, many thanks -Original Message- From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 3:18 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: IIS Tomcat 5.0.19 - using jk2 Maybe this can help... www.dynamichostings.com/TomCat5IIS5.do -Original Message- From: Shlomi Levi [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: IIS Tomcat 5.0.19 - using jk2 Hi, I downloaded the jk2.0.4 for win32 from the jakarta site. And I followed step by step the configuration with the IIS (5sp4). But with no success. the mappings doesn't work, it looks for the server but it isn't found. (Config:1.A virtual directory under the IIS named 'jakarta' exists, and mapped to the ${TOMCAT_HOME}/bin dir, which in turn contains the isapi_redirector2.dll file. 2.A filter was set using isapi_redirector2.dll 3.The registry was set according to the instructions) ports: IIS:80,tomcat http:8080,tomcat ajp:8009 10x ahead, Shlomi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: coreservlets
The one thing I really dislike about this is that he recommends enabling the invoker servlet. This has caused more problems for beginners, than it has solved. All is opinion, though. -Original Message- From: electroteque [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 4:34 AM To: Tomcat Users List Subject: coreservlets I found this place pretty extensive, I may buy the books, would anyone recommend these ? www.coreservlets.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5, Tiles and encoding
Hi! I've just moved my Struts+Tiles application from TC4 to TC5 and I'm now having encoding problems when trying to post data...(portuguese special characters aren't being recognized). I've read topics about Tomcat 5+encoding issues related to included JSPs (ex: http://forum.java.sun.com/thread.jsp?forum=45thread=495792) and since I use Tiles and Tiles uses RequestDispatcher.include calls to include markup jsp components in layouts, I'm trying this way...but the labels in my page are ok - just my posted data have the problem. Is there anyone with the same issue? Thanks in advance! Paulo Alvim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Urgent pls help ! Protection problems of using Realm
Dear all, I know using Realm can protect certain resouces of a url. But I found it is not possibly to use it in my server. My case is that I can't store the username and password of the roles and users in my server. I need to send the authenication information in a format of xml file to a foreign server and get back the login result from that server. So I can't use Realm to check the roles and password and do authentication directly in my server. Is there any method that can solve that problem ? or any method instead of using Realm ? or override the current settings of Realm ? Thankyou very much ! kawai ... http://ringtone.yahoo.com.hk/
RE: write access to c:\winnt\system32
Ok, I guess I read this wrong, or this person was wrong too. http://www.mail-archive.com/[EMAIL PROTECTED]/msg93632.html Either way, something seems to require write access to the system32 directory because it works fine with full permissions, but fails when write access is denied. It's trying to create files like c:\winnt\system32\files-460905954. Any help would be appreciated. Thanks, Chris Gunn Titan Corporation (804) 550-7272 office (804) 651-8953 cell -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:35 AM To: Tomcat Users List Subject: RE: write access to c:\winnt\system32 Hi, I searched the mailing list archives, and found that the jsp compiler needs write access to c:\winnt\system32. It doesn't. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Require a tomcat build with bug fix....
Hello, My company requires a stable build of tomcat 4.0 that contains a bug fix to the WebAppClassLoader. Specifically the bug is 10469 (deals with inconsisten encoding of urls). I was wondering 2 things. 1) How might i aquire a build of tomcat that currently has this bug fix (without building tomcat myself, i.e. is there a nightly build i can pickup that has this fix) 2) When will apache be releasing thier next stable build of tomcat 4.0. Thanks For any help. Philip Baruc = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: write access to c:\winnt\system32
Hi, Ok, I guess I read this wrong, or this person was wrong too. http://www.mail-archive.com/[EMAIL PROTECTED]/msg93632.htm l Either way, something seems to require write access to the system32 directory because it works fine with full permissions, but fails when write access is denied. It's trying to create files like c:\winnt\system32\files-460905954. Neither Eric was wrong nor did you read it wrong. It's a simple configuration issue: - Don't start tomcat from %systemroot%\system32 (so it doesn't get set as the working directory), - Make sure that directory is not set as java.io.tmpdir (the tomcat scripts don't do this, but in case you overrode/customized them), - Make sure the JSP servlet (in $CATALINA_HOME/conf/web.xml) has a scratchdir you like (see http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html) I think that's it. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Require a tomcat build with bug fix....
Hi, There have been stable releases since this was fixed: 4.1.30 on the tomcat 4.1 branch and 5.0.19 on the tomcat 5 branch. 4.0 is no longer actively developed. If you need this fix in a 4.0 build, you have to apply this patch and build it yourself. Yoav Shapira Millennium Research Informatics -Original Message- From: Philip Baruc [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 11:14 AM To: [EMAIL PROTECTED] Subject: Require a tomcat build with bug fix Hello, My company requires a stable build of tomcat 4.0 that contains a bug fix to the WebAppClassLoader. Specifically the bug is 10469 (deals with inconsisten encoding of urls). I was wondering 2 things. 1) How might i aquire a build of tomcat that currently has this bug fix (without building tomcat myself, i.e. is there a nightly build i can pickup that has this fix) 2) When will apache be releasing thier next stable build of tomcat 4.0. Thanks For any help. Philip Baruc = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI and DataSource
You have a default context right after the wa context that doesn't specify a Resource . Is that what you meant? Sandy On Apr 12, 2004, at 9:44 AM, Freddy Villalba Arias wrote: [...] /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDI and DataSource
Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved the initialization problem. So, it's not what I originally wanted (I'd remove it if I knew how to elegantly solve the dummy web app - or just no default web app, if possible - issue), but it does the job for now (if you can provide some insight on this other subject, I would also appreciate it). HTH. -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 17:32 Para: Tomcat Users List Asunto: Re: JNDI and DataSource You have a default context right after the wa context that doesn't specify a Resource . Is that what you meant? Sandy On Apr 12, 2004, at 9:44 AM, Freddy Villalba Arias wrote: [...] /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
use own property file for db-connection
Hi everyone, I'm working with Tomcat 5.0 and I'm trying to write a little webapplication. In this case I need to get the data from a database. Now I want to write my own property-file from which I can get the information about the driver, user and password. I've done this before, but I haven't done it on a webserver so far. To get the Connection I'm using a connectionfactory.jar file which reads the property file and establishes a connection. My question is now if this can work? And if yes where to do I have to put the property file? Maybe someone has done this before and can help me?! Would be great, thx Amrûn -- NEU : GMX Internet.FreeDSL Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: write access to c:\winnt\system32
Yoav, Thanks for the help. I added the following registry key to change the working directory for the service and it now works. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat 4.1\Parameters\Current Directory=c:\Tomcat4.1\work Thanks, Chris Gunn Titan Corporation (804) 550-7272 office (804) 651-8953 cell -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 11:17 AM To: Tomcat Users List Subject: RE: write access to c:\winnt\system32 Hi, Ok, I guess I read this wrong, or this person was wrong too. http://www.mail-archive.com/[EMAIL PROTECTED]/msg93632.htm l Either way, something seems to require write access to the system32 directory because it works fine with full permissions, but fails when write access is denied. It's trying to create files like c:\winnt\system32\files-460905954. Neither Eric was wrong nor did you read it wrong. It's a simple configuration issue: - Don't start tomcat from %systemroot%\system32 (so it doesn't get set as the working directory), - Make sure that directory is not set as java.io.tmpdir (the tomcat scripts don't do this, but in case you overrode/customized them), - Make sure the JSP servlet (in $CATALINA_HOME/conf/web.xml) has a scratchdir you like (see http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html) I think that's it. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: coreservlets
I'd definately recommend core and more servlets - incidentally they say The invoker servlet is extremely convenient when you are learning and even when you are doing your initial development. But, as discussed in the book, you do not want it on at deployment time Hope this helps Ken Ken Blair visitscotland.com 6 Fairways Business Park Deer Park Avenue Livingston EH54 8AF Scotland t: f: m: e: [EMAIL PROTECTED] To book your holiday in Scotland go to http://www.visitscotland.com or call the National Booking and Information line on 0845 22 55 121 -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 15:55 To: 'Tomcat Users List' Subject: RE: coreservlets The one thing I really dislike about this is that he recommends enabling the invoker servlet. This has caused more problems for beginners, than it has solved. All is opinion, though. -Original Message- From: electroteque [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 4:34 AM To: Tomcat Users List Subject: coreservlets I found this place pretty extensive, I may buy the books, would anyone recommend these ? www.coreservlets.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Disclaimer - 12/04/2004 - This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of visitscotland.com Warning: Although visitscotland.com has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage rising from the use of this email or attachments. If you have received this email in error please notify the visitscotland.com helpdesk by email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4 vs 5 form based container auth filters
Thanks Adam It seems to me that the separation idea is not clear cut. There is certainly a down side. I wonder whether this will stick. Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 13:48 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters I can see Yoav is blitzing the mailing list right now. Perhaps you'll get a more authoritative answer from him or the other hardcore tomcat people. One of the problems of excluding filters from the authentication request is to do with character-encoding in the request - I remember someone whose realm included users with user-names containing accented characters that had to be converted to the correct character-encoding for the realm database. He had used a filter to do it but obviously had to find another way. Adam On 04/12/2004 02:34 PM Martin Alley wrote: Except with form based auth, you want the look at feel to be part of the application? What reasons did you hear? :-) Whilst not knowing the full reasons, it would be nice if there was some config switch to control this, other wise it increases application maintainence overhead if you want to change the look and feel. I'll see if I can find anything in the tc5 release notes on this. Thanks again Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 13:13 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters AFAIK it has something to do with providing a clean seperation between the authentication (tomcat) and the application (your filter). I think there were probably several reasons though for it, which outweighed the reasons against, and I have heard a few of them. Adam On 04/12/2004 01:50 PM Martin Alley wrote: Hi Adam, Why do you think this behaviour changed from tomcat4 ? I haven't gone into the full architecture of sitemesh, as yet, but I know it includes a filter. Martin -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: 12 April 2004 11:26 To: Tomcat Users List Subject: Re: tomcat 4 vs 5 form based container auth filters Yes your observations are correct. It's my understanding that filters are not invoked until after authentication. i.e. after the form-based login. I have no experience of site-mesh, but it seems a bit weird anyway to put decorations on a page via a filter - surely you should be encapsulating that sort of stuff in a JSP or taglib? Adam On 04/12/2004 11:02 AM Martin Alley wrote: Can anyone comment on this? Thanks Martin -Original Message- From: Martin Alley [mailto:[EMAIL PROTECTED] Sent: 09 April 2004 09:53 To: Tomcat Users List Subject: tomcat 4 vs 5 form based container auth filters Hi, Initial observation indicates that filters get executed when a form for form based container auth is served - under tomcat 4, but not under tomcat 5. I'm using sitemesh. The decorations go on the form based login page under tomcat 4, but not under tomcat 5. I need to do more research, but can any one add to this? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: use own property file for db-connection
Yes, it can work, and you'd want to put the properties file in the WEB-INF/classes directory. Then your connectionfactory.jar classes will need to look for the property file/s on the classpath. Perhaps something like: InputStream input = getContextClassLoader().getResourceAsStream(fileName); Properties props.load(input); -Original Message- From: Amrun [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:47 AM To: [EMAIL PROTECTED] Subject: use own property file for db-connection Hi everyone, I'm working with Tomcat 5.0 and I'm trying to write a little webapplication. In this case I need to get the data from a database. Now I want to write my own property-file from which I can get the information about the driver, user and password. I've done this before, but I haven't done it on a webserver so far. To get the Connection I'm using a connectionfactory.jar file which reads the property file and establishes a connection. My question is now if this can work? And if yes where to do I have to put the property file? Maybe someone has done this before and can help me?! Would be great, thx Amrûn -- NEU : GMX Internet.FreeDSL Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: coreservlets
convenient when learning Not when you have to 'unlearn' it. And not for the special case when you 'forget' about the invoker, and just expect it to be around. sarcasmProviding a 8-line mapping is such a chore./sarcasm I'm all for helping beginners, but I think showing them the 'right' way is the best option, particulary since it's not **that** hard (and certainly not the hardest thing they'll encounter developing servlet/jsp apps) . convenient when initial development... I can think of no case where this 'helps'. I proceed to code a bunch of /servlet/foo in any includes, forwards, links, etc, etc. Now I need to go back and change them all? How does this help? Do it correctly from the start! -Original Message- From: Ken Blair [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:54 AM To: Tomcat Users List Subject: RE: coreservlets I'd definately recommend core and more servlets - incidentally they say The invoker servlet is extremely convenient when you are learning and even when you are doing your initial development. But, as discussed in the book, you do not want it on at deployment time Hope this helps Ken Ken Blair visitscotland.com 6 Fairways Business Park Deer Park Avenue Livingston EH54 8AF Scotland t: f: m: e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI and DataSource
This shouldn't be all that different, but this is the server.xml I'd use on my setup. ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN GlobalNamingResources Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true DefaultContext ResourceLink name=jdbc/cnid global=jdbc/cnid type=javax.sql.DataSource/ /DefaultContext Context path=wa docBase=..\..\Testing debug=5 reloadable=true /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server HTH Sandy On Apr 12, 2004, at 11:36 AM, Freddy Villalba Arias wrote: Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved the initialization problem. So, it's not what I originally wanted (I'd remove it if I knew how to elegantly solve the dummy web app - or just no default web app, if possible - issue), but it does the job for now (if you can provide some insight on this other subject, I would also appreciate it). HTH. -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 17:32 Para: Tomcat Users List Asunto: Re: JNDI and DataSource You have a default context right after the wa context that doesn't specify a Resource . Is that what you meant? Sandy On Apr 12, 2004, at 9:44 AM, Freddy Villalba Arias wrote: [...] /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Require a tomcat build with bug fix....
When i look at the CVS repository and look at the WebAppClassLoader file, It doesn't appear that the bug was fixed in the 4.1.30 build. I've also downloaded the 4.1.30 source and noticed that the WebAppClassLoader is only at version 1.48 where as the bug fix is applied to a 1.50 version of the WebAppClassLoader. Is there a way for me confirm that this bug fix should be in the 4.1.30 version of tomcat? Also aren't the 5.0 version of tomcat very different architecturaly from the 4.0 versions? I'm afraid to just remove the 4.0 version and jump to the 5.0 version. Regards, Philip Baruc --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, There have been stable releases since this was fixed: 4.1.30 on the tomcat 4.1 branch and 5.0.19 on the tomcat 5 branch. 4.0 is no longer actively developed. If you need this fix in a 4.0 build, you have to apply this patch and build it yourself. Yoav Shapira Millennium Research Informatics -Original Message- From: Philip Baruc [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 11:14 AM To: [EMAIL PROTECTED] Subject: Require a tomcat build with bug fix Hello, My company requires a stable build of tomcat 4.0 that contains a bug fix to the WebAppClassLoader. Specifically the bug is 10469 (deals with inconsisten encoding of urls). I was wondering 2 things. 1) How might i aquire a build of tomcat that currently has this bug fix (without building tomcat myself, i.e. is there a nightly build i can pickup that has this fix) 2) When will apache be releasing thier next stable build of tomcat 4.0. Thanks For any help. Philip Baruc = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using the request object and EL
Problem solved. I was mixing up 2 parts of the spec and therefor made the wrong assumption. Thanks, John -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:13 AM To: Tomcat Users List Subject: Re: Using the request object and EL On Mon, Apr 12, 2004 at 10:03:09AM -0400, John Trollinger wrote: : But the ${pageContext.request.contextPath} prints fine its only the : ${request.contextPath} that does not display Fair cup -- I can't tell you what you've seen; I can only tell you what (I thought) shouldn't work ;) You're using one of the new JSP 2.0 JSP file tags, I take it? : And if I do a c:if ${empty request} it returns true but a c:if : ${empty pageContext.request} returns false. What about the other info I gave you? Changing request to requestScope w/in JSTL EL? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Urgent pls help ! Protection problems of using Realm
You need to write a custom realm. Mark My case is that I can't store the username and password of the roles and users in my server. I need to send the authenication information in a format of xml file to a foreign server and get back the login result from that server. So I can't use Realm to check the roles and password and do authentication directly in my server. Is there any method that can solve that problem ? or any method instead of using Realm ? or override the current settings of Realm ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDI and DataSource
Hi Sandy, Thanks, it certainly looked better than mine. I appreciate it. However, the problem persists Any other suggestion? (Ill keep looking at it, too obviously) -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 18:29 Para: Tomcat Users List Asunto: Re: JNDI and DataSource This shouldn't be all that different, but this is the server.xml I'd use on my setup. ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN GlobalNamingResources Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true DefaultContext ResourceLink name=jdbc/cnid global=jdbc/cnid type=javax.sql.DataSource/ /DefaultContext Context path=wa docBase=..\..\Testing debug=5 reloadable=true /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server HTH Sandy On Apr 12, 2004, at 11:36 AM, Freddy Villalba Arias wrote: Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved the initialization problem. So, it's not what I originally wanted (I'd remove it if I knew how to elegantly solve the dummy web app - or just no default web app, if possible - issue), but it does the job for now (if you can provide some insight on this other subject, I would also appreciate it). HTH. -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 17:32 Para: Tomcat Users List Asunto: Re: JNDI and DataSource You have a default context right after the wa context that doesn't specify a Resource . Is that what you meant? Sandy On Apr 12, 2004, at 9:44 AM, Freddy Villalba Arias wrote: [...] /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat performance issue?
I have this same problem. It creeped up without any configuration changes on 4.1.27 It doesn't always print this error message out, but the effect is the same. SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads (75) or check the servlet status My apache config: Timeouts: connection: 300keep-alive: 300 MPM Name: Prefork MPM Information: Max Daemons: 255 Threaded: no Forked: yes IfModule prefork.c StartServers 8 MinSpareServers5 MaxSpareServers 20 MaxClients 255 MaxRequestsPerChild 1000 /IfModule Tomcat config: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? Why is the connectionTimeout being reached? I think I had set it to a really high number because I figured I didn't want anything to ever hit it. Is some servlet not returning content but hanging on to a connection? Could you explain a little further about 'bug in a servlet causing it to not return'? I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Daniel Gibby David Rees wrote: Like the messages say, all Tomcat threads are busy and you've hit the maximum number of threads which can be processed concurrently. Sounds like you've got either a bug in a servlet causing it to not return, or your server is simply overloaded. You can get a stack trace from the JVM to help debug this issue pretty easily. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat performance issue?
I forgot to mention that I have All threads (255) are currently busy, not (75) which makes sense. Daniel Gibby wrote: I have this same problem. It creeped up without any configuration changes on 4.1.27 It doesn't always print this error message out, but the effect is the same. SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads (75) or check the servlet status My apache config: Timeouts: connection: 300keep-alive: 300 MPM Name: Prefork MPM Information: Max Daemons: 255 Threaded: no Forked: yes IfModule prefork.c StartServers 8 MinSpareServers5 MaxSpareServers 20 MaxClients 255 MaxRequestsPerChild 1000 /IfModule Tomcat config: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? Why is the connectionTimeout being reached? I think I had set it to a really high number because I figured I didn't want anything to ever hit it. Is some servlet not returning content but hanging on to a connection? Could you explain a little further about 'bug in a servlet causing it to not return'? I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Daniel Gibby David Rees wrote: Like the messages say, all Tomcat threads are busy and you've hit the maximum number of threads which can be processed concurrently. Sounds like you've got either a bug in a servlet causing it to not return, or your server is simply overloaded. You can get a stack trace from the JVM to help debug this issue pretty easily. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirection error Tomcat 3.2.3 IIS5
All, New subscriber to this list and relative newbie to Tomcat. Have installed IIS5 w/Tomcat 3.2.3 on W2K. Am having problems with redirection using isapsi. I get the Error 501/505 when attempting http://myserver/examples/jsp/index. I have checked this archive list with the same error messages to no avail. I *can* access http://myserver:8080/examples/jsp/index.html ok and all the examples work fine. Completed: -- created jakarta virtual directory with correct permissions per documentation -- port on workers.properties = port on server.xml (8007) --Tomcat started with no errors -- IIS started w/no errors -- triple checked the path where isapi_redirect.dll is correct in IIS Manager. -- Checked the Tomcat IISHowTo document from jakarta.apache.org. This is from my iis_redirect.log. jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters [jk_uri_worker_map.c (431)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong parameters [jk_uri_worker_map.c (431)]: In jk_uri_worker_map_t::map_uri_to_worker, wrong parameters Checked the uriworkers.properties file: # # Simple worker configuration file # # Mount the servlet context to the ajp12 worker /servlet/*=ajp12 # Mount the examples context to the ajp12 worker /examples/*=ajp12 # Advanced mount of the examples context # /examples/*.jsp=ajp12 # /examples/servlet/*=ajp12 Here is my workers.properties file: # # $Header: /home/cvs/jakarta-tomcat/src/etc/Attic/workers.properties,v 1.3.2.2 2000/10/16 01:59:22 larryi Exp $ # $Revision: 1.3.2.2 $ # $Date: 2000/10/16 01:59:22 $ # # # workers.properties - # # This file provides jk derived plugins with with the needed information to # connect to the different tomcat workers. # # As a general note, the characters $( and ) are used internally to define # macros. Do not use them in your own configuration!!! # # Whenever you see a set of lines such as: # x=value # y=$(x)\something # # the final value for y will be value\something # # Normaly all you will need to modify is the first properties, i.e. # workers.tomcat_home, workers.java_home and ps. Most of the configuration # is derived from these. # # When you are done updating workers.tomcat_home, workers.java_home and ps # you should have 3 workers configured: # # - An ajp12 worker that connects to localhost:8007 # - An ajp13 worker that connects to localhost:8009 # - A jni inprocess worker. # - A load balancer worker # # However by default the plugins will only use the ajp12 worker. To have # the plugins use other workers you should modify the worker.list property. # # # # workers.tomcat_home should point to the location where you # installed tomcat. This is where you have your conf, webapps and lib # directories. # workers.tomcat_home=d:\tomcat # # workers.java_home should point to your Java installation. Normally # you should have a bin and lib directories beneath it. # workers.java_home=d:\jdk # # You should configure your environment slash... ps=\ on NT and / on UNIX # and maybe something different elsewhere. # ps=\ # ps=/ # #-- ADVANCED MODE #- # # #-- DEFAULT worket list -- #- # # # The workers that your plugins should create and work with # worker.list=ajp12, ajp13 # #-- DEFAULT ajp12 WORKER DEFINITION -- #- # # # Defining a worker named ajp12 and of type ajp12 # Note that the name and the type do not have to match. # worker.ajp12.port=8007 worker.ajp12.host=localhost worker.ajp12.type=ajp12 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.ajp12.lbfactor=1 # #-- DEFAULT ajp13 WORKER DEFINITION -- #- # # # Defining a worker named ajp13 and of type ajp13 # Note that the name and the type do not have to match. # worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.ajp13.lbfactor=1 # # Specify the size of the open connection cache. #worker.ajp13.cachesize # #-- DEFAULT LOAD BALANCER WORKER DEFINITION -- #- # # # The loadbalancer (type lb) workers perform wighted round-robin # load balancing with sticky sessions. # Note: # If a worker dies, the load balancer will check its state #once in a while. Until then all work is redirected to peer #workers.
RE: Tomcat performance issue?
It could be a bug in your servlet that hangs your connection or you might actually have a big enough load to max out your number of concurrent Tomcat threads (maxProcessors). If it is load, you should look into increasing your maxProcessors. Make sure though that you have enough JVM heap memory (Xmx parm) to handle it or you will run into OutOfMemory error which is worse than out-of-connections. Jason -Original Message- From: Daniel Gibby [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 9:43 AM To: Tomcat Users List Subject: Re: Tomcat performance issue? I have this same problem. It creeped up without any configuration changes on 4.1.27 It doesn't always print this error message out, but the effect is the same. SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads (75) or check the servlet status My apache config: Timeouts: connection: 300keep-alive: 300 MPM Name: Prefork MPM Information: Max Daemons: 255 Threaded: no Forked: yes IfModule prefork.c StartServers 8 MinSpareServers5 MaxSpareServers 20 MaxClients 255 MaxRequestsPerChild 1000 /IfModule Tomcat config: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? Why is the connectionTimeout being reached? I think I had set it to a really high number because I figured I didn't want anything to ever hit it. Is some servlet not returning content but hanging on to a connection? Could you explain a little further about 'bug in a servlet causing it to not return'? I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Daniel Gibby David Rees wrote: Like the messages say, all Tomcat threads are busy and you've hit the maximum number of threads which can be processed concurrently. Sounds like you've got either a bug in a servlet causing it to not return, or your server is simply overloaded. You can get a stack trace from the JVM to help debug this issue pretty easily. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: coreservlets
I have the More Servlets book. It's excellent. Highly recommended. Subir -Original Message- From: Schalk [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 6:04 AM To: 'Tomcat Users List' Subject: RE: coreservlets Importance: High I have the first edition, it is pretty nice and very detailed. Have not looked at the other book or the second edition but think the newer books will be a better bet. Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: electroteque [mailto:[EMAIL PROTECTED] :: Sent: Sunday, April 11, 2004 11:34 AM :: To: Tomcat Users List :: Subject: coreservlets :: :: I found this place pretty extensive, I may buy the books, would anyone :: recommend these ? :: :: www.coreservlets.com :: :: :: - :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Require a tomcat build with bug fix....
Hi, I've also downloaded the 4.1.30 source and noticed that the WebAppClassLoader is only at version 1.48 where as the bug fix is applied to a 1.50 version of the WebAppClassLoader. I'm not sure where you're getting your version numbers. http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/s hare/org/apache/catalina/loader/ shows that 1.31 is the current CVS version of WebAppClassLoader, so what's 1.48 and 1.50 that you're talking about? Mark marked the issue as fixed on 2004-02-22. 4.1.30 was released on 2004-01-25. So what I said before was wrong: 4.1.30 doesn't have your fix. For that matter, 5.0.19 is from 2004-02-14, so it doesn't have your fix either. 5.0.22-alpha is from last week and should have your fix. Tomcat 5 is not so different that you should be afraid to try it. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI and DataSource
Hi, The fact that you get 'No suitable driver' could also mean that the chosen properties are incompatible (as opposed to not set). Just a guess: did you try to specify the user and password as part of the URL? (jdbc:oracle:thin:user/[EMAIL PROTECTED]) That's the way I usually connect to oracle. You never know, maybe that's it... HTH, Guy http://www.atomikos.com - Our JTA for your transactions On maandag, apr 12, 2004, at 18:35 Europe/Brussels, Freddy Villalba Arias wrote: image.tiff Hi Sandy, Thanks, it certainly looked better than mine. I appreciate it. However, the problem persists Any other suggestion? (Ill keep looking at it, too obviously) -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12de abril de 2004 18:29 Para: Tomcat Users List Asunto: Re: JNDI and DataSource This shouldn't be all that different, but this is the server.xml I'd use on my setup. ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN GlobalNamingResources Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true DefaultContext ResourceLink name=jdbc/cnid global=jdbc/cnid type=javax.sql.DataSource/ /DefaultContext Context path=wa docBase=..\..\Testing debug=5 reloadable=true /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server HTH Sandy On Apr 12, 2004, at 11:36 AM, Freddy Villalba Arias wrote: Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved the initialization problem. So, it's not what I originally wanted (I'd remove it if I knew how to elegantly solve the dummy web app - or just no default web app, if possible - issue), but it does the job for now (if you can provide some insight on this other subject, I would also appreciate it). HTH. -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 17:32 Para: Tomcat Users List Asunto: Re: JNDI and DataSource You have a default context right after the wa context that doesn't specify a Resource . Is that what you meant? Sandy On Apr 12, 2004, at 9:44 AM, Freddy Villalba Arias wrote: [...] /ResourceParams /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Dr. Guy Pardon ( [EMAIL PROTECTED] ) Atomikos: Your Partner for Reliable eBusiness Coordination http://www.atomikos.com/ The information in this email is confidential and only meant for the addressee(s). The content of this email is informal and will not be legally binding for Atomikos.
Re: Encrypted Mail
Please read the attachment to get the message. ** ** WARNING: WinProxy has detected a virus in file attached to this e-mail message! The attachment has been automatically removed to protect your network. WinProxy Administrator: unknown 04/12/04 19:14:13 WinProxy (Version 5.1 R1d (5.0.50.10)) - http://www.Ositis.com/ Antivirus Vendor: Panda Software Scan Engine Version: 2.10.1.6_3.1.5.211 Pattern File Version: 3.73866 (Timestamp: 2004/04/12 08:00:00) Machine name: WPROXY Machine IP address: 192.168.168.100 Server: 208.185.179.12 Client: JUANJO Protocol: SMTP Virus: W32/Netsky.P.worm found! Attachment: readme_tomcat-user.zip ** ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDI and DataSource
Hi Guy, That's interesting. I hadn't thought about that possibility. I'll try it. However, let me state that I don't think that's the problem (hope I'm wrong, of course!) since the inspection (JBuilder inspector) on the java variable holding the reference to the DataSource object reveals that the properties are indeed not being populated (in fact, there is an attribute dataSource which I suppose is intended for holding the actual DataSource and it's null as well). Anyway, can't discard anything and your help is appreciated. Will let you know the outcome of this test. Cheers, Freddy. -Mensaje original- De: Guy Pardon [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 19:02 Para: Tomcat Users List Asunto: Re: JNDI and DataSource Hi, The fact that you get 'No suitable driver' could also mean that the chosen properties are incompatible (as opposed to not set). Just a guess: did you try to specify the user and password as part of the URL? (jdbc:oracle:thin:user/[EMAIL PROTECTED]) That's the way I usually connect to oracle. You never know, maybe that's it... HTH, Guy http://www.atomikos.com - Our JTA for your transactions On maandag, apr 12, 2004, at 18:35 Europe/Brussels, Freddy Villalba Arias wrote: image.tiff Hi Sandy, Thanks, it certainly looked better than mine. I appreciate it. However, the problem persists... Any other suggestion? (I'll keep looking at it, too... obviously) -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12de abril de 2004 18:29 Para: Tomcat Users List Asunto: Re: JNDI and DataSource This shouldn't be all that different, but this is the server.xml I'd use on my setup. ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN GlobalNamingResources Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true DefaultContext ResourceLink name=jdbc/cnid global=jdbc/cnid type=javax.sql.DataSource/ /DefaultContext Context path=wa docBase=..\..\Testing debug=5 reloadable=true /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server HTH Sandy On Apr 12, 2004, at 11:36 AM, Freddy Villalba Arias wrote: Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved
Re: Tomcat performance issue?
255 is as high as apache will go without recompiling. Therefore, it wouldn't make a difference if I go higher on the tomcat end either, right? Trieu, Jason T - CNF wrote: It could be a bug in your servlet that hangs your connection or you might actually have a big enough load to max out your number of concurrent Tomcat threads (maxProcessors). If it is load, you should look into increasing your maxProcessors. Make sure though that you have enough JVM heap memory (Xmx parm) to handle it or you will run into OutOfMemory error which is worse than out-of-connections. Jason -Original Message- From: Daniel Gibby [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 9:43 AM To: Tomcat Users List Subject: Re: Tomcat performance issue? I have this same problem. It creeped up without any configuration changes on 4.1.27 It doesn't always print this error message out, but the effect is the same. SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads (75) or check the servlet status My apache config: Timeouts: connection: 300keep-alive: 300 MPM Name: Prefork MPM Information: Max Daemons: 255 Threaded: no Forked: yes IfModule prefork.c StartServers 8 MinSpareServers5 MaxSpareServers 20 MaxClients 255 MaxRequestsPerChild 1000 /IfModule Tomcat config: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? Why is the connectionTimeout being reached? I think I had set it to a really high number because I figured I didn't want anything to ever hit it. Is some servlet not returning content but hanging on to a connection? Could you explain a little further about 'bug in a servlet causing it to not return'? I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Daniel Gibby David Rees wrote: Like the messages say, all Tomcat threads are busy and you've hit the maximum number of threads which can be processed concurrently. Sounds like you've got either a bug in a servlet causing it to not return, or your server is simply overloaded. You can get a stack trace from the JVM to help debug this issue pretty easily. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JNDI and DataSource
Tested it. Same result... same problem. A side comment: the positive part of the other config file (the one I had originally) was that you could trace how Tomcat loaded the Resources. Then, you could see how the tags actually got processed (read) correctly. But then, something happens when the factory builds the DataSource object. Regards, Freddy. -Mensaje original- De: Guy Pardon [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 19:02 Para: Tomcat Users List Asunto: Re: JNDI and DataSource Hi, The fact that you get 'No suitable driver' could also mean that the chosen properties are incompatible (as opposed to not set). Just a guess: did you try to specify the user and password as part of the URL? (jdbc:oracle:thin:user/[EMAIL PROTECTED]) That's the way I usually connect to oracle. You never know, maybe that's it... HTH, Guy http://www.atomikos.com - Our JTA for your transactions On maandag, apr 12, 2004, at 18:35 Europe/Brussels, Freddy Villalba Arias wrote: image.tiff Hi Sandy, Thanks, it certainly looked better than mine. I appreciate it. However, the problem persists... Any other suggestion? (I'll keep looking at it, too... obviously) -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12de abril de 2004 18:29 Para: Tomcat Users List Asunto: Re: JNDI and DataSource This shouldn't be all that different, but this is the server.xml I'd use on my setup. ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN GlobalNamingResources Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true DefaultContext ResourceLink name=jdbc/cnid global=jdbc/cnid type=javax.sql.DataSource/ /DefaultContext Context path=wa docBase=..\..\Testing debug=5 reloadable=true /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server HTH Sandy On Apr 12, 2004, at 11:36 AM, Freddy Villalba Arias wrote: Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved the initialization problem. So, it's not what I originally wanted (I'd remove it if I knew how to elegantly solve the dummy web app - or just no default web app, if possible - issue), but it does the job for now (if you can
Re: Tomcat performance issue?
Daniel Gibby wrote: Tomcat config: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? connectionTimeout is defined in milliseconds, not seconds, so that is 60 seconds, not 16 hours. Is some servlet not returning content but hanging on to a connection? Could be, or could be that your server is really busy. When you look at the server-status through Apache, does it show 255 processes busy as well? Could you explain a little further about 'bug in a servlet causing it to not return'? You could either have a deadlock (synchronization issue) in your code, or an infinite loop. I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Compress it and post it to the list or put it on a public webserver so we can take a look. Cheers Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat performance issue?
From my own experience, this kind of behavior appears when a session isn't getting timed out for one reason or another. For example, say you get data from some remote site using your own Http client libraries that is multi-threaded. If that thread sits around and the socket it has isn't explicitly closed, it can prevent tomcat from invalidating the session. this would create a memory leak which may not be noticeable if you don't get a lot of load. One easy way to expose this kind of bug is to load test your webapp before deploying. Throw the load you get in 16 hrs at tomcat and you'll likely see the memory leak. In all cases, issues with performance was due to a bug in our application. egular load testing is the best way to expose these issues during development. peter David Rees [EMAIL PROTECTED] wrote: Daniel Gibby wrote: Tomcat config: className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? connectionTimeout is defined in milliseconds, not seconds, so that is 60 seconds, not 16 hours. Is some servlet not returning content but hanging on to a connection? Could be, or could be that your server is really busy. When you look at the server-status through Apache, does it show 255 processes busy as well? Could you explain a little further about 'bug in a servlet causing it to not return'? You could either have a deadlock (synchronization issue) in your code, or an infinite loop. I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Compress it and post it to the list or put it on a public webserver so we can take a look. Cheers Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Tax Center - File online by April 15th
RE: Require a tomcat build with bug fix....
Ok thanks. I will try this version.. philip --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, I've also downloaded the 4.1.30 source and noticed that the WebAppClassLoader is only at version 1.48 where as the bug fix is applied to a 1.50 version of the WebAppClassLoader. I'm not sure where you're getting your version numbers. http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/s hare/org/apache/catalina/loader/ shows that 1.31 is the current CVS version of WebAppClassLoader, so what's 1.48 and 1.50 that you're talking about? Mark marked the issue as fixed on 2004-02-22. 4.1.30 was released on 2004-01-25. So what I said before was wrong: 4.1.30 doesn't have your fix. For that matter, 5.0.19 is from 2004-02-14, so it doesn't have your fix either. 5.0.22-alpha is from last week and should have your fix. Tomcat 5 is not so different that you should be afraid to try it. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat performance issue?
I just read your post this morning (I am lurking today as I have a few issues of my own to clear up :-) ) and I think that is some really good advice you gave. I do have a question though. Once you have noticed you have a memory leak, how do you go about locating it? Matt - Original Message - From: Peter Lin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 12, 2004 1:07 PM Subject: Re: Tomcat performance issue? From my own experience, this kind of behavior appears when a session isn't getting timed out for one reason or another. For example, say you get data from some remote site using your own Http client libraries that is multi-threaded. If that thread sits around and the socket it has isn't explicitly closed, it can prevent tomcat from invalidating the session. this would create a memory leak which may not be noticeable if you don't get a lot of load. One easy way to expose this kind of bug is to load test your webapp before deploying. Throw the load you get in 16 hrs at tomcat and you'll likely see the memory leak. In all cases, issues with performance was due to a bug in our application. egular load testing is the best way to expose these issues during development. peter David Rees [EMAIL PROTECTED] wrote: Daniel Gibby wrote: Tomcat config: className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=255 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6/ Hey, I just realized something... I think I have been having lockups around every 16 hours... 6 seconds! So what does that mean about this configuration? connectionTimeout is defined in milliseconds, not seconds, so that is 60 seconds, not 16 hours. Is some servlet not returning content but hanging on to a connection? Could be, or could be that your server is really busy. When you look at the server-status through Apache, does it show 255 processes busy as well? Could you explain a little further about 'bug in a servlet causing it to not return'? You could either have a deadlock (synchronization issue) in your code, or an infinite loop. I have a stack trace, but I don't see how that helps me figure out where my problem might be... I'm not sure what exactly to look for. Compress it and post it to the list or put it on a public webserver so we can take a look. Cheers Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Tax Center - File online by April 15th - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat performance issue?
Hi, Once you have noticed you have a memory leak, how do you go about locating it? You don't just notice it out of the blue: you typically notice it because a profiler shows it. The same profiler shows you where it is. Noticing and locating is typically one and the same for memory leaks. It's fixing that's the 2nd step. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 and Context Descriptors
Good afternoon, We are currently looking at upgrading our Tomcat 4.1.24 installation to 5.0.19. I've installed a test environment to see what sort of migration issues there will be, and so far I've only encountered one. Under 4.1.24, we have a Host entry in server.xml that looks like this: Host name=localhost appBase=C:\localwebapps\conf unpackWARs=true autoDeploy=true deployXML=true ... /Host This allowed us to place context descriptors in C:\localwebapps\conf (XML files with individual Context tags, one file for each Context), and these contexts would be loaded at startup. With 5.0.19, I modified the Host entry to look like this: Host name=localhost appBase=C:\localwebapps\conf unpackWARs=true autoDeploy=true deployXML=true deployOnStartup=true ... /Host However, the context descriptors in C:\localwebapps\conf are not loaded at startup, and I can't seem to figure out how to load them at all. The only way to load them is to place them in $CATALINA_HOME/conf/[enginename]/[hostname]/ I'm assuming I'm missing something, since I doubt that Tomcat 5 would force you to use $CATALINA_HOME/conf/[enginename]/[hostname]/ for context descriptors. Looking through the Deployment HOWTO, the Context Descriptors heading has this blurb: A Context XML descriptor is a fragment of XML data which contains a valid Context element which would normally be found in the main server configuration file (conf/server.xml), and allows easy and automated manipulation of web applications by the various management tools available in Tomcat. For a given host, the Context descriptors are located in $CATALINA_HOME/conf/[enginename]/[hostname]/foo.xml. Note that while the name of the file is not tied to the webapp name, Tomcat will create Context descriptors which match the webapp name whenever it will generate a Context descriptor. This seems to indicate that I have to use $CATALINA_HOME/conf/[enginename]/[hostname]/. However, the very next heading, 'Deploying Tomcat on Startup', has this to say: The webapps which are present in the host appBase will be deployed if the host deployOnStartup property is true. The deployment process is the following: a.. The Context XML declarations will be deployed first b.. ... This seems to indicate that I should be able to do what I want to do. Any ideas? John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 and Context Descriptors
Hi, If you use context .xml files, you can put them in $CATALINA_HOME/conf/[engine name]/[host name] or in the META-INF directory of the WAR file representing your webapp. If you're just deploying webapps without a context XML file, you can put them in the host's appBase. Then you don't need any XML file for your context. But you can't just put context XML files in the host's appBase. Yoav Shapira Millennium Research Informatics -Original Message- From: John H [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 2:42 PM To: [EMAIL PROTECTED] Subject: Tomcat 5 and Context Descriptors Good afternoon, We are currently looking at upgrading our Tomcat 4.1.24 installation to 5.0.19. I've installed a test environment to see what sort of migration issues there will be, and so far I've only encountered one. Under 4.1.24, we have a Host entry in server.xml that looks like this: Host name=localhost appBase=C:\localwebapps\conf unpackWARs=true autoDeploy=true deployXML=true ... /Host This allowed us to place context descriptors in C:\localwebapps\conf (XML files with individual Context tags, one file for each Context), and these contexts would be loaded at startup. With 5.0.19, I modified the Host entry to look like this: Host name=localhost appBase=C:\localwebapps\conf unpackWARs=true autoDeploy=true deployXML=true deployOnStartup=true ... /Host However, the context descriptors in C:\localwebapps\conf are not loaded at startup, and I can't seem to figure out how to load them at all. The only way to load them is to place them in $CATALINA_HOME/conf/[enginename]/[hostname]/ I'm assuming I'm missing something, since I doubt that Tomcat 5 would force you to use $CATALINA_HOME/conf/[enginename]/[hostname]/ for context descriptors. Looking through the Deployment HOWTO, the Context Descriptors heading has this blurb: A Context XML descriptor is a fragment of XML data which contains a valid Context element which would normally be found in the main server configuration file (conf/server.xml), and allows easy and automated manipulation of web applications by the various management tools available in Tomcat. For a given host, the Context descriptors are located in $CATALINA_HOME/conf/[enginename]/[hostname]/foo.xml. Note that while the name of the file is not tied to the webapp name, Tomcat will create Context descriptors which match the webapp name whenever it will generate a Context descriptor. This seems to indicate that I have to use $CATALINA_HOME/conf/[enginename]/[hostname]/. However, the very next heading, 'Deploying Tomcat on Startup', has this to say: The webapps which are present in the host appBase will be deployed if the host deployOnStartup property is true. The deployment process is the following: a.. The Context XML declarations will be deployed first b.. ... This seems to indicate that I should be able to do what I want to do. Any ideas? John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IBM Java VS SUN Java
Recently, we've been doing some load testing of apache (1.3.x) w/ tomcat 4.1.29 5.0.19 and were surprised at how slow it was responding on our redhat linux testbed system. We did some comparisons to a Win2k tomcat server, and the Win2k server *BLEW* it out of the water in terms of speed and load limits. After some mucking around, we narrowed down the difference to the java implementation. We switched over from sun's java jdk1.4.2_04 to IBMJava2-141 and saw some speed improvements and huge differences in load limits, i.e. it could scale much higher. I was wondering if anyone had experienced any problems due to switching to IBM's java, and if so what they were. Also, if anyone has any hints, links, or general advice on how to speed things up, be it tomcat tuning, or java, it would be very appreciated. The windows box, while not able to scale as well, does generally respond in 1/4 the time of the linux box. Thanks in Advance, any advice is appreciated. -- +---+ | Nicholas Bernstein| [EMAIL PROTECTED] | | UNIX Systems Administrator| http://www.docmagic.com | | Document Systems Inc. | | | gpg: F706 8C4E 78FA 53A0 019F D983 FE28 2002 D1F3| +---+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat performance issue?
luckily I have a license of Borland OptimizeIt. What I do is I start tomcat using OptimizeIt. Then I create a test plan in JMeter. Once tomcat is running, I warm it up by sending it a couple hundred requests to make sure all the pages are compiled. before the test starts, use OptimizeIt to garbage collect. Once that is done, I start the test and look at the number of threads and size of the heap. If there's a memory leak, either the thread count will increase, or the heap will grow rapidly. Once I see either one, I then switch to the call graph to get a better picture of which methods are getting called. Usually, that is enough to point towards a culprit. repeat, and rinse as many times as needed until you've squashed all bugs and leaks. peter lin Matt Woodings [EMAIL PROTECTED] wrote: I just read your post this morning (I am lurking today as I have a few issues of my own to clear up :-) ) and I think that is some really good advice you gave. I do have a question though. Once you have noticed you have a memory leak, how do you go about locating it? Matt - Do you Yahoo!? Yahoo! Tax Center - File online by April 15th
RE: JNDI and DataSource
Where did you put your db driver jar file? You want to put it under $CATILINA/common/lib. Regards, Daniel -Original Message- From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:19 AM To: Tomcat Users List Subject: RE: JNDI and DataSource Tested it. Same result... same problem. A side comment: the positive part of the other config file (the one I had originally) was that you could trace how Tomcat loaded the Resources. Then, you could see how the tags actually got processed (read) correctly. But then, something happens when the factory builds the DataSource object. Regards, Freddy. -Mensaje original- De: Guy Pardon [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12 de abril de 2004 19:02 Para: Tomcat Users List Asunto: Re: JNDI and DataSource Hi, The fact that you get 'No suitable driver' could also mean that the chosen properties are incompatible (as opposed to not set). Just a guess: did you try to specify the user and password as part of the URL? (jdbc:oracle:thin:user/[EMAIL PROTECTED]) That's the way I usually connect to oracle. You never know, maybe that's it... HTH, Guy http://www.atomikos.com - Our JTA for your transactions On maandag, apr 12, 2004, at 18:35 Europe/Brussels, Freddy Villalba Arias wrote: image.tiff Hi Sandy, Thanks, it certainly looked better than mine. I appreciate it. However, the problem persists... Any other suggestion? (I'll keep looking at it, too... obviously) -Mensaje original- De: Sandy McArthur [mailto:[EMAIL PROTECTED] Enviado el: lunes, 12de abril de 2004 18:29 Para: Tomcat Users List Asunto: Re: JNDI and DataSource This shouldn't be all that different, but this is the server.xml I'd use on my setup. ?xml version=1.0 encoding=UTF-8? Server debug=5 port=8081 shutdown=SHUTDOWN GlobalNamingResources Resource name=jdbc/cnid scope=Shareable type=javax.sql.DataSource cached=false/ ResourceParams name=jdbc/cnid parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@BMSRVORACLE:1521:BMSRVMS/value /parameter parameter nameusername/name valueSGC_CNID/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /GlobalNamingResources Service name=Tomcat-Standalone Connector acceptCount=10 className=org.apache.coyote.tomcat4.CoyoteConnector connectionTimeout=6 debug=0 maxProcessors=75 minProcessors=5 port=8080/ Engine debug=5 defaultHost=localhost name=Standalone Host appBase=C:\Usuarios\fvillalba\project\SGC\SGC_CNID\FUENTES\java\Acceso a datos\Tomcat\webapps debug=5 name=localhost unpackWARs=true DefaultContext ResourceLink name=jdbc/cnid global=jdbc/cnid type=javax.sql.DataSource/ /DefaultContext Context path=wa docBase=..\..\Testing debug=5 reloadable=true /Context Context path= docBase=..\..\Testing debug=5 reloadable=true /Context /Host /Engine /Service /Server HTH Sandy On Apr 12, 2004, at 11:36 AM, Freddy Villalba Arias wrote: Yes and no... :) I have only one web application to be deployed (wa). Then, I read in some places that it's mandatory to have a default context. I tried defining a DefaultContext but then Tomcat's initialization failed (I looked for something odd but couldn't find anything). So, I decided to create a default (dummy) web app by hand. That's the only intent of that second web app. It doesn't even exist (there is no WEB-INF directory, leave alone web.xml). The good part: that solved the initialization problem. So, it's not what I originally wanted (I'd
Re: Tomcat 5 and Context Descriptors
Is this something new in TC5? Context XML's in appBase worked in 4.1.24. - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 12, 2004 2:42 PM Subject: RE: Tomcat 5 and Context Descriptors Hi, If you use context .xml files, you can put them in $CATALINA_HOME/conf/[engine name]/[host name] or in the META-INF directory of the WAR file representing your webapp. If you're just deploying webapps without a context XML file, you can put them in the host's appBase. Then you don't need any XML file for your context. But you can't just put context XML files in the host's appBase. Yoav Shapira Millennium Research Informatics -Original Message- From: John H [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 2:42 PM To: [EMAIL PROTECTED] Subject: Tomcat 5 and Context Descriptors Good afternoon, We are currently looking at upgrading our Tomcat 4.1.24 installation to 5.0.19. I've installed a test environment to see what sort of migration issues there will be, and so far I've only encountered one. Under 4.1.24, we have a Host entry in server.xml that looks like this: Host name=localhost appBase=C:\localwebapps\conf unpackWARs=true autoDeploy=true deployXML=true ... /Host This allowed us to place context descriptors in C:\localwebapps\conf (XML files with individual Context tags, one file for each Context), and these contexts would be loaded at startup. With 5.0.19, I modified the Host entry to look like this: Host name=localhost appBase=C:\localwebapps\conf unpackWARs=true autoDeploy=true deployXML=true deployOnStartup=true ... /Host However, the context descriptors in C:\localwebapps\conf are not loaded at startup, and I can't seem to figure out how to load them at all. The only way to load them is to place them in $CATALINA_HOME/conf/[enginename]/[hostname]/ I'm assuming I'm missing something, since I doubt that Tomcat 5 would force you to use $CATALINA_HOME/conf/[enginename]/[hostname]/ for context descriptors. Looking through the Deployment HOWTO, the Context Descriptors heading has this blurb: A Context XML descriptor is a fragment of XML data which contains a valid Context element which would normally be found in the main server configuration file (conf/server.xml), and allows easy and automated manipulation of web applications by the various management tools available in Tomcat. For a given host, the Context descriptors are located in $CATALINA_HOME/conf/[enginename]/[hostname]/foo.xml. Note that while the name of the file is not tied to the webapp name, Tomcat will create Context descriptors which match the webapp name whenever it will generate a Context descriptor. This seems to indicate that I have to use $CATALINA_HOME/conf/[enginename]/[hostname]/. However, the very next heading, 'Deploying Tomcat on Startup', has this to say: The webapps which are present in the host appBase will be deployed if the host deployOnStartup property is true. The deployment process is the following: a.. The Context XML declarations will be deployed first b.. ... This seems to indicate that I should be able to do what I want to do. Any ideas? John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Require a tomcat build with bug fix....
Is there a place where i can download a build of the 5.0.22-alpha version of tomcat, or does this require me pulling the 5.0.22 branch from cvs and building it? philip b --- Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, I've also downloaded the 4.1.30 source and noticed that the WebAppClassLoader is only at version 1.48 where as the bug fix is applied to a 1.50 version of the WebAppClassLoader. I'm not sure where you're getting your version numbers. http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/s hare/org/apache/catalina/loader/ shows that 1.31 is the current CVS version of WebAppClassLoader, so what's 1.48 and 1.50 that you're talking about? Mark marked the issue as fixed on 2004-02-22. 4.1.30 was released on 2004-01-25. So what I said before was wrong: 4.1.30 doesn't have your fix. For that matter, 5.0.19 is from 2004-02-14, so it doesn't have your fix either. 5.0.22-alpha is from last week and should have your fix. Tomcat 5 is not so different that you should be afraid to try it. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 and Context Descriptors
Hi, Is this something new in TC5? Context XML's in appBase worked in 4.1.24. Yup, the move from appBase to conf/[engine name]/[host name] is a change in TC5. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IBM Java VS SUN Java
Hi, Was the linux box hyper-threaded? Yoav Shapira Millennium Research Informatics -Original Message- From: Nicholas Bernstein [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 2:50 PM To: Tomcat Users List Subject: IBM Java VS SUN Java Recently, we've been doing some load testing of apache (1.3.x) w/ tomcat 4.1.29 5.0.19 and were surprised at how slow it was responding on our redhat linux testbed system. We did some comparisons to a Win2k tomcat server, and the Win2k server *BLEW* it out of the water in terms of speed and load limits. After some mucking around, we narrowed down the difference to the java implementation. We switched over from sun's java jdk1.4.2_04 to IBMJava2-141 and saw some speed improvements and huge differences in load limits, i.e. it could scale much higher. I was wondering if anyone had experienced any problems due to switching to IBM's java, and if so what they were. Also, if anyone has any hints, links, or general advice on how to speed things up, be it tomcat tuning, or java, it would be very appreciated. The windows box, while not able to scale as well, does generally respond in 1/4 the time of the linux box. Thanks in Advance, any advice is appreciated. -- +---+ | Nicholas Bernstein| [EMAIL PROTECTED] | | UNIX Systems Administrator| http://www.docmagic.com | | Document Systems Inc. | | | gpg: F706 8C4E 78FA 53A0 019F D983 FE28 2002 D1F3 | +---+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]