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?