从request.getParameter()获取Null值 [英] Getting Null value from request.getParameter()

查看:777
本文介绍了从request.getParameter()获取Null值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,借助加入,我在jsp页面中显示了这样的动态值:

In my application,with the help of joining,I am showing the dynamic value in my jsp page like this :

<%  while(rs.next()){ %>
<td><input type="checkbox" name="chkName" onclick="selectall()"></td> 
<td><input type="text"  name="empId" value="<%= rs.getString(1)%> "   disabled="disabled"  maxlength="10"></td>
<td><input type="text" name="device" value="<%= rs.getString(2)%>"   disabled="disabled" maxlength="10"></td>
<td><input type="text"  name="features" value="<%= rs.getString(3)%>"  disabled="disabled" maxlength="60"></td>
<td><input type="password" name="password" disabled="disabled"></td>
<td><input type="text"  name="policyName" value="<%= rs.getString(4)%>"  disabled="disabled" maxlength="10"></td>
</tr>
<% } 
%>

每当从另一个servlet(我想显示从这个jsp到另一个jsp的获取)时,我就调用request.getParameter("empId"),它正在获取"NULL"值.我想,我必须使用set(request.setParameter()).

And whenever from another servlet(as I want to show the fetching from this jsp to another jsp ) I am calling request.getParameter("empId"),it is fetching the "NULL" value.I think,I have to use set(session.setAttribute() or request.setParameter()).

任何建议将不胜感激.

推荐答案

可能是由于禁用了属性..也许您可以将其替换为readonly吗?

Might be because of the disabled attribute .. maybe you can replace it with readonly instead?

这篇关于从request.getParameter()获取Null值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆