Struts2——debug标签
来源:互联网 发布:笔记本电脑怎么编程 编辑:程序博客网 时间:2024/06/11 14:13
http://my.oschina.net/jgy/blog/50802
debug标签主要用于辅助测试,它在页面上生成一个超链接,通过该链接可以查看ValueStack和Stack Context 中的所有值信息。使用debug标签只有一个id属性,这个属性仅仅是该元素一个引用id。 在页面上增加<s:debug/>标签,通过debug标签,可以看的系统中ValueStack离得全部信息,并可以看到Stack Context中的属性。
result.jsp
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'result.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
username:<s:property value="username"/><br>
password:<s:property value="password"/><br>
<s:debug></s:debug>
</body>
</html>
我们可以看到.它提供的是Struts ValueStack Debug ..也就是说,都是struts2的值栈(就是各个值的信息)..
这个值栈又分为两种.Value Stack Contents 和 Stack Context .
(1).Value Stack Contents 里面的信息我们可以用 <s:property value="sss"> 这样来直接访问.
(2) Stack Context 里面的信息我们可以 <s:property value="#sss">这样来访问
- Struts2——debug标签
- Struts2——debug标签
- struts2--<s:debug>标签
- struts2--<s:debug>标签
- struts2--<s:debug>标签
- struts2--<s:debug>标签
- struts2中的标签<s:debug></s:debug>
- struts2 debug标签有bug??
- Struts2标签—Iterator标签
- struts2的debug标签和getXxx方法
- struts2常用标签之property&debug
- Struts2项目<s:debug>标签的问题
- Struts2项目<s:debug>标签的问题
- struts2标签库——UI标签
- struts2 debug include param push标签(数据标签)
- Struts2标签里的debug标签的作用
- struts2——常用标签!!!
- struts2——optiontransferselect标签!!!
- IOS简化设置器和访问器
- Eclipse安装marketplace
- css技巧总结(未完待续)
- 从员工到总监,你要明白的8个道理
- 精确监听ListView滑动到底部
- Struts2——debug标签
- ubuntu中chrome开启java插件
- 集体智慧编程学习之非负矩阵因式分解
- HDU 2012
- IDC:2012年第三季度中国X86服务器市场回暖
- MSVC 2012动态编译及静态编译 QT 5.0.2
- 转】struts2的s:iterator 标签 详解
- 【总结】css常见两列布局方案
- WCF WebGet WebInvoke WCF Jquery 调用