On Mar 24, 2008, at 6:23 PM, Chris Hostetter wrote:
: Going to /solr/admin/stats.jsp, it was intercepting and
forwarding to
: /admin/stats.jsp which is a 404. _info.jsp can leverage a
default core in a
: multicore configuration and let the old (non-core prefixed) paths
work fine,
: but the forwarding wasn't taking into account /solr being mapped
via web.xml
: rather than a webapps/solr.war application root context.
Hmmm... I see, yeah this makes sense - the crux of the issue being
that it
really doesn't make sense for pathPrefix to work as currently
advertised
-- whatever prefix the filter is mapped to really needs to be the
parent of the "admin" directory in case it has to forward (either
that or
we need a seperate init-param to tell the filter where to forward
requests to)
can you update the docs for SolrDispatchFilter.setPathPrefix and the
comment in the stock web.xml so they better reflect what it's used
for?
-- ie: a virtual root dir for all things in the Solr war if you
repackage
it in a larger webapp.
I've updated the docs. I'm not quite sure what the setter and getter
of pathPrefix are good for though, as the setting comes from the init-
param, and that setter is never called. Seems like we could remove
the setter/getter altogether, unless someone has a case where the
Filter would be manipulated by the API rather than web.xml
configuration.
I didn't describe the scenario accurately above, so for
clarification, the forward is for a case like this:
/solr/coreName/admin/stats.jsp
Where the core _is_ specified (_info.jsp takes care of the case where
it is not specified and not caught by / passed through the filter).
The forwarder sends the request, after putting the specified core
into request scope, to the proper JSP URL, which is /solr/admin/
stats.jsp. The filter, even if configured for <dispatcher>FORWARD</
dispatcher> wouldn't fall into a recursive trap - but it doesn't make
sense for FORWARD to be configured anyway so I noted that.
Your comment about the parent of the admin directory doesn't make
sense to me, sorry. The path-prefix could be "/whatever". /app/
whatever/coreName/admin/stats.jsp would be fit this case and work
just fine, forwarding to /whatever/admin/stats.jsp as expected
(within the app context).
Erik