« Return to Thread: Merb app. deployed to Websphere 6.1 fails on both AIX and Windows

Re: Merb app. deployed to Websphere 6.1 fails on both AIX and Windows

by Nick Sieger-2 :: Rate this Message:

Reply to Author | View in Thread

On Wed, Aug 6, 2008 at 11:02 PM, Wes Gamble <weyus@...> wrote:
> Mistake:
>
> "This seems to work, sort of.  It appears that dynamic requests are being
> made as expected, but if I directly request a static resource (an image or a
> stylesheet), it is being interpreted as a dynamic request. "

Yes. I do have a Rack handler that will serve the static file, but it
has to go through JRuby to do it, so it's not going to be fast. That
was the point of the filter in the first place, to avoid that
overhead. If you can't afford the extra overhead for static files, you
might have to use a front-end to serve the static content, or steal
Goldspike's FileServlet.

/Nick

>
> Wes Gamble wrote:
>>
>> Nick,
>>
>> Nick Sieger wrote:
>>>
>>> - You can also try the servlet version, which would use config like
>>> this in web.xml. Comment out or remove the filter/filter-mapping bits
>>> and use this instead:
>>>  <servlet>
>>>    <servlet-name>RackServlet</servlet-name>
>>>    <servlet-class>org.jruby.rack.RackServlet</servlet-class>
>>>  </servlet>
>>>  <servlet-mapping>
>>>    <servlet-name>RackServlet</servlet-name>
>>>    <url-pattern>/*</url-pattern>
>>>  </servlet-mapping>
>>>
>>> Cheers,
>>> /Nick
>>>
>>
>> This seems to work, sort of.  It appears that dynamic requests are being
>> made as expected, but if I directly request a static resource (an image or a
>> stylesheet), it is being interpreted as a static request.
>>
>> I notice that in Goldspike configurations, there appears to be a
>> FileServlet servlet whose purpose is to pull static files, and then it
>> forwards on to the RailsServlet (Goldspike, recall).
>>
>> Seems like I have the option of either:
>>
>> a) using a real value in the <servlet-mapping> configuration to force the
>> RackServlet to be used only for dynamic routes of which I'm aware
>>
>> or
>>
>> b) do something like I described above and steal the Goldspike FileServlet
>> and just have it forward to the RackServlet if necessary.
>>
>> Thoughts?
>>
>> Wes
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Merb app. deployed to Websphere 6.1 fails on both AIX and Windows