Does Mephisto have controllers mapped under /images and /stylesheets?
If this is the case, then we need to generate servlet-mappings for all files in the tree, without using the /* shortcut for directories.

<servlet-mapping>
  <servlet-name>files</servlet-name>
  <url-pattern>/stylesheets/style.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>files</servlet-name>
  <url-pattern>/stylesheets/scaffold.css</url-pattern>
</servlet-mapping>
... etc

I'll update the plugin to do this.

Cheers,
Robert

Charles Oliver Nutter wrote:
Robert Egglestone wrote:
The resource serving servlet is FileServlet.

In web.xml, the default servlet is RailsServlet, so every file or directory under public needs a mapping explicitly specified pointing it to FileServlet.

Unfortunately, it looks like the process used by the plugin to generate this list is breaking under JRuby. I suspect this is related to canonicalization of the file paths, which happens in JRuby but not in Ruby.

Under MRI the web.xml does appear to generate like I'd expect, but I still have issue routing resources for themes (which Mephisto wants Rails controllers to handle directly, it would seem).

What can be done to correct this? You seem to understand the issue, and I'm not clear exactly what's wrong in JRuby that would cause these paths to get mixed up...

MRI's version:

<servlet-mapping>
   <servlet-name>files</servlet-name>
   <url-pattern>/images/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
   <servlet-name>files</servlet-name>
   <url-pattern>/install.html</url-pattern>
</servlet-mapping>

<servlet-mapping>
   <servlet-name>files</servlet-name>
   <url-pattern>/javascripts/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
   <servlet-name>files</servlet-name>
   <url-pattern>/robots.txt</url-pattern>
</servlet-mapping>

<servlet-mapping>
   <servlet-name>files</servlet-name>
   <url-pattern>/stylesheets/*</url-pattern>

_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to