Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>put your static contents under any folder below <code>/yourStaticApp/src/main/webapp</code> -- say under <code>/yourStaticApp/src/main/webapp/static</code>. When you will run Jetty these will be available as <code>http://host:port/contextRoot/static/fileName.ext</code></p> <hr> <p>Hmmm, unsure, if that's possible. Eclipse Jetty Maven plugin documents a way to configure static source location, which boils down to the alternate location of <code>webapps</code> mentioned above.</p> <pre><code> ... &lt;plugin&gt; ... &lt;configuration&gt; &lt;webAppSourceDirectory&gt;${basedir}/src/staticfiles&lt;/webAppSourceDirectory&gt; ... &lt;/configuration&gt; ... &lt;/plugin&gt; ... </code></pre> <p>As the doc points out: </p> <blockquote> <p><strong>&lt;webAppSourceDirectory&gt;</strong>–By default, this is set to ${basedir}/src/main/webapp. If your static sources are in a different location, set this parameter accordingly. </p> </blockquote> <p>refer: <a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin" rel="nofollow">http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin</a></p> <hr> <p><strong>Update:</strong> On some more reseach I found out that you can actually point the location of <code>webdefault.xml</code> from in Jetty-maven plugin; and in webdefault.xml you can configure the <em>static content</em> location. </p> <p>In your Jetty Maven configuration, point the location of wendefault.xml</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt; &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt; &lt;configuration&gt; ... &lt;defaultsDescriptor&gt;/my/path/to/webdefault.xml&lt;/defaultsDescriptor&gt; ... &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>Now, with <code>webdefault.xml</code> in your hand you can put the configuration mentioned here: <a href="http://docs.codehaus.org/display/JETTY/Static+Content" rel="nofollow">http://docs.codehaus.org/display/JETTY/Static+Content</a> -- except the package Names has been changed from <code>org.mortbay.jetty...</code> to <code>org.eclipse.jetty...</code> see below:</p> <pre><code>&lt;Configure class="org.eclipse.jetty.servlet.Context"&gt; &lt;Set name="contextPath"&gt;/javadoc&lt;/Set&gt; &lt;Set name="resourceBase"&gt;&lt;SystemProperty name="jetty.home" default="."/&gt;/javadoc/&lt;/Set&gt; &lt;Call name="addServlet"&gt; &lt;Arg&gt;org.eclipse.jetty.servlet.DefaultServlet&lt;/Arg&gt; &lt;Arg&gt;/&lt;/Arg&gt; &lt;/Call&gt; &lt;/Configure&gt; </code></pre> <p>refer: <a href="http://wiki.eclipse.org/Jetty/Reference/webdefault.xml" rel="nofollow">http://wiki.eclipse.org/Jetty/Reference/webdefault.xml</a></p> <p>I haven't tested/used the above. But let me know, if you get this working. Or if anything else needed to get this done.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload