The command line tool "keytool" as part of the JDK is not the best tool from an usability perspective. There is the issue of various signature algorithms (DSA,RSA etc), various keystore types(JKS,pkcs12 etc), generation of CSRs etc.
I did play around with the "keyman" tool available from IBM for free. Quite decent.
I came across the following OSS tool "CSRTool". I have not yet played around with it.
CSRTool
Friday, March 16, 2007
Fine Tune JBoss
Ever wondered how you can fine the JBoss Application Server?
Then just look at the following wiki page on JBoss Wiki:
Fine Tuning JBoss
Then just look at the following wiki page on JBoss Wiki:
Fine Tuning JBoss
Wednesday, March 14, 2007
Using HttpClient to make a FORM based conversation
I found this blog that had some code for doing FORM based authentication conversation.
http://cocoalocker.blogspot.com/2007/01/java-ruby-http-clients.html
===========
So the Java code to access the servlet using form based authentication looks like this:
http://cocoalocker.blogspot.com/2007/01/java-ruby-http-clients.html
===========
So the Java code to access the servlet using form based authentication looks like this:
public static void formAuthDemo()
throws IOException, HttpException {
HttpClient client = new HttpClient();
// make the initial get to get the JSESSION cookie
GetMethod get = new GetMethod(
"http://localhost:8080/MyWebApp/myservlet");
client.executeMethod(get);
get.releaseConnection();
// authorize
PostMethod post = new PostMethod(
"http://localhost:8080/MyWebApp/j_security_check");
NameValuePair[] data = {
new NameValuePair("j_username", "tomcat"),
new NameValuePair("j_password", "tomcat")
};
post.setRequestBody(data);
client.executeMethod(post);
post.releaseConnection();
//resubmit the original request
client.executeMethod(get);
String response = get.getResponseBodyAsString();
get.releaseConnection();
System.out.println(response);
}
==================
Subscribe to:
Posts (Atom)