I dont think, you need all this to login using JAAS. Its pretty simple, you need to have the user.conf in your classpath and add using System.setProperty. Also, i see a problem in the code that you have:
LoginContext lc = new LoginContext("clientTest", new MyCallbackHandler());
Shouldnt "clientTest" be "userTest" since your user.conf mentions userTest?
I have a problem with config file. I am using jboss server. my code is not able to locate the config file which i put in the same path from where i am instanciating the loginContext. But when I am configuring it in jboss\server\default\conf\login-conf.xml file. It was abled to locate the LoginModule. Can you please tell me how to make it possible form config file it self, because i want to use my own LoginModule.
Thanks in Advance