Microsoft SQL Server 2000 Driver for JDBC Errors

2002-06-22 Thread Mark A. Richman

I am trying to use the JDBC driver with Apache Tomcat 4.0 (JDK 1.4).
Here is
my context configuration for the Datasource from server.xml:

Context path=/admin docBase=admin debug=0 privileged=true
 Resource name=jdbc/DremiaDS auth=SERVLET
type=javax.sql.DataSource/
 ResourceParams name=jdbc/DremiaDS
  parameter
   nameUser/name
   valuesa/value
  /parameter
  parameter
   namePassword/name
   valuemypassword/value
  /parameter
  parameter
   nameDatabaseName/name
   valueDremia/value
  /parameter
  parameter
   nameServerName/name
   valuelocalhost/value
  /parameter
  parameter
   namedriverClassName/name
   valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
  /parameter
  parameter
   namedriverName/name

valuejdbc:microsoft:sqlserver://localhost:1433;ServerName=localhost;Da
taba
seName=Dremia;User=sa;Password=mypassword/value
  /parameter
  parameter
   namemaxActive/name
   value8/value
  /parameter
  parameter
   namemaxIdle/name
   value4/value
  /parameter
 /ResourceParams
/Context

When attempting to access the database, I get the following error:

Debug: SQL Exception:
Debug: State  : 28000
Debug: Message: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Login
failed for user 'sa'.
Debug: Error  : 18456
Debug: State  : 08001
Debug: Message: [Microsoft][SQLServer 2000 Driver for JDBC]An error
occured
while attempting to log onto the database.
Debug: Error  : 0

I am running SQL Server 2000 SP2 with security set to SQL Server and
Windows. This drivers seems to work fine from Forte CE as well.

Can someone lend a hand?

Thanks,
Mark A. Richman





RE: security_constraint question

2002-06-22 Thread Mark A. Richman

Try replacing:

url-pattern/comics/url-pattern
url-pattern/comics/*/url-pattern

with:

url-pattern/*/url-pattern

This applies the security constraint to your web app (not the root of
the server). The former would only be effective on
http://thompson3:8080/comics/comics/.

- Mark


-Original Message-
From: Ed Thompson [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, June 22, 2002 3:42 PM
To: Tomcat Users List
Subject: security_constraint question

OK, rookie question

I have a file in $TOMCAT_HOME/webapps/comics  (index.html)

$TOMCAT_HOME/webapps/comics/WEB-INF/web.xml has:

security-constraint
  web-resource-collection
 web-resource-nameProtected Area/web-resource-name
 !-- Define the context-relative URL(s) to be protected --
 url-pattern/comics/url-pattern
 url-pattern/comics/*/url-pattern
 !-- If you list http methods, only those methods are protected --
 http-methodDELETE/http-method
 http-methodGET/http-method
 http-methodPOST/http-method
 http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
 !-- Anyone with one of the listed roles may access this area
--
 role-namecomics/role-name
  /auth-constraint
/security-constraint

I have is set up for BASIC as my auth-method.  Pretty much cut and paste
form the examples directory.

However, on my browser when I go to //thompson3:8080/comics, it takes me
right to index.html.
Why does it not require me to login first?  What have a missed in the
Tomcat
configuration?

Help greatly appreciate - been struggling with this for a couple of
days...

(PS - the examples works great - going to
//thompson3:8080/examples/jsp/security/protected forces a login)





--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]