0

i have a doubt, this is my scenario, when an user (in register.jsp) click in 'register' would like to go to my servlet and do all the stuff that have to be done. And i would like to return a message in the same register.jsp that tells if the register was sucessful or not, i don't want to redirect to another .jsp.

Is this possible ?

I developed a box that appears in the register checking if the data that the user provide are valid, is in javascript + css, i would like to use this box, if possible.

Best regards, Valter Henrique.

Valter Silva
  • 16,446
  • 52
  • 137
  • 218

2 Answers2

3

use ajax, http://api.jquery.com/jQuery.ajax/

$.ajax({
  url: "check.jsp",
  context: document.body,
  success: function(){
     // do something when you got the message.
  }
});
James.Xu
  • 8,249
  • 5
  • 25
  • 36
1

You are looking for AJAX. You can do it with DWR easily.

jmj
  • 237,923
  • 42
  • 401
  • 438
  • @ata there are many framework our, but DWR can be easily plugged into simple web-app. – jmj Mar 29 '11 at 10:34