Setting Up Tomcat 6 on Ubuntu 8.10
I have installed tomcat 6 through the Ubuntu synaptic package manager but I am having trouble setting it up. Using the line: sudo /usr/share/tomcat6/bin/./shutdown.sh Throws the error SEVERE: Catalina.stop: java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml (No such file or directory) The file has been written to: /usr/share/tomcat6/skel/conf/server.xml Also I have installed the manager program but can't log it I edited the /tomcat-users.xml file so that it reads − !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- − tomcat-users role rolename=manager/ role rolename=admin/ role rolename=tomcat/ role rolename=role1/ user username=LexMan password= roles=admin,manager/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ role rolename=manager/ /tomcat-users but I can't log in to the management program. -- View this message in context: http://www.nabble.com/Setting-Up-Tomcat-6-on-Ubuntu-8.10-tp20408973p20408973.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TOmcat5w configuration
From: herbison [mailto:[EMAIL PROTECTED] Subject: TOmcat5w configuration Where does the tomcat5w application get its configuration information from? The JVM location is taken from the Windows registry. The tomcat5 executable will start tomcat but tomcat5w will not(?) Do not use the tomcat5.exe program directly; that's just the service wrapper for launching the JVM. There are no log files generated, nothing! Where are you looking? I've checked to make sure java_home is set Environment variables are not used when running Tomcat as a Windows service. I get some crazy path in the path to executable field in tomcat5w but that is the only weird thing i can find. Care to tell us what that crazy path is? Also the exact Tomcat version, JRE/JDK level, and which Windows? We're not mind readers. To make your life easier, don't install Tomcat from the .exe download; instead, use the .zip package which includes .bat scripts for running Tomcat from the command line and one to create a service for it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: a cookie question of one Server with two tomcat server
Hi Christopher, Thank you for your answer, I've monitored the value of cookies with debug mode at server running, and the cookie values were be set to the new values. I'm not sure what effect of setting the session as invalidate and setting new cookie values, I think set session as invalidate was telling the server this session should be invalidated, and set cookies as new values was telling the client browser to set the new value to cookies, what I think as that, and I'm not sure do I right or wrong?! Why I attempt to delete the cookie from client's machine, that is a requirement from my desinger, and I don't know why and I don't need to know(I've asked why do that before) the redirection is a complicated linking flow, and I'm sure it was properly, because it was working well after I changed the logout URL path. Why we do that from a main site redirecte to second site and finally redirecte back to the main site, that is becausr we want the both sites to clean-up their own cookies when logout was be requested. now, I still don't know why I must change the logout URL path(the URL path of cookies modifier) same as the login URL path(the URL path of cookie creator) when I was through the main site to seconf site, and they are at same host by different server port number. But if I just open a new browser and to request the second site logout URL(with different URL path), then the cookies of second site could be expired by this request! Best regards, Bon Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bon, Bon wrote: the logout Servlet will do something as following: 1. set the cookies maxAge to 0 and add them into response again. cookie.setMaxAge(0); response.addCookie(cookie); 2. set the session to invalidate request.getSession().invalidate(); 3. response.sendRedirect(redirectTo); redirectTo is the URL of second site's logout link. then the client browser will redirect to second site's logout URL, and it is a Struts Action, and this logout Action will do something as following: 1. set the session to invalidate 2. set the cookie maxAge to 0 and add them into response again. cookies[i].setMaxAge(0); response.addCookie(cookies[i]); 3. forward to a logout default display page. 4. direct to main site some page by form submit in default logout display page. You should check to make sure that new cookies are not replacing the old cookies immediately after the invalidate() has been called. Also note that calling setMaxAge before calling invalidate() is not particularly useful: the cookie is expired when you call session.invalidate() so you can clean up your code a bit. Why are you bothering to attempt to delete the cookie from the client's machine? and I found the cookie of main site was be removed but the second site did not! Are you sure that your redirection is working properly? I would also look in your cookie cache to see what the details of the remaining cookie are. Could you post those? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkUWuwACgkQ9CaO5/Lv0PBzPACdGfVgxaN/28RxwOMtYVu3UiYW 0Z4Anj1gIKZ+3qwArKVSRJlsb/40nkTb =w4Us -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/a-cookie-question-of-one-Server-with-two-tomcat-server-tp20355052p20414674.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Performance
Hi All, I'm trying to optimize the performance of my server, which is deployed in a cluster environment using Apache Load balancer and Tomcat container. mod_jk is used to communicate between load balancer and tomcat container. Apache is configured to use worker MPM mode. I have done various tests to find optimized tomcat, apache and Linux configuration for my application. Following are the machines I'm using for this load test. Machines configurations Apache Load balancer:: 2.8 GHz Dual Core , 4GB RAM Tomcat :: 2.66 GHz 2 CUP, Dual Core, 6 GB RAM There is an interesting observation when I alter my configuration to run multiple tomcat instances on same machine. My throughput increases to 2 times the original throughput if I run 2 instance of tomcat instead of single tomcat instance. I'm trying to understand this behavior as I'm not very keen in running multiple tomcat instances on same machines. Thanks, Nishi
Re: [Problem]Tomcat 6.x with Active Directory on Windows Server 2003
Check the log of Tomcat, you may find more information. On Mon, Nov 10, 2008 at 5:56 AM, Vickey [EMAIL PROTECTED] wrote: I can use the same username and password to authenticate on IIS and active directory, and it also work, if IIS is integrated with Tomcat, but just Tomcat standardalone with Active directory still not work. Vickey wrote: I am trying to authenticate web users with Active Directory on Windows Server 2003 R2 with sp2 and tomcat 6.18, but get an HTTP Status 403 - Access to the requested resource has been denied error, don't know why, my steps and configuration as below and post as attachment: 1. create test group and user in Active Directory: domain name: test domain controller host: 172.20.2.13 TestGroup: a global security group testuser1, tomcat: member of TestGroup screen capture is available in attachment http://www.nabble.com/file/p20375746/ad.jpg 2. ${catalina.home}/conf/server.xml: Server .. .. Engine name=Catalina defaultHost=localhost !-- have to comment this out to use ldap authentication realm Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ -- !--I have also tried to put the ldap realm here, but not work yet-- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !--ad integration-- !--the servers are all in my local network, can't access them from internet-- Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://172.20.2.13:389; connectionName=[EMAIL PROTECTED] connectionPassword=tomcat1 authentication=simple referrals=follow userRoleName=member userBase=DC=test userSearch=(sAMAccountName={0}) userSubtree=true roleBase=DC=test roleName=TestGroup roleSubtree=true roleSearch=(member={0}) / /Host /Engine .. /Server 3. create test web application, and modify the web.xml: web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 display-namead test/display-name descriptionad test/description !--ad integration-- security-constraint web-resource-collection web-resource-nameAuthenticated area/web-resource-name url-pattern/session.jsp/url-pattern url-pattern*.xml/url-pattern !--more url patterns and http methods here-- http-methodDELETE/http-method http-methodGET/http-method http-methodHEAD/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection !--more web resource collection nodes here-- auth-constraint role-nameTestGroup/role-name !--more role name nodes here-- /auth-constraint /security-constraint login-config auth-methodFORM/auth-method role-nameTestGroup/role-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.jsp/form-error-page /form-login-config /login-config security-role descriptionad test group/description role-nameTestGroup/role-name /security-role !--I have also try another login method login-config auth-methodBASIC/auth-method /login-config -- /web-app 4. problem description: when resources in Authenticated area defined above are accessed, login.jsp will appear, if wrong username/password is entered, error.jsp will appear, but after correct user/password is entered, I can still get error message as below: HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/6.0.18 no exception or error is thrown in the console 5. after log4j is configured to debug on tomcat, errors are found in the debug log: DEBUG http-8080-1 org.apache.catalina.authenticator.AuthenticatorBase - Failed authenticate() test DEBUG http-8080-1 org.apache.catalina.authenticator.AuthenticatorBase - Failed authenticate() test .. DEBUG http-8080-1
Re: [Problem]Tomcat 6.x with Active Directory on Windows Server 2003
I can use the same username and password to authenticate on IIS and active directory, and it also work, if IIS is integrated with Tomcat, but just Tomcat standardalone with Active directory still not work. Vickey wrote: I am trying to authenticate web users with Active Directory on Windows Server 2003 R2 with sp2 and tomcat 6.18, but get an HTTP Status 403 - Access to the requested resource has been denied error, don't know why, my steps and configuration as below and post as attachment: 1. create test group and user in Active Directory: domain name: test domain controller host: 172.20.2.13 TestGroup: a global security group testuser1, tomcat: member of TestGroup screen capture is available in attachment http://www.nabble.com/file/p20375746/ad.jpg 2. ${catalina.home}/conf/server.xml: Server .. .. Engine name=Catalina defaultHost=localhost !-- have to comment this out to use ldap authentication realm Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ -- !--I have also tried to put the ldap realm here, but not work yet-- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !--ad integration-- !--the servers are all in my local network, can't access them from internet-- Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://172.20.2.13:389; connectionName=[EMAIL PROTECTED] connectionPassword=tomcat1 authentication=simple referrals=follow userRoleName=member userBase=DC=test userSearch=(sAMAccountName={0}) userSubtree=true roleBase=DC=test roleName=TestGroup roleSubtree=true roleSearch=(member={0}) / /Host /Engine .. /Server 3. create test web application, and modify the web.xml: web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 display-namead test/display-name descriptionad test/description !--ad integration-- security-constraint web-resource-collection web-resource-nameAuthenticated area/web-resource-name url-pattern/session.jsp/url-pattern url-pattern*.xml/url-pattern !--more url patterns and http methods here-- http-methodDELETE/http-method http-methodGET/http-method http-methodHEAD/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection !--more web resource collection nodes here-- auth-constraint role-nameTestGroup/role-name !--more role name nodes here-- /auth-constraint /security-constraint login-config auth-methodFORM/auth-method role-nameTestGroup/role-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.jsp/form-error-page /form-login-config /login-config security-role descriptionad test group/description role-nameTestGroup/role-name /security-role !--I have also try another login method login-config auth-methodBASIC/auth-method /login-config -- /web-app 4. problem description: when resources in Authenticated area defined above are accessed, login.jsp will appear, if wrong username/password is entered, error.jsp will appear, but after correct user/password is entered, I can still get error message as below: HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/6.0.18 no exception or error is thrown in the console 5. after log4j is configured to debug on tomcat, errors are found in the debug log: DEBUG http-8080-1 org.apache.catalina.authenticator.AuthenticatorBase - Failed authenticate() test DEBUG http-8080-1 org.apache.catalina.authenticator.AuthenticatorBase - Failed authenticate() test .. DEBUG http-8080-1 org.apache.catalina.authenticator.FormAuthenticator - Authenticating username 'testuser1' DEBUG http-8080-1 org.apache.catalina.authenticator.FormAuthenticator -
Re: Setting Up Tomcat 6 on Ubuntu 8.10
On Sun, Nov 9, 2008 at 7:02 PM, Lex Man [EMAIL PROTECTED] wrote: I have installed tomcat 6 through the Ubuntu synaptic package manager but I am having trouble setting it up. if you want help on this list (or the tomcat channel), you should obtain your tomcat from its official source http://tomcat.apache.org. Otherwise ask your distribution provider (i.e. canonical.com). regards Leon - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TOmcat5w configuration
Where does the tomcat5w application get its configuration information from? The tomcat5 executable will start tomcat but tomcat5w will not(?) There are no log files generated, nothing! I've checked to make sure java_home is set up correctly, and it is. All my other java apps work fine. I get some crazy path in the path to executable field in tomcat5w but that is the only weird thing i can find. -- View this message in context: http://www.nabble.com/TOmcat5w-configuration-tp20409255p20409255.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting Up Tomcat 6 on Ubuntu 8.10
I have installed tomcat 6 through the Ubuntu synaptic package manager but I am having trouble setting it up. Using the line: sudo /usr/share/tomcat6/bin/./shutdown.sh Throws the error SEVERE: Catalina.stop: java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml (No such file or directory) The file has been written to: /usr/share/tomcat6/skel/conf/server.xml Also I have installed the manager program but can't log it I edited the /tomcat-users.xml file so that it reads − !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- − tomcat-users role rolename=manager/ role rolename=admin/ role rolename=tomcat/ role rolename=role1/ user username=LexMan password= roles=admin,manager/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ role rolename=manager/ /tomcat-users but I can't log in to the mangament program. -- View this message in context: http://www.nabble.com/Setting-Up-Tomcat-6-on-Ubuntu-8.10-tp20408972p20408972.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]