我把這個項目在idea里clean and install之后war文件放到了tomcat安裝目錄的webapps目錄下,啟動tomcat,隨便看一個網頁就是The requested resource is not available。只有tomcat的主頁是能看的。我需要項目在tomcat 7.0.56里正常運行。
jetty配置如下:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.25</version>
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8888</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<contextPath>/ABC</contextPath>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</plugin>
2 回答

喵喵時光機
TA貢獻1846條經驗 獲得超7個贊
謝謝,問題已解決。正確的網址是:http://localhost:8888/項目名-1.0/test.html。
war文件的文件名是項目名-1.0.war,我原來忘記了在網址里加-1.0,就不能用了。
添加回答
舉報
0/150
提交
取消