Re: JDBC authentication configuration

2002-01-14 Thread Paul Phillips

Thanks to David!

This fixed my authentication problem!

--On Monday, January 14, 2002 10:22 AM -0500 David Smith <[EMAIL PROTECTED]> 
wrote:

> This may or may not be the full problem, but one glaring error is in the
> connectionURL of your server.xml file.  It should read as follows.  Note
> the URL for making a  connection to a MySQL database uses an & symbol
> before 'password' and in XML  it has to be encoded.  Hope this helps you
> out.

>   connectionURL="jdbc:mysql://localhost/rmta?user=myuser&password=mypa
> ssword"


I copied the URL directly from the Apache-Jakarta-Tomcat Realm 
Configuration How-To, and it shows only the semicolon following the 
user=username pair.  It doesn't mention the ampersand at all.  Should this 
be changed in the docs (since the example is showing a connection to a 
mysql database)?

Thanks
Paul Phillips

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: JDBC authentication configuration

2002-01-14 Thread David Smith

This may or may not be the full problem, but one glaring error is in the 
connectionURL of your server.xml file.  It should read as follows.  Note the URL for 
making a 
connection to a MySQL database uses an & symbol before 'password' and in XML 
it has to be encoded.  Hope this helps you out.



--David

On Sunday 13 January 2002 08:12 pm, you wrote:
> Hello,
>
> I am relatively new to servlet/jsp programming, and struggling with JDBC
> authentication.  I have a tiny test application that works fine using form
> authentication against passwords and names in the tomcat-users.xml file.
> However, when I reconfigure the server.xml file for JDBC authentication
> (following the instructions on the Apache/Tomcat site) the server hangs
> during startup.
>
> My little app is in a folder called /rmta-test.
>
> Specifically, in the log, the hang comes early on in the startup process,
> right after a line saying:
>
> Standard Manager [:/rmta-test]: Seeding of random number generator has
> completed.
>
> Below I have quoted the relavant lines from the server.xml file, and the
> web.xml file for this application.  I don't think this has anything to do
> with the database, as Tomcat seems to hang on startup well before any
> interaction with the database.  However, the database tables are setup
> correctly per the docs, and I can query it manually.  I have also used a
> small stand-alone java program to create a table using the JDBC driver, so
> I know that the driver is installed correctly (in the tomcat library).
>
> If I simply remove the Realm statement, then Tomcat starts up normally.
>
> I'm pretty sure I've got something wrong in the configuration, of
> server.xml or web.xml, but i can't figure out what it is.  I would be
> grateful for anyone's help.
>
> By the way, I'm using Tomcat 4.0.1 on unix.
>
> Thanks!
> Paul Phillips
> ___
>
> Here are the lines that I inserted in my server.xml file to try and get
> JDBC authentication going:
>
>  reloadable="true">  debug="99" driverName="org.gjt.mm.mysql.Driver"
>
> connectionURL="jdbc:mysql://localhost/rmta?user=myuser;password=mypassword"
>   userTable="tablename" userNameCol="login"
> userCredCol="password"
>   userRoleTable="rolestable" roleNameCol="role" />
> 
>
> ___
>
> Here is my web.xml file:
>
> 
>
>  2.3//EN" " http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
> 
>GreetingServlet
>fenced.GreetingServlet
> 
> 
>GreetingServlet
>/greeting
> 
> 
>
>   Entire Application
>   /*
>
>
>   thename
>
> 
>
> 
>FORM
>
>
>/login.jsp
>/error.jsp
>
> 
> 
>
>
>
>
>
> ___
> Paul Phillips
> Director of Orchestral Activities, Meadows School of the Arts
> Southern Methodist University
>
> "You must sing every note you play, sing even through the rests!"
> Arturo Toscanini
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




JDBC authentication configuration

2002-01-13 Thread Paul Phillips

Hello,

I am relatively new to servlet/jsp programming, and struggling with JDBC 
authentication.  I have a tiny test application that works fine using form 
authentication against passwords and names in the tomcat-users.xml file. 
However, when I reconfigure the server.xml file for JDBC authentication 
(following the instructions on the Apache/Tomcat site) the server hangs 
during startup.

My little app is in a folder called /rmta-test.

Specifically, in the log, the hang comes early on in the startup process, 
right after a line saying:

Standard Manager [:/rmta-test]: Seeding of random number generator has 
completed.

Below I have quoted the relavant lines from the server.xml file, and the 
web.xml file for this application.  I don't think this has anything to do 
with the database, as Tomcat seems to hang on startup well before any 
interaction with the database.  However, the database tables are setup 
correctly per the docs, and I can query it manually.  I have also used a 
small stand-alone java program to create a table using the JDBC driver, so 
I know that the driver is installed correctly (in the tomcat library).

If I simply remove the Realm statement, then Tomcat starts up normally.

I'm pretty sure I've got something wrong in the configuration, of 
server.xml or web.xml, but i can't figure out what it is.  I would be 
grateful for anyone's help.

By the way, I'm using Tomcat 4.0.1 on unix.

Thanks!
Paul Phillips
___

Here are the lines that I inserted in my server.xml file to try and get 
JDBC authentication going:





___

Here is my web.xml file:



http://java.sun.com/dtd/web-app_2_3.dtd";>



   GreetingServlet
   fenced.GreetingServlet


   GreetingServlet
   /greeting


   
  Entire Application
  /*
   
   
  thename
   



   FORM

   
   /login.jsp
   /error.jsp
   







___
Paul Phillips
Director of Orchestral Activities, Meadows School of the Arts
Southern Methodist University

"You must sing every note you play, sing even through the rests!"
Arturo Toscanini

--
To unsubscribe:   
For additional commands: 
Troubles with the list: