首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

在struts2中的转入方式

2012-09-04 
在struts2中的转向方式在浏览器的地址栏中可以看到跳转后的链接地址1,action nametest methodtest

在struts2中的转向方式
在浏览器的地址栏中可以看到跳转后的链接地址
1,
<action name="test" method="test">
<result name="success" type="redirect">
/test/test.htm
</result>
</action>

2,
<head>
<meta http-equiv="refresh" content="0; URL=/test/test.htm"/>
</head>
3,
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
String newLocn = "/test/test.htm";
response.setHeader("Location",newLocn);
%>
上面三种方式都能改变浏览器的地址

热点排行