File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes AJAX Apache redirect doesn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "AJAX Apache redirect doesn Watch "AJAX Apache redirect doesn New topic

AJAX Apache redirect doesn't work

s Joshi

Joined: Sep 26, 2005
Posts: 12

I have an HTML page which uses AJAX and its deployed on Apache server without tomcat module (e.g. I am making an AJAX call to /xyz/proxy.jsp from this html page and it gets permanent redirected to (using Redirect in Apache configuration).

If I visit using a browser, then it gets redirected to but my AJAX calls are not being made.

Any ideas?

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
First off if you put a simple text file on your server in the same directory does you code fetch it.

Next JavaScript has a same domain policy where the script can only worth with other info in the calling domain. Think it has issues with sub domains.

if you page is here

you would have to call a proxy in the same location

That proxy would have to go and get another page from an outside source.

s Joshi

Joined: Sep 26, 2005
Posts: 12
Thanks for answering.

My proxy is on other machine.

My Apache server is not capable of handling JSP/PHP requests (restriction). My AJAX procedure makes call to "/xyz/proxy.jsp", which gets redirected to using Apache Redirect. This redirect never takes place from AJAX call.
I agree. Here's the link:
subject: AJAX Apache redirect doesn't work
Similar Threads
i have started my last week preparations please help
using mod_redirect and retaining full URL
RMI on a Servlet
Calling HTML Page from Servlets
IBM Http Server : Unable to redirect to custom error page