• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with the SignUp page

 
sovan chatt
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing a project on online railway reservation using servlets and jsp.I wanted some suggestions regarding the signup page.In the signup page(say signup.jsp) the user will have to enter the user-id and click the "check availability"button to see if the user-id is available. If it is not available he will get a message ("User-id not available") else he will get a message("Uesr-id is avaible") on the same page and then he can enter other details in the HTML form and click the"SUBMIT" button to create an account.How to do it?I tried the following approach...

Say,if the "check availability" button is clicked a servlet is called which in turn calls a java class to acess the user database.Now,if the user-id is available true value is returned to the sevlet else false.I got stuck here. Based on the boolean value how will a msg be printed on signup.jsp?
 
Aalok Singh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey dude,

Use AJAX in onclick event of check "check availability"button.

Rgds,
Singh
 
sovan chatt
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey dude,

Use AJAX in onclick event of check "check availability"button.

Rgds,
Singh

Thanks for your help but I have no idea about Ajax.Anyway cant it be done using servlets and jsp alone?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Use a boolean in the request scope in a JSTL <c:if> tag to determine whether or not the message gets printed.
 
sovan chatt
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes. Use a boolean in the request scope in a JSTL <c:if> tag to determine whether or not the message gets printed.

OK.Thanks!!Going to try it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!