On 7/7/2015 10:03 AM, Steven White wrote:
> This may be a question to be posted on Jetty mailing list, but I figured I
> should start here first.
> 
> Using Solr 5.2.0, when I start Solr, http://localhost:8983/solr/ is the
> entry point.  My question is:
> 
> 1) Where is "solr" on the file system?
> 2) How can I add http://localhost:8983/MyHandler/ to Jetty?
> 
> For #2, I'm exploring the possibility of using the existing Web Server to
> see if I can have an additional application running on the same host as
> Solr.

1) The answer to this question is not simple.  Solr is a Java servlet,
written using the servlet API.  The jetty home is the "server"
directory, and most everything else is relative to that location.

Solr comes in the download as the webapps/solr.war file (relative to
that server directory) ... which, like a jar file, is a zip archive.
The contexts/solr-jetty-context.xml file tells Jetty how to find that
war file, where to extract it, and what URL path (normally /solr) will
be used to access that application.

The .war archive normally gets extracted to solr-webapp/webapp, and that
is where Jetty finds all the bits that become Solr.  Solr has a "home"
directory, which defaults to ./solr (also relative to that server
directory), where the solr.xml file tells Solr how to locate everything
else.  The solr home can be overridden with commandline options.

Your question number 2 is indeed more properly addressed on the Jetty
list.  If what I've written below is not enough, ask further questions
there.

2) You need to write (or find) a servlet and install its .war file into
Jetty with a context fragment as we have done with Solr.  A servlet
container like Jetty is more complicated than a typical webserver like
Apache httpd.  It runs Java servlet applications, rather than simply
serving html files and other similar resources out of a document root.

A servlet can (and usually does) have static resources like html and
image files.  Solr's admin interface is mostly static html, css, images,
and javascript that runs in the user's browser and pulls dynamic info
from system handlers within Solr.

Thanks,
Shawn

Reply via email to