struts框架从.jsp页面直接访问action

<%@ page language="java" pageEncoding="UTF-8"%><%
String path = request.getContextPath();
%>
<html>
<head>
<title></title>
<meta http-equiv="refresh" content="0;url=<%=path%>/action.do">
</head>
<body>
</body>
</html>

或者用JS跳转:
<%@ page language="java" pageEncoding="UTF-8"%><%
String path = request.getContextPath();
%>
<html>
<head>
<title></title>
</head>
<body>
<script>
document.location = '<%=path%>/action.do';
</script>
</body>
</html>
原文地址:https://www.cnblogs.com/owenma/p/3483174.html