John,

Thanks, the new version works great.  I tested it with multiple component roots 
as well. 

I will be using it on the web project I am doing.  I will let you know if I run 
into anything else.

Have a great night,
John


-----Original Message-----
From: John Williams [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 25, 2006 8:12 PM
To: Bull, John
Cc: mason-users@lists.sourceforge.net
Subject: RE: [Mason] Problems using Component:Ajax

On Fri, 25 Aug 2006, Bull, John wrote:

> I'm getting closer.  I removed the multiple component roots, but am 
> still getting the following error message
>  
> "The requested URL /ajax/ajax.comp/ajax/index.html:my_ajax_test was 
> not found on this server."
>  
> The prototype library is calling back to this url which isn't valid. 
> What else am I doing wrong?

I think it is just assumptions about the setup on my part again.

My normal setup is inside apache <Location> directives, which sends everything 
with that prefix to mod_perl/Mason without validating files (or adding 
/index.html to directory requests, as noticed in another recent thread).

If you are using <Files> or <FilesMatch> in your httpd.conf, then apache will 
notice that the above URL is invalid and reject it before sending it to 
mod_perl/Mason.

Since one cannot call methods directly, and I wanted to be able to use method 
for my ajax calls, ajax.comp is attempting to call itself with the real 
destination appended to the URL, which it can find in $ENV{PATH_INFO}.  But 
that's probably a bit sloppy, since mod_perl2 doesn't necessary setup the %ENV 
stuff, and it does not necessary work with a <Files> type configuration, as you 
notice.

So I have attached an improved version, which should work with multiple 
comp_roots, and <Files> directives.  Remember, the ajax component itself needs 
to be accessible, so you might need to rename it to ajax.html if you have 
<FilesMatch *.html> in your config.  Let me know how this one works.

~ John Williams



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to