アプリケーションにこの web.xml があります。
<web-app>
<filter>
<filter-name>app</filter-name>
<filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>openSessionInView</filter-name>
<url-pattern>/app/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>app</filter-name>
<url-pattern>/app/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>app</filter-name>
<url-pattern>/assets/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>jersey-serlvet</servlet-name>
<servlet-class>
com.sun.jersey.spi.spring.container.servlet.SpringServlet
</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.package.example.restServer</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jersey-serlvet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
桟橋でアプリケーションを使用すると正常に動作します。
ウェブアプリケーション:
http://localhost/app
API レスト アプリケーション:
http://localhost/rest
生産ではTomcatを使用しています。
I want to create http://www.example.com -> http://localhost/app
and http://rest.example.com -> http://localhost/rest
私のserver.xmlファイル:
<Host name="www.example.com" appBase="/usr/local/tomcat/webapps/example">
<Context path="app" docBase="."/>
</Host>
<Host name="rest.example.com" appBase="/usr/local/tomcat/webapps/example">
<Context path="rest" docBase="."/>
</Host>
この構成を使用すると、サーバーは 404 エラー コードを返します。
どうすれば修正できますか?
ありがとう。