You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jérôme Etévé <je...@gmail.com> on 2008/12/17 18:07:14 UTC

Precisions on solr.xml about cross context forwarding.

Hi all,

 In solr.xml ( /lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml
),it's written that

 "It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
      configured to also filter on forwards.  Do not configure
      this dispatcher as <dispatcher>FORWARD</dispatcher>."

The problem is that if filters do not have this FORWARD thing, then
cross context forwarding doesn't work.

Is there a workaround to this problem ?

Jerome.

-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

jerome@eteve.net

Re: Precisions on solr.xml about cross context forwarding.

Posted by Jérôme Etévé <je...@gmail.com>.
I was thinking, maybe we should write a patch to fix this issue.

For instance by making a dispatch servlet (with a "core" parameter or
request attribute) that would act the same way as the filter but
provide a cross context addressable entry point.

What do you think ?

Jerome

On Wed, Dec 17, 2008 at 6:24 PM, Jérôme Etévé <je...@gmail.com> wrote:
> Maybe there's an 'internal query' concept in j2ee that could be a workaround ?
> I'm not really a j2ee expert ..
>
> Jerome.
>
> On Wed, Dec 17, 2008 at 5:09 PM, Smiley, David W. <ds...@mitre.org> wrote:
>> This bothers me too.  I find it really strange that Solr's entry-point is a
>> servlet filter instead of a servlet.
>>
>> ~ David
>>
>>
>> On 12/17/08 12:07 PM, "Jérôme Etévé" <je...@gmail.com> wrote:
>>
>> Hi all,
>>
>>  In solr.xml ( /lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml
>> ),it's written that
>>
>>  "It is unnecessary, and potentially problematic, to have the
>> SolrDispatchFilter
>>       configured to also filter on forwards.  Do not configure
>>       this dispatcher as <dispatcher>FORWARD</dispatcher>."
>>
>> The problem is that if filters do not have this FORWARD thing, then
>> cross context forwarding doesn't work.
>>
>> Is there a workaround to this problem ?
>>
>> Jerome.
>>
>> --
>> Jerome Eteve.
>>
>> Chat with me live at http://www.eteve.net
>>
>> jerome@eteve.net
>>
>>
>
>
>
> --
> Jerome Eteve.
>
> Chat with me live at http://www.eteve.net
>
> jerome@eteve.net
>



-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

jerome@eteve.net

Re: Precisions on solr.xml about cross context forwarding.

Posted by Jérôme Etévé <je...@gmail.com>.
Maybe there's an 'internal query' concept in j2ee that could be a workaround ?
I'm not really a j2ee expert ..

Jerome.

On Wed, Dec 17, 2008 at 5:09 PM, Smiley, David W. <ds...@mitre.org> wrote:
> This bothers me too.  I find it really strange that Solr's entry-point is a
> servlet filter instead of a servlet.
>
> ~ David
>
>
> On 12/17/08 12:07 PM, "Jérôme Etévé" <je...@gmail.com> wrote:
>
> Hi all,
>
>  In solr.xml ( /lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml
> ),it's written that
>
>  "It is unnecessary, and potentially problematic, to have the
> SolrDispatchFilter
>       configured to also filter on forwards.  Do not configure
>       this dispatcher as <dispatcher>FORWARD</dispatcher>."
>
> The problem is that if filters do not have this FORWARD thing, then
> cross context forwarding doesn't work.
>
> Is there a workaround to this problem ?
>
> Jerome.
>
> --
> Jerome Eteve.
>
> Chat with me live at http://www.eteve.net
>
> jerome@eteve.net
>
>



-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

jerome@eteve.net

Re: Precisions on solr.xml about cross context forwarding.

Posted by Chris Hostetter <ho...@fucit.org>.
: This bothers me too.  I find it really strange that Solr's entry-point 
: is a servlet filter instead of a servlet.

it traces back to the need for it to decide when to handle a request and 
when to let it pass through (to a later filter, a servlet or a JSP)

this is the only way legacy support for the /select and /update urls work 
without forcing people to modify the web.xml; it's how a handler can be 
registered with the name /admin/foo even though /admin/ resolves to a JSP 
(and without forcing people to modify the web.xml); and it's what allows 
us to use the same core path prefixes for both handler requests and the 
Admin JSPs.

:  "It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
:       configured to also filter on forwards.  Do not configure
:       this dispatcher as <dispatcher>FORWARD</dispatcher>."
: 
: The problem is that if filters do not have this FORWARD thing, then
: cross context forwarding doesn't work.
: 
: Is there a workaround to this problem ?

You can try adding the FORWARD option, but the risk is that 
SolrRequestFilter could wind up forwarding to itself infinitely on some 
requests (depending on your configuration)...

http://www.nabble.com/Re%3A-svn-commit%3A-r640449----lucene-solr-trunk-src-webapp-src-org-apache-solr-servlet-SolrDispatchFilter.java-p16262766.html



-Hoss


Re: Precisions on solr.xml about cross context forwarding.

Posted by "Smiley, David W." <ds...@mitre.org>.
This bothers me too.  I find it really strange that Solr's entry-point is a servlet filter instead of a servlet.

~ David


On 12/17/08 12:07 PM, "Jérôme Etévé" <je...@gmail.com> wrote:

Hi all,

 In solr.xml ( /lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml
),it's written that

 "It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
      configured to also filter on forwards.  Do not configure
      this dispatcher as <dispatcher>FORWARD</dispatcher>."

The problem is that if filters do not have this FORWARD thing, then
cross context forwarding doesn't work.

Is there a workaround to this problem ?

Jerome.

--
Jerome Eteve.

Chat with me live at http://www.eteve.net

jerome@eteve.net