A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Products
»
Tomcat
Author
Tomcat Realm
Naseem Khan
Ranch Hand
Joined: Apr 25, 2005
Posts: 809
posted
Jan 08, 2007 06:49:00
0
Hi,
I have set
JDBC
Realm in
Tomcat
container as:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@localhost:1521:XE" connectionName="scott" connectionPassword="tiger" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name" digest="SHA"/>
Now, I want to insert record in one more table (say reports table). How do I configure this table in Realm.
One option is by simply getting connection from connection pool, but in that case, I have to configure in my <Resource> tag within <Context> tag.
Can I configure my new table in the Realm without looking jndi datasource.
Thanks
Asking Smart Questions FAQ
-
How To Put Your Code In Code Tags
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35250
7
posted
Jan 08, 2007 08:31:00
0
Realms have no facilities for inserting/updating/deleting records, or accessing tables other than the ones used for authentication.
You need to define the database as a
DataSource
as well; why wouldn't you want to do that?
Android apps
–
ImageJ plugins
–
Java web charts
I agree. Here's the link:
http://aspose.com/file-tools
subject: Tomcat Realm
Similar Threads
Tomcat 5.5.0/Datasource Realm
Database realm in OC4J
struts and jndi problem
question about tomcat JDBC realm.
Copying One node values from one xml to another xml
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter