Note that there are some explanatory texts on larger screens.

plurals
  1. POJetty Servlet does not run -- getting directory listing instead
    primarykey
    data
    text
    <p>I'm trying to get a servlet built and running in Netbeans to run on a jetty server. Deploying locally always works, however deploying on Jetty results in a directory listing rather than the servlet actually running.</p> <p>The problem seems to be with the context configuration, but I have no idea what I'm doing wrong.</p> <p>Here is the XML for web.xml in the war file:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt; &lt;servlet&gt; &lt;description&gt;Raw Query&lt;/description&gt; &lt;servlet-name&gt;query&lt;/servlet-name&gt; &lt;servlet-class&gt;core.SQL&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;query&lt;/servlet-name&gt; &lt;url-pattern&gt;/query&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;session-config&gt; &lt;session-timeout&gt; 30 &lt;/session-timeout&gt; &lt;/session-config&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;/web-app&gt; </code></pre> <p>On the Jetty side, I'm deploying with a contex mapping setup this way:</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"&gt; &lt;Configure class="org.mortbay.jetty.webapp.WebAppContext"&gt; &lt;Set name="contextPath"&gt;/query&lt;/Set&gt; &lt;Set name="war"&gt; &lt;SystemProperty name="jetty.home" default="."/&gt;/webapps/Link/I5Link.war &lt;/Set&gt; &lt;/Configure&gt; </code></pre> <p>Any help greatly appricated.</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.
 

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