[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-user] SMILA vs Human Computing

Hi,

 

hard to say without a closer look.

By default, the SMILA search webapp can only display images from configuration/org.eclipse.smila.search.servlet/webapp, e.g. the

 

  <img src="" alt="www.eclipse.org"/>

 

will show the image from images/Smila folder in this webapp. If you write your images to somewhere in the webapp, too, they should be

displayable. If that’s not possible, you can extend the Jetty configuration to add another directory to be served, for example like this:

    <!-- =========================================================== -->

    <!-- Set handler Collection Structure                            -->

    <!-- =========================================================== -->

    <Set name="handler">

      <New class="org.eclipse.jetty.server.handler.HandlerList">

        <Set name="handlers">

          <Array type="org.eclipse.jetty.server.Handler">

            <Item>

              <New class="org.eclipse.jetty.webapp.WebAppContext">

                <Set name="contextPath">/SMILA</Set>

                <Set name="resourceBase"><SystemProperty name="org.eclipse.smila.utils.config.root" default="configuration"/>/org.eclipse.smila.search.servlet/webapp</Set>

                <Set name="descriptor"><SystemProperty name="org.eclipse.smila.utils.config.root" default="configuration"/>/org.eclipse.smila.search.servlet/webapp/WEB-INF/web.xml</Set>

                <Set name="defaultsDescriptor"><SystemProperty name="org.eclipse.smila.utils.config.root" default="configuration"/>/org.eclipse.smila.http.server/webdefault.xml</Set>

                <Set name="parentLoaderPriority">true</Set>

              </New>

            </Item>

            <Item>

              <New class="org.eclipse.jetty.server.handler.ContextHandler">

                <Set name="contextPath">/Images</Set>

                <Set name="handler">

                  <New class="org.eclipse.jetty.server.handler.ResourceHandler">

                    <Set name="directoriesListed">true</Set>

                    <Set name="resourceBase">/home/smila/Images</Set>

                  </New>

                </Set>

              </New>

            </Item>

            <Item>

              <New class="org.eclipse.jetty.server.handler.DefaultHandler"/>

            </Item>

          </Array>

        </Set>

      </New>

    </Set>

 

Then an image /home/smila/Images/logo.jpg should be viewable as http://localhost:8080/Images/logo.jpg

 

Cheers,

Jürgen.