簡體   English   中英

如何在tomcat服務器中更改我的webapp的URL?

[英]How to change the url of my webapp in tomcat server?

eclipse中的目錄結構是MyProjectName( WebContent( META-INF( MANIFEST.MF ), app( appname( index.html ) ), WEB-INF(web.xml) ) )我可以使用http:// localhost :8080/MyProjectName/app/appname/index.html訪問tomcat7上的項目http:// localhost :8080/MyProjectName/app/appname/index.html我想使用http:// localhost :8080/MyProjectName/

我沒有使用html / js / css以外的任何其他代碼,並且所有代碼僅在Webapps目錄中。

Spring,Tomcat7,Windows7是平台。

如果它是一個歡迎文件,請在web.xml中使用如下

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>/app/appname/index.html</welcome-file>
  </welcome-file-list>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM