spring - Tomcat 7 多上下文

标签 spring tomcat spring-mvc

我的应用程序“MyApp”在 tomcat 7 上运行并使用 spring 框架并具有以下访问 URL:

1 - https://localhost:8443/MyApp/      for the Application Web
2 - https://localhost:8443/MyApp/Rest  for the Application web services

我的应用程序设置在路径上:

...\tomcat\webapps\MyApp\

我需要在不更改应用程序文件夹的情况下更改 URL:

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

有什么想法吗?

最佳答案

普尔曼的解决方案:

复制tomcat中的ROOT文件夹,重命名为Admin,然后修改index.jsp,在代码中加入这一行:

response.sendRedirect("https://localhost:8443/MyApp/");

关于spring - Tomcat 7 多上下文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23864917/

相关文章:

java - Spring 4 异常处理 : No suitable resolver for argument

java - Spring 5.0.0 MockMvc : Unsupported media type, 即使设置了正确的 MediaType

Spring Web应用程序在启动时从数据库初始化

Java - 如何将应急措施构建到调用 Web 服务的服务层中

java - 从 Spring-security-3 更新到 Spring-security-4 导致 XML 错误

jakarta-ee - Google Chrome 不遵守 web.xml session 超时?

spring-mvc - Spring/MVC Thymeleaf th :selected not working

spring - 如何在 spring mvc 表单中验证多个模型?

java - grails 应用程序中的 "Too many open files"- 如何正确关闭打开的文件和流?

java - Tomcat 未处理 jSTL ${}