Hi again.

I do mean realm and the reason why I mention it is that I can validate users
via my users and user_roles in my db, so the connection should work I guess?


        <Context path="/xx" docBase="webapp" reloadable="true">
        <Manager pathname="xx" />
         <Realm  name="UMRealm"
className="org.apache.catalina.realm.JDBCRealm"
         debug="99"
driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver"

connectionURL="jdbc:sqlserver://127.0.0.1;DatabaseName=xx;ProgramName=xx;Sel
ectMethod=cursor"
         connectionName="xx" connectionPassword="xx" userTable="users"
userNameCol="username" userCredCol="password" userRoleTable="user_roles"
roleNameCol="rolename" />
        </Context>

Get the connection with: DriverManager.getConnection(    connectionUrl,
connectionUser,    connectionPass)

I also just upgrade my struts could it be a taglib thing?

In my JSP:

<%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %>

<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>

<%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %>

<%@ taglib uri="http://struts.apache.org/tags-nested"; prefix="logic" %>

In my web.xml:

  <taglib>
    <taglib-uri>http://struts.apache.org/tags-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>http://struts.apache.org/tags-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>http://struts.apache.org/tags-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>http://struts.apache.org/tags-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  </taglib>

----- Original Message -----
From: "Johnny Kewl" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, June 22, 2007 1:00 PM
Subject: Re: Realm works; db connection does not?


>
> Hi Søren,
>
> Not sure what you saying but arnt you confusing Realm and JNDI.
> ie the Realm is for your user and password dB
> and JNDI/DBCP is for you to do other stuff with your dB....
>
> Think you almost there just check out
> http://localhost:8080/tomcat-docs/jndi-resources-howto.html
> on your system
>
> If this is not the problem, please post your config and code you using....
>
> ----- Original Message -----
> From: "Søren Blidorf" <[EMAIL PROTECTED]>
> To: <users@tomcat.apache.org>
> Sent: Friday, June 22, 2007 10:44 AM
> Subject: Realm works; db connection does not?
>
>
> Hi.
>
> My realm is working and is able to login to my app. When I try to do
> anything in the application that need connection to db, I get a white
> screen.
>
> Can anybody tell me the differance between the realm connection to the db
> and my applications connection to the db.
>
> I use: com.microsoft.sqlserver.jdbc.SQLServerDriver and jdbc:sqlserver
>
> Any idears is appriciated
>
> Soren
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to