在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Java  C  Linux  網(wǎng)絡(luò)安全/ maven ssm項目用jetty插件運行正常,war放到tomcat就reso

maven ssm項目用jetty插件運行正常,war放到tomcat就resource is not available?

我把這個項目在idea里clean and install之后war文件放到了tomcat安裝目錄的webapps目錄下,啟動tomcat,隨便看一個網(wǎng)頁就是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>
    
回答
編輯回答
墨小白

1:看看tomcat日志,是不是項目啟動報錯了。
2:訪問的時候,是否沒有加應(yīng)用上下文,比如war為app.war,應(yīng)用上下文為app, 比如訪問index.html頁面,則訪問地址為ip:8080/app/index.html

2018年5月18日 11:15
編輯回答
短嘆

謝謝,問題已解決。正確的網(wǎng)址是:http://localhost:8888/項目名-1.0/test.html。
war文件的文件名是項目名-1.0.war,我原來忘記了在網(wǎng)址里加-1.0,就不能用了。

2017年5月29日 17:51