Get your CodeRanch badge!*
The moose likes HTML, CSS and JavaScript and the fly likes Ajax Query related to request and response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax Query related to request and response" Watch "Ajax Query related to request and response" New topic
Author

Ajax Query related to request and response

suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jan 10, 2002
Posts: 60053
    
  65

Concur with Eric. if you need the XML data in another page, why aren't you making the Ajax call from that page?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
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

Joined: Jan 10, 2002
Posts: 60053
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax Query related to request and response
 
Similar Threads
Passing attributes from servlet to jsp
Ajax doubt
Displaying SOAP response using JSP
How to handle Ajax response in Spring MVC
Servlet and ajax