It does.
Thanks for trying.
Curtis
>>> [EMAIL PROTECTED] 02/15/05 11:56AM >>>
Hi,
Does your login.jsp have something similar to
this:
<form method="POST" action='<%=
response.encodeURL("j_security_check") %>' >
<input type="text" name="j_username" >
<input type="password" name="j_password" >
</form>
It it does, I can't think of where to look for now.
aka_sergio
--- Curtis Nelson <[EMAIL PROTECTED]> wrote:
> Thanks for replying.
>
> Here's my web.xml file:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
> Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
> <welcome-file-list>
> <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
> <security-constraint>
> <display-name>Example Security
> Constraint</display-name>
> <web-resource-collection>
> <web-resource-name>Protected
> Area</web-resource-name>
> <url-pattern>/*</url-pattern>
> <http-method>GET</http-method>
> <http-method>POST</http-method>
> </web-resource-collection>
> <auth-constraint>
> <role-name>lduser</role-name>
> </auth-constraint>
> </security-constraint>
> <login-config>
> <auth-method>FORM</auth-method>
> <form-login-config>
> <form-login-page>/login.jsp</form-login-page>
> <form-error-page>/error.jsp</form-error-page>
> </form-login-config>
> </login-config>
> <security-role>
> <role-name>lduser</role-name>
> </security-role>
> </web-app>
>
> >>> [EMAIL PROTECTED] 02/15/05 11:21AM >>>
> Hi,
> How are you defining the <security-constraint>
> <security-role> in your ldsecure/WEB-INF/web.xml ?
> And also how do use this in your servlet or jsp to
> get
> authentication? Maybe post your web.xml too?
>
> aka_sergio
>
>
> --- Curtis Nelson <[EMAIL PROTECTED]> wrote:
>
> > I know the database connection works, because if I
> > include the realm as part of the engine or host,
> > then I can login correctly. As far as reading the
> > realm how-to, I've done that several times. The
> > second .xml file I sent you is named ldsecure.xml
> > (part of the ldsecure webapp), and I placed it in
> >
>
$CATALINA_HOME/conf/[enginename]/[hostname]/ldsecure.xml.
> > I'm not creating a WAR file, just a directory
> > structure.
> >
> > Any additional ideas?
> >
> >
> > >>> [EMAIL PROTECTED] 02/15/05
> > 10:43AM >>>
> > Check your configuration with
> >
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JDBCRealm
>
> >
> > (database configuration, driver, url access, user
> et
> > password access, and
> > log files).
> > Try to setup Memory realm.
> > Try to validate database url connection with
> simple
> > java class.
> >
> > import java.sql.*;
> > import <your driver>;
> >
> > class JDBCVersion
> > {
> > public static void main (String args [])
> > throws SQLException
> > {
> > // Load the JDBC driver
> > DriverManager.registerDriver(new
> > com.microsoft.jdbc.sqlserver.SQLServerDriver());
> >
> > // Something like this (probably)
> > Connection conn =
> >
>
DriverManager.getConnection("jdbc:microsoft:sqlserver://LDSERVER:1433;databa
> > sename=ldbugtracker", "abc","abc");
> >
> > // Create Oracle DatabaseMetaData object
> > DatabaseMetaData meta = conn.getMetaData ();
> >
> > // get driver info:
> > System.out.println("JDBC driver version is " +
> > meta.getDriverVersion());
> > }
> > }
> >
> >
> > I assume that you have deployed your context
> > configuration in :
> > - META-INF/context.xml directory of your WAR file
> > - $CATALINA_HOME/conf/[enginename]/[hostname]/
> > directory
> >
> >
> > -----Message d'origine-----
> > De : Curtis Nelson [mailto:[EMAIL PROTECTED]
>
> > Envoy�: mardi 15 f�rier 2005 18:14
> > �: [email protected]
> > Objet : Re: RE : RE : RE : RE : Tomcat
> configuration
> >
> > According to the tomcat docs, the preferred method
> > of describing a context
> > realm is to place it in it's own xml file.
> > Here's what I have:
> >
> > <!-- <Context
> > docBase="${catalina.home}/server/webapps/manager"
> > privileged="true"
> > antiResourceLocking="false"
> > antiJARLocking="false"> -->
> >
> > <Context reloadable="true" path="/ldsecure"
> >
> docbase="${catalina.home}/server/webapps/ldsecure">
> > <Realm
> > className="org.apache.catalina.realm.JDBCRealm"
> >
> >
>
driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
> >
> >
>
connectionURL="jdbc:microsoft:sqlserver://LDSERVER:1433;databasename=ldbugtr
> > acker;selectmethod=cursor"
> > connectionName="abc" connectionPassword="abc"
> > userTable="LDUsers"
> > userNameCol="username" userCredCol="password"
> > userRoleTable="LDUserRoles" roleNameCol="role"
> > debug="99"/>
> > </Context>
> >
> >
> > If I place this <context> statement in the
> > server.xml file, under the
> > described host, I get the same problem.
> >
> > Curtis
> >
> >
> >
> > >>> [EMAIL PROTECTED] 02/15/05
> > 10:09AM >>>
> > There is no realm describe into it!
> > Have you declared your realm in your
> > META-INF/context.xml directory of your
> > WAR file?
> > Could you send us your context.xml file?
> >
> > -----Message d'origine-----
> > De : Curtis Nelson [mailto:[EMAIL PROTECTED]
>
> > Envoy�: mardi 15 f�rier 2005 18:03
> > �: [email protected]
> > Objet : Re: RE : RE : RE : Tomcat configuration
> >
> > With pleasure.
> >
> > <Server port="8005" shutdown="SHUTDOWN">
> > <Listener
> >
>
className="org.apache.catalina.mbeans.ServerLifecycleListener"
> > />
> > <Listener
> >
>
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> > />
> >
> > <GlobalNamingResources>
> > <Environment name="simpleValue"
> > type="java.lang.Integer" value="30"/>
> >
> > <Resource name="UserDatabase" auth="Container"
> >
> > type="org.apache.catalina.UserDatabase"
> > description="User database that can be
> > updated and saved"
> >
> >
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
---------------------------------------------------------------------
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]