• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ajax Query related to request and response

 
suneel kota
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am using ajax in my application, thing is that when i need to pass ajax response to another jsp page.

Description:
I am calling a servlet with an ajax request from login.jsp, which is returning a data in xml file. but i need to show this data in another jsp called employee.jsp page.

how can i proceed to get above requirement in ajax..

Thanks in advance..

Regards
SuneelKota
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure why you would use Ajax to do this if you are not on the same page.

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Concur with Eric. if you need the XML data in another page, why aren't you making the Ajax call from that page?
 
suneel kota
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,

Thing is that when ever user enters username and password in login page. i need to call a service through ajax request and response should go to employee.jsp page.. Here we are using complete ajax request to call a servlet/service..


Regards
SuneelKota
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The whole point of Ajax is to make a request and to return the response to the same page. If that's not what you're doing, Ajax is not the correct means.

If you need to respond to another page, just submit the form to the next page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic