6
Netbeansでビルドされ実行されているサーブレットをjettyサーバー上で実行しようとしています。 ローカルでのデプロイメントは常に機能しますが、Jettyにデプロイすると、実際にサーブレットを実行するのではなく、ディレクトリのリストが生成されます。Jettyサーブレットが実行されない - 代わりにディレクトリリストを取得する
問題はコンテキスト設定のようですが、私は何が間違っているのか分かりません。
ここがwarファイルにweb.xmlのXMLです:桟橋側で
<?xml version="1.0" encoding="UTF-8"?>
<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">
<servlet>
<description>Raw Query</description>
<servlet-name>query</servlet-name>
<servlet-class>core.SQL</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>query</servlet-name>
<url-pattern>/query</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
、私はコンテックスマッピング設定でこの方法を展開しています:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/query</Set>
<Set name="war">
<SystemProperty name="jetty.home" default="."/>/webapps/Link/I5Link.war
</Set>
</Configure>
すべてのヘルプ大いに飾られた。
ありがとうございました!私はJavaのサーブレット面では非常に新しく、これが私にナットをもたらしていました。私は理解し始めていると思う。再度、感謝します。 –
あなた自身が理解してうれしいです;) – ATorras