|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
jruby-rack issues and doubtsHi, I'm trying to configure a jruby on rails app on tomcat and jruby-rack and I found an issue that I don't understand.
The problem is that I have two more filters defined into my web.xml and I want that RackFilter will be executed the second one, so, the order I've declared them and their mappings in the file is this: - MyFilter1 - RackFilter - MyFilter2 But, when I start tomcat, the order that it executes filters' chain is this: - RackFilter - MyFilter2 - MyFilter1 No matters where I'll declare RackFilter and it's mapping but it's always executed first. By the way, I've read this in the jruby-rack wiki: The application can also be configured to dispatch through a servlet instead of a filter if it suits your environment better. But I can't find any example of how to do it so because the DefaultServletDispatcher needs a ServletRackContext to be initilized and I can't define it in the web.xml Any help will be really appreciated. Cheers -- David Calavera http://www.thinkincode.net |
|
|
Re: jruby-rack issues and doubtsOn Wed, Jun 24, 2009 at 8:28 AM, David Calavera <david.calavera@...> wrote:
Hi, I'm trying to configure a jruby on rails app on tomcat and jruby-rack and I found an issue that I don't understand. That's odd. Can you share how you define the filters in web.xml?
Sure, there's a servlet org.jruby.rack.RackServlet, just go ahead and use it instead of RackFilter in web.xml like you would any servlet with <servlet> and <servlet-mapping> elements. By the way, thanks for working on Tomcat-Rails -- looking forward to trying it out. /Nick |
|
|
Re: jruby-rack issues and doubtsThank you Nick,
it works fine with the RackServlet, I hadn't seen it. But the behavior with the filter is actually annoying. I'm using two different versions of tomcat, 6.0.18 standalone and 6.0.20 embedded and the behavior is the same. These are my filter defs, the last one there is just to test the order: <filter> On Wed, Jun 24, 2009 at 5:32 PM, Nick Sieger <nicksieger@...> wrote:
-- David Calavera http://www.thinkincode.net |
|
|
Re: jruby-rack issues and doubtsOn Wed, Jun 24, 2009 at 10:58 AM, David Calavera <david.calavera@...> wrote:
Thank you Nick, Was that the actual order of elements in web.xml? The only suggestion I have is to order them like ( filter* filter-mapping* servlet* servlet-mapping* ). I've seen that some containers are sensitive to the order in which the elements appear. /Nick |
|
|
Re: jruby-rack issues and doubts2009/6/24 Nick Sieger <nicksieger@...>:
> On Wed, Jun 24, 2009 at 10:58 AM, David Calavera <david.calavera@...> > wrote: >> >> Thank you Nick, >> >> it works fine with the RackServlet, I hadn't seen it. >> >> But the behavior with the filter is actually annoying. I'm using two >> different versions of tomcat, 6.0.18 standalone and 6.0.20 embedded and the >> behavior is the same. These are my filter defs, the last one there is just >> to test the order: > > > <snip> > > Was that the actual order of elements in web.xml? The only suggestion I have > is to order them like ( filter* filter-mapping* servlet* servlet-mapping* ). > I've seen that some containers are sensitive to the order in which the > elements appear. > > /Nick > > +1 make sure that your web.xml is valid as per the servlet spec schema / DTD. I've been bitten by that in the past. Cheers, James --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |