Showing posts from June, 2012

Update the LOG Level at Runtime without Restarting the server

Update the LOG Level at Runtime without Restarting the server- Thanks to have enchnaced the code by providing a jsp file and adding log4j.xml properties as well.Find the update src code and screen shots in the PDF below. Log4j-Update Log Level of the Application without restarting the server.PDF

JDOM-Modify xml or add new elements to XML

The JDOM api is used for modifying the xml and adding new Element and values to the existing xml. /*
jaxen, xercesImpl.jar,xml-apis.jar

Download the source code from the below link.
The Jar file contains a main program, which demonstates how to use the JDOM api.
All we have to do is modify the main program-with your file name
and provide the parameters.
Add the other source file to the class path.Or add the jar to the class path with above mentioned JAR-Jdom and xml related jar

package com.anjana.xmlutils;


public class ModifyMain {
    public static void main(String args[]){
        File xmlFile = new File("c:\\myfile.xml");
        ModifyXMLFileClient modifyclient=new ModifyXMLFileClient(xmlFile);

JAAS Authentication Process

JAAS Authentication Process:

Creating  an Instance of Login context-using the constructor- LoginContext(String,CallbackHandler)The First paramenter takes the name of the configuration file Second Parameter is a callbackhander it has a Handle() method-this passes the information to the loginModule.An empty Subject is created before authentication begins-this subject is passed to the login modules.On Success the SUbject is attached with credentials.login() method is called to instiate the  login process-after success the application can retrive the Subject using getSubject();on failure throws authentication failure exception.

Working with Open LDAP JAAS and JBOSS

web.xml and web-app xsd

web.xml  - the xsd provides lot of other options available in  web.XML file other than servlet ,filter and listener mapping.

security constraints tag gives info about how we can secure resources and is useful in configuring JAAS.

Installing openldap for windows

The open ldap manual gives all the options(BDB,LDIF--SQL etc) for installing open ldap.
Userbosster is a good openldap for windows tool.
If you are using open ldap for windows--select the LDIF format.
The client tools like apache studio works with LDIF format.
JExplorer client- is also a better options and gives a nice tree.

OPEN LDAP Installer for windows