• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlets

 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
iam making a login web page..
can anyone please tell me whether to use jsp or servlets to do for this..
 
Torsten Schippel
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It makes no difference for me. A JSP page is just a servlet after compilation.
I would use MVC approach so servlet would be the choice.
Regards
Torsten
 
Bill Dudney
Author
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would say u must use jsp for this (or any kind of view like welcome page etc)
servlets should only be used to process request and as a controller.

Originally posted by jyotsana dang:
hi..
iam making a login web page..
can anyone please tell me whether to use jsp or servlets to do for this..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!