Hi Leonard,

this works for me:

  <Context path="" docBase="/home/user1/trustedfeed" debug="0">
      <ResourceLink name="jdbc/db" global="jdbc/db"
type="javax.sql.DataSource" />
      <Realm className="org.apache.catalina.realm.DataSourceRealm"
debug="99"
          dataSourceName="jdbc/db"
          userTable="users" userNameCol="username" userCredCol="password"
          userRoleTable="roles" roleNameCol="rolename"/>
  </Context>

Of course, you have to define the jdbc/db Datasource in the
GlobalNamingResources, too.

hth

Marco

---
http://www.optik-preisvergleich.de
http://www.kontaktlinsen-preisvergleich.de


> -----Ursprüngliche Nachricht-----
> Von: Leonard Wolters [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 23. März 2004 09:22
> An: [EMAIL PROTECTED]
> Betreff: NEWBIE question: JAAS- versus JDBC- versus MemoryRealms
>
>
> Hi,
>
> I've got a question concerning the different REALM available for
> Tomcat 5.x.
> The main (basic) question is that I want to secure my context
> annex websites
> / jsp
> pages. I have some experience with JAAS (JBOSS) and was investigating the
> possibility
> to use / implement JAAS for Tomcat. After some efforts I stopped
> since I to
> noticed it
> would take me to much pain ;-( (I needed to create to much source
> code hence
> it would
> take me to much time).
>
> Then I investigated the JDBC Realm and was trying to use this for securing
> my website.
> The question: Tomcat 5 delivers a pre-installed security JSP example
> (/jsp-examples/security/protected) which (as stated in the documentation)
> only works with
> the MemoryRealm. Well, I want this to work with the JDBCRealm (or even my
> own implementation)
> as well.
>
> Does anyone can provide me some configurations of how to achieve this ?
> Basically, I think
> I need to change the default JNDI UserBase (MemoryRealm) with my own one
> (JDBCRealm for example).
> However, is this the only thing I need to do ? If so, please provide me a
> server.xml configuration
>
> T.i.a,
>
> Leonard
>
> Leonard Wolters
>
> JTeam B.V.
> E: [EMAIL PROTECTED]
> T: +31(0)20 486 20 36
> M: +31(0)6 24 111 401
> F: +31(0)8 48 370 000
> W: www.jteam.nl
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to