• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Help with the SignUp page

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic