Tomcat 7 multiple contexts

2019-09-09 03:54发布

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\

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

Any Idea?

2条回答
The star\"
2楼-- · 2019-09-09 04:42

i change the URLs that i need:

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
查看更多
我命由我不由天
3楼-- · 2019-09-09 04:56

Poorman's solution:

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/");
查看更多
登录 后发表回答