在dao中查询出来的实体 return this.dao.getListByHQL("from 类名"); 在controller中要得到这个list, List<类名> 类名首字母小写= platformOrgService.findAllOrg(); request.setAttribute("类名首字母小写", 类...
分类:
编程语言 时间:
2015-05-14 12:27:02
阅读次数:
135
1.在后台存入session:DoradoContext context = DoradoContext.getCurrent();context.setAttribute(DoradoContext.SESSION,"key", value);2.在后台取出sessionString code =...
分类:
其他好文 时间:
2015-05-14 00:50:20
阅读次数:
183
js.php <?php ?echo ‘ ?<script type="text/javascript"> ???function addScript(){ ???var script = document.createElement("script"); ???script.setAttribute("type","text/javascript"); ???s...
分类:
Web程序 时间:
2015-05-12 00:15:40
阅读次数:
129
setAttribute(String name,Object):设置名字为 name 的 request 的参数值
getAttribute(String name):返回由 name 指定的属性值
getAttributeNames():返回 request 对象所有属性的名字集合,结果是一个枚举的实例
getCookies():返回客户端的所有 Cookie 对象,结果是一个 Cooki...
分类:
其他好文 时间:
2015-05-04 18:03:24
阅读次数:
170
getParameter得到的都是String类型的。或者是用于读取提交的表单中的值(http://a.jsp?id=123中的123),或者是某个表单提交过去的数据; getAttribute则可以是对象Object,需进行转换,可用setAttribute设置成任意对象,使用很灵活,可随时用; ...
分类:
其他好文 时间:
2015-05-04 17:11:53
阅读次数:
102
JSTL标签获取Session:
session.setAttribute("age","123");
${ sessionScope.age} 在页面上显示的就是123了
sessionScope指的是session的范围,类似还有requestScope,pageScope,contextScope
然后后面的age表示的是set属性时的key值
Jsp中获取Session:
s...
分类:
Web程序 时间:
2015-05-04 01:18:37
阅读次数:
169
今天有朋友问这个问题,在这里总结下:
1.getAttribute是取得jsp中 用setAttribute設定的attribute
2.parameter得到的是string;attribute得到的是object
3.request.getParameter()方法传递的数据,会从Web客户端传到Web服务器端,代表HTTP请求数据;request.setAttribute()...
分类:
其他好文 时间:
2015-04-29 11:37:31
阅读次数:
128
dom 是一个 input type="text"使用: dom.setAttribute("value","2011"),只能通过 dom.getAttribute("value") 得到 2011使用: dom.value = 2012,只能通过 dom.value 得到 2012也就是说: g...
分类:
其他好文 时间:
2015-04-27 12:36:03
阅读次数:
184
一个简单的网站计数器方法:
----------------------------------------------------------------
<body>
<%Integercount=(Integer)application.getAttribute("count");
if(count==null){
count=1;
}else{
count++;
}
application.setAttribute("count",count);
%>..
分类:
Web程序 时间:
2015-04-27 00:40:31
阅读次数:
158
getAttribute() 获取自定义属性 它只有一个参数——你打算查询的属性的名字 不能通过document对象调用,我们只能通过一个元素节点对象调用它setAttribute() 设置自定义属性 它允许我们对属性节点的值做出修改 只能通过元素节点对象调用的函数obiect.setAttri.....
分类:
其他好文 时间:
2015-04-22 13:06:32
阅读次数:
80