Hi jyotsana,
I would suggest you use container managed security to manage your login. There are examples and docs in the
Servelet specification as well as with
Tomcat 4.1.x.
I would use a JSP to render the login form since its easier than building the HTML with
Java Strings (building your HTML in a servlet is actually one of the anti-patterns in the
J2EE AntiPatterns book, you can ge the chapter at
patternscentral.com).
After you get around your login problem I would highly suggest trying out one of the many MVC frameworks for web development.
Struts is the defacto standard with many many books published on the subject.
Tapestry is supposed to be really cool there are lots of others (search Google for 'MVC Web Framework').
JavaServer Faces is the future since it will almost certianly be rolled into the J2EE spec at some point so it would probably be good to learn that as well.
Hope this helps!
[ September 26, 2003: Message edited by: Bill Dudney ]