how to get the client certificate and save/retrieve it to/from openldap

2006-11-07 Thread Eric Yin

Hi,

I'm using Tomcat for mutual authitication. after the brower and server 
finish the certificate exchange and verification (which is already 
done). I want to get the client certificate and compare it with what's 
been stored in the LDAP.


I'm new with linux. how can i get the client certificate using JSP or 
Servelet? and how can i connect to openldap and save/retrieve files 
to/from the Ldap server using JSP or Servelet?


thanks,

Eric.



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



how to get the client certificate and save/retrieve it to/from openldap

2006-11-06 Thread Eric Yin

Hi,

I'm using Tomcat for mutual authitication. after the brower and server 
finish the certificate exchange and verification (which is already 
done). I want to get the client certificate and compare it with what's 
been stored in the LDAP.


I'm new with linux. how can i get the client certificate using JSP or 
Servelet? and how can i connect to openldap and save/retrieve files 
to/from the Ldap server using JSP or Servelet?


thanks,

Eric.


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



Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-04 Thread Eric Yin

Hi Guys,

I just found out the reason. My index.jsp in the the Root directory, 
however,  the path of the sever.xml/context is "/DBTest".


thanks for all the help.

Eric.

Quoting Eric Yin <[EMAIL PROTECTED]>:


Hi Chris,

Thanks for the help.

After I move the Connector/J 5.0 to the Tomcat's server-wise 
common/lib directory and remove the autoReconnect=true, i still get 
the same error.


thanks,

Eric.


Quoting Christopher Schultz <[EMAIL PROTECTED]>:


Eric,

Eric Yin wrote:

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and i got this error.


Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:


url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>


Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris







-
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]



Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-04 Thread Eric Yin

Hi Chris,

Thanks for the help.

After I move the Connector/J 5.0 to the Tomcat's server-wise common/lib 
directory and remove the autoReconnect=true, i still get the same error.


thanks,

Eric.


Quoting Christopher Schultz <[EMAIL PROTECTED]>:


Eric,

Eric Yin wrote:

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and i got this error.


Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:


url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>


Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris







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



Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread Eric Yin

Quoting Eric Yin <[EMAIL PROTECTED]>:


Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
and i got this error.


i'm using fedora 5 and i download "Linux (non RPM package) downloads 
/linux (x86)" of mysql and install it accoding to the insturction. I 
created a databse P6120 and table test2 by using user 'eric' and 
passwod 'ericyin1'.


I add the following to server.xml:

   username="eric" password="ericyin1" 
driverClassName="com.mysql.jdbc.Driver"

  url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



I add the following to web.xml:
 
 DB Connection
 jdbc/TestDB
 javax.sql.DataSource
 Container
 

I add the following to the index.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, name, studentid  from test2




   name ${row.name}
   studentid ${row.studentid}


thanks,

Eric.



-
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]



Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread Eric Yin

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
and i got this error.


i'm using fedora 5 and i download "Linux (non RPM package) downloads 
/linux (x86)" of mysql and install it accoding to the insturction. I 
created a databse P6120 and table test2 by using user 'eric' and 
passwod 'ericyin1'.


I add the following to server.xml:

   username="eric" password="ericyin1" 
driverClassName="com.mysql.jdbc.Driver"

  url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



I add the following to web.xml:
 
 DB Connection
 jdbc/TestDB
 javax.sql.DataSource
 Container
 

I add the following to the index.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, name, studentid  from test2




   name ${row.name}
   studentid ${row.studentid}


thanks,

Eric.



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



tomcat ssl not work

2006-10-31 Thread Eric Yin

Hi,

I just installed Fedora 5 and Tomcat 5.5 which is included in the 
Fedora 5 DVD. Tomcat works well for the port 8080. you can visit 
http://joconda.ciise.concordia.ca:8080 to see. But for SSL (8443) it 
doesn't work. I configure accoding to 
http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html . I use keytool 
to create a new keystore from scratch: $JAVA_HOME/bin/keytool -genkey 
-alias tomcat -keyalg RSA


Since I can not find keytool from Fedora 5 jdk1.4.2 and I download 
J2SE(TM) Development Kit 5.0 Update 9: jdk-1_5_0_09-linux-i586.bin and 
install it and use the keytool from this kit.


I don't run httpd at all.

Can you help me why https://joconda.ciise.concordia.ca:8443 doesn't work?

thanks alot,

Eric.


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