此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【warword0】截止到2008-07-06 00:12:25的历史汇总数据(不包括此帖):
发帖的总数量:20 发帖的总分数:311
结贴的总数量:20 结贴的总分数:311
无满意结贴数:3 无满意结贴分:70
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:100.00%
无满意结贴率:15.00 % 无满意结分率:22.51 %
敬礼!
楼主【warword0】截止到2008-07-06 00:12:25的历史汇总数据(不包括此帖):
发帖的总数量:20 发帖的总分数:311
结贴的总数量:20 结贴的总分数:311
无满意结贴数:3 无满意结贴分:70
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:100.00%
无满意结贴率:15.00 % 无满意结分率:22.51 %
敬礼!
解决方案 »
- 请问如何在myeclipse中自动生成spring的接口类和实现类?
- 监听器中 取得application的某个值 抛异常求解
- 帮忙看看异常
- Excel 导出 设置响应头出错!
- jsp实现在线阅读pdf文件
- CVS/VSS/PVCS等配置管理软件是指什么啊?
- 如何在websphere下发布CMP
- 新手提问,求帮助
- 问一个最基本的问题:Axis里的那几个包(大约是9个吧),到底需要放在哪里?
- java通过jdbc访问数据库流行采用何种数据库驱动程序?jdbc-odbc , InterClient , 还是“网络协议/全java驱动程序”?如有可能,请给简明
- MyEclipse中如何加断点调试程序?
- 用hibernate遇到一个自动更新的问题。
另外,你的Eclipse里设置的JDK是1.4的还是1.5的?
void setAttribute(java.lang.String name,java.lang.Object o)
Stores an attribute in this request. Attributes are reset between requests. This method is most often used in conjunction with RequestDispatcher.
Attribute names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.
If the object passed in is null, the effect is the same as calling removeAttribute(java.lang.String).
It is warned that when the request is dispatched from the servlet resides in a different web application by RequestDispatcher, the object set by this method may not be correctly retrieved in the caller servlet.
Parameters:
name - a String specifying the name of the attribute
o - the Object to be stored
跟代码的级别有关系。
大不了自己封装一下,把数据放到相应的包装器里,也不麻烦。
1.5以后提供自动装箱。会把int转为Integer,所以不会出错。1 .4会有问题。
后面的参数是Object类型 如果JDK是1。4的话你写int类型会报错
如果JDK1。5以上会自动封装成Integer将没问题
request.setAttribute("n", new Double(123.45));
eclipse不知道怎么设置,自己找找吧
Integer num=12132.56;
request.setAttribute("n",num);
如果是在jsp中写的没有问题,jsp中内置了request
如果在servlet中,看参数是否是request.
顺便问一下:
就是request.setAttribute("ID", new Long(number));
到后来要取出这个ID时,怎么将这个“ID”转回Long?