problem with tomcat JDBC realm , i can not login and all configuration are correct
Hi Thank you for reading my post i have problem with tomcat JDBC realm I defined a jdbc realm in server.xml also i configured my application to use Realms but it never login into system ,it always send me to login_error page instead of logging in to the syste. I should say that when i creaete my own realm in server.xml ,i can not login into admin console anymore. are these two relevant ? should i comment or uncomment more stuff in server.xml ? how an application knows which realm it should use ? another question that i have is about users / users_role / roles tables should i create all these tables ?my users allways has one role , so i create one table and it contains also role column , i mapped these in server.xml . can it be a problem for tomcat ? is it manedatory to use 3 tables ? I attached my web.xml section that is related to security and also server.xml section that is related to security and realms I should say that i double check JDBC driver to be in place , double check connection url ... thank you very much. ---web.xml begin- security-constraint web-resource-collection web-resource-nameall/web-resource-name url-pattern*.jsp/url-pattern /web-resource-collection auth-constraint role-namemanager/role-name role-nameuser/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.html/form-login-page form-error-page/login_error.html/form-error-page /form-login-config /login-config security-role role-namemanager/role-name /security-role security-role role-nameuser/role-name /security-role --server.xml--- !-- Because this Realm is here, an instance will be shared globally -- !-- This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -- !-- by masoud Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ -- !-- Comment out the old realm but leave here for now in case we need to go back quickly -- !-- Realm className=org.apache.catalina.realm.MemoryRealm / -- !-- Replace the above Realm with one of the following to get a Realm stored in a database and accessed via JDBC -- !-- Realm className=org.apache.catalina.realm.JDBCRealm driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/authority connectionName=test connectionPassword=test userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / -- Realm className=org.apache.catalina.realm.JDBCRealm driverName=oracle.jdbc.driver.OracleDriver connectionURL=jdbc:oracle:thin:@127.0.0.1:1521:ftdb connectionName=hr connectionPassword=hr userTable=users userNameCol=username userCredCol=password userRoleTable=users roleNameCol=role_name / !-- Realm className=org.apache.catalina.realm.JDBCRealm driverName=sun.jdbc.odbc.JdbcOdbcDriver connectionURL=jdbc:odbc:CATALINA userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / -- ---Database table structure--- CREATE TABLE HR.USERS (NAME VARCHAR2(32 CHAR), USER_ID NUMBER, LASTNAME VARCHAR2(32 CHAR), USERNAME VARCHAR2(32 CHAR), PASSWORD VARCHAR2(32 CHAR), ROLE_NAME VARCHAR2(128 CHAR), CONSTRAINT USERS_PK PRIMARY KEY (USER_ID) ENABLE ) ; - 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: Where i can find tomcat clustring features list ?
Thanks for reply Mark Thomas wrote: Legolas Woodland wrote: Does tomcat support fail over in a clustered environment ? Yes I find a document in tomcat documentation : *tomcat*.apache.org/*tomcat*-5.0-doc/*cluster*-howto.html is there any more documents around ? How i can use Fail over feature , in onjava.com i find a article that said tomcat does not support fail over , www.onjava.com/pub/a/onjava/2004/04/14/*cluster*ing.html Also i need farm deployment feature , i mean deploying an application to one node and it deploy that application in all nodes. is it supported ? is there any utility or library which can add clustering to tomcat? Tomcat does this out of the box. Mark
How i can exclude a url pattern for a filter ?
Hi Thank you for reading my post I have defined a filter in my web.xml and for some of my pages it should be applied but not for all of them. for example i should exclude a subdirectory like : webroot/s/ from this filter but filter should be applied for other subdirectory and files . can some one tell me how i should configure it ? My current filter mapping : filter filter-nameChecker/filter-name filter-class com.leg.checker /filter-class /filter filter-mapping filter-nameChecker/filter-name url-pattern/*/url-pattern /filter-mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with hosting web application on tomcat / error 404 for an exists file
Hi Thank you for reading my post. I have a web application which i developed and works well on my tomcat 5.5.9 Now i purchase a hosting plane with tomcat 5.5.9 it is on linux and have cpanel. they said that i should upload all contents of my war file into http_doc folder , so i did I used ftp to upload them all , now that i try to access my web site it return HTTP Status 404 - /index.jsp meanwhile index.jsp in under that www folder. I test the server by uploading an html file to make sure that i put content of war file in correct place. nad it works ok with HTML file. can some one help me about this problem ? Thanks
Problem with hosting web application on tomcat / error 404 for an exists file
Hi Thank you for reading my post. I have a web application which i developed and works well on my tomcat 5.5.9 Now i purchase a hosting plane with tomcat 5.5.9 it is on linux and have cpanel. they said that i should upload all contents of my war file into http_doc folder , so i did I used ftp to upload them all , now that i try to access my web site it return HTTP Status 404 - /index.jsp meanwhile index.jsp in under that www folder. I test the server by uploading an html file to make sure that i put content of war file in correct place. nad it works ok with HTML file. can some one help me about this problem ? Thanks
is there any way to monitor application server when it is working ?
thank you for reading my post is there any application that help monitor an application server when it is working ? for example , total active sessions , Connections , ... i need this application to monitor my tomcat and sun application server , but if there is no application that help monitor both of them , then i will be happy to monitor at least one of them (TOMCAT) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tuning Tomcat , i need some advice
Hi Thank you for reading my post. I have an application which will handle about 30 hit per second with Tomcat 5.5.* (* wil be one of 15 or 12) Now i need some advice about tuning tomcat to perform the best under this condition I read something so far , things like : use Java server mode increase the heap Where i can find more reference and how to(s) or step by step manual to tune tomcat. in condition that we have 30 hit/sec ,how much large connection pool should be ? is there some refrences about tuning connection pool? Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.15 use a native library to improve performace , i have some question about it
Tomcat 5.5.15 use a native library to improve performace , i have some question about it Thank you for reading my post. today i installed a newer version of tomcat (5.5.15 ) before this i used 5.5.12 but when i was installing 5.5.15 , it asks about downloading a native library to improve performace. now i just want to know , 1-how much improvement it brings to tomcat under heavy load 2-how tomcat use it ? what else change in installation when we select to use native library 3-in tomcat start-up application under start up tab ,there is a DropDown box which asks about mode that tomcat will run there are two modes ,1-JVM , -JAVA is it true that when we select JVM it uses JRE to run tomcat When we use java it uses JDK to run tomcat ? Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tuning Tomcat , i need some advice
Thank you for reply. George Sexton wrote: Database interaction is by far the major issue. In my application, a page with no db interaction runs in something like 80ms, while a page with DB interaction takes something like 350-400ms. There's no silver bullet to tuning tomcat applications, and most of the advice you'll get here won't make any difference (use this connector, instead of that). So, my advice is: Indeed some pages of my web application will cause more than 4-5 select statement over tables with more than 50,000 records. will a dual processor server handle this loads ? I used derby as database . 1) Using JDK 1.5. It can be up to 25% faster than 1.4 2) Use the server JVM 3) Allocate sufficient memory 4) Start tuning your application. Look at query execution times, and the number of DB Interactions per page. Reduce the number of interactions by using Stored procedure, or views. How i can tune the database code ? i just once worked with db2 , it has some facilities that bring up a plan (execution path and detailed information about each step) of statement and allow user to tune the database operations base on its step and time that each step consumed , now how i can find such facilities for derby ? Thank you George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Legolas Woodland [mailto:[EMAIL PROTECTED] Sent: Monday, January 30, 2006 1:57 PM To: Tomcat Users List Subject: Tuning Tomcat , i need some advice Hi Thank you for reading my post. I have an application which will handle about 30 hit per second with Tomcat 5.5.* (* wil be one of 15 or 12) Now i need some advice about tuning tomcat to perform the best under this condition I read something so far , things like : use Java server mode increase the heap Where i can find more reference and how to(s) or step by step manual to tune tomcat. in condition that we have 30 hit/sec ,how much large connection pool should be ? is there some refrences about tuning connection pool? 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: Problem with using tomcat Datasource inside a servlet.
Peter Rossbach wrote: Wrong lookup name: Use: java:comp/jdbc/be_Publisher Peer Am 28.01.2006 um 11:03 schrieb Legolas Woodland: java:comp/env/jdbc/be_Publisher); I change it according to your advice but it still return the same error. some more description : when i deploy the application , if i add the same data source as that image shows to my application data sources node it will works but in test env , it is very hard to define a data source each time that i run the application. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I need advice about choosing a application server.
I need advice about choosing a application server. Hi Thank you for reading my post I need some advice to choose an application server / srvlet container for deploying a project. Application description : application has two part which one of them is a portal . portal itself will have a 2 hit/second . each hit could have 1 select / 1 update and one insert sql statement. portal itself use hibernate and Derby. I used plain *JDBC , derby , jsf *to develop my portlets (two portlet which are runing on the base) there are about 2 emails /second in peak time of the system , it will jsut send the emails and store them in database. The most busy part of the system is another application which will handel about 30 hit (each hit has , 2 update , 2 insert , and 2 select statement) for this part there will be no email *I did not implement sending emails as i do not know a good or best practice for this one , and i think it is something related to application server ?* As i did not use any EJB stuff and just some datasource , JNDI , connection pool , what will be my choice to deploy the application ? Tomcat ? Sun application server 8.* ? Geronimo ? Host is a Redhat enterprise Linux , with one p4 processor . some tables has 1/000/000 records. Will that hardware handle this load ?
is there any log file viewer for tomcat log files with live feed ability
Hi Thank you for reading my post. im developing some application and i have problem with viewing the Log file of application server everytime. is there any tool that could automatically fetch the changes from log file and show them instantly ? for example if i ask it to monitor application server log file it shows me a live feed of the log file. thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource , can we define them in war file (whithout accessing to Admin console)?
Khawaja Shams wrote: Hello, I am assuming that you are trying to define this datasource in order to do application server managed connection pooling. The closest I have done to what you described is declare a datasource as a global resource in the server.xml and refer to it in context definition. You can define a new context in the $CATALINA_HOME/conf/Catalina/localhost/APPNAME.xml. Here is an example: ?xml version=1.0 encoding=UTF-8? Context path=/son ResourceLink name=jdbc/teamDB global=jdbc/teamDB type=javax.sql.DataSource / /Context I want to create a data source to have a application server managed pool of connection. but the problem is that i have no access to tomcat installation folder , so i can not change anythin in tomcat installation . they just allows to upload a war file. However, I still needed to put the jdbc jar file in the common/lib. I am not completely sure about this, but for application server to manage your datasource, one needs to make the proper jar file available to the app server by putting it in the common/lib as it will not look inside each deployed directory to perform application independent tasks. I am also curious to know if someone has found a way around this. A connection pool is application is application independent ? but i want the connection pool just for my own application. I will be happy if any one can tell me a trick to have application server managed pool without changing tomcat installation stuff. Best Regards, Khawaja Shams On 12/26/05, Legolas Woodland [EMAIL PROTECTED] wrote: Hi Thank you for reading my post. Is it possible to make a data-source without admin console ? I mean by defining the data-source in web.xml or in Context.xml (i think i read somewhere that we could put context.xml into meta-inf folder and it will act like Context definition in admin console). is it mandatory that Tomcat shared library folder contain my database jdbc driver to have data-source ? I mean can we bundle , our JDBC driver inside war file and define the data-source in war file too ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Datasource , can we define them in war file (whithout accessing to Admin console)?
Hi Thank you for reading my post. Is it possible to make a data-source without admin console ? I mean by defining the data-source in web.xml or in Context.xml (i think i read somewhere that we could put context.xml into meta-inf folder and it will act like Context definition in admin console). is it mandatory that Tomcat shared library folder contain my database jdbc driver to have data-source ? I mean can we bundle , our JDBC driver inside war file and define the data-source in war file too ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]