Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前假设 xyz.com 执行 webapp ROOT。如何配置我的 tomcat;因此默认情况下 xyz.com 将我带到 xyz.com/abc [abc 是 ROOT 内的目录]
如果你设置了 JSTL,你可以从 ROOT/index.jsp 重定向:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:redirect url='abc' />
或者使用 ROOT/index.jsp 中的 scriptlet:
<% response.sendRedirect("http://xyz.com/abc"); %>