Tomcat 7 多上下文 [英] Tomcat 7 multiple contexts
本文介绍了Tomcat 7 多上下文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有我的应用程序MyApp",它在 tomcat 7 上运行并使用 spring 框架并具有以下访问 URL:
I Have My Application "MyApp" that runs on tomcat 7 and use spring framework and have the following access URLs:
1 - https://localhost:8443/MyApp/ for the Application Web
2 - https://localhost:8443/MyApp/Rest for the Application web services
我的应用程序设置在路径上:
And my application is sets on the path:
...\tomcat\webapps\MyApp\
我需要在不更改应用程序文件夹的情况下更改 URL:
I need to change the URLs to be without changing the application folder:
1 - https://localhost:8443/MyApp/Admin for the Application Web(need to change MyApp to be Admin)
2 - https://localhost:8443/MyApp/Rest for the Application web services
有什么想法吗?
推荐答案
Poorman 的解决方案:
Poorman's solution:
复制tomcat中的ROOT文件夹并重命名为Admin
,然后修改index.jsp
,在代码中加入这一行:
copy ROOT folder in tomcat and rename it to Admin
, then change index.jsp
, add this line to code:
response.sendRedirect("https://localhost:8443/MyApp/");
这篇关于Tomcat 7 多上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文