dev@glassfish.java.net

Re: Rails app is redirected to index.html

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Tue, 15 Jul 2008 10:48:10 -0700

"resource" variable is unresolved and "cache" has private access in
StaticResourcesAdapter. JeanFrancois is looking into that. And once that
is resolved
./grizzly/jruby/src/main/java/com/sun/grizzly/jruby/RailsAdapter.java
needs to be updated to reflect that change.

-Arun

Jeanfrancois Arcand wrote:
> Salut,
>
> Arun Gupta wrote:
>> Using the latest v3 Hudson build, I created & deployed a Rails app as
>> described at:
>>
>> http://wiki.glassfish.java.net/Wiki.jsp?page=SimpleRailsApp
>>
>> The default page at http://localhost:8080/<RAILS_APP> should show the
>> Rails page but instead is redirected to localhost:8080/index.html. If I
>> create controller/views in the Rails app then they seem to work/show up
>> fine.
>>
>> This used to work fine before the mega changes few days ago. Any idea ?
>
> Yes this is the latest grizzly integration (1.8.2) that produced that
> change of behavior:
>
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=168
>
> If you want to change the behavior (because it was a bug before), you
> need to add the following inside your JRubyAdapter.service(String,Req,Res):
>
> if (resource.isDirectory()) {
> resource = new File(resource, "index.html");
> cache.put(uri,resource);
> }
> super.service(...);
>
> Follow up the discussion on users|dev_at_grizzly.dev.java.net. I recommend
> you subscribe as this was discussed on the dev alias.
>
> A+
>
> -- Jeanfrancois
>
>
>
>>
>> Thanks,
>> -Arun
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta