struts迭代器取不到对象值怎么弄

做了个读取用户功能 只能读取到多少名用户 读不到用户名和密码

图片说明

jsp

图片说明


图片说明

action dao

图片说明

图片说明

图片说明

图片说明

struts

图片说明

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
struts ActionForm的值取不到请求的值
各位好,rn我在写struts程序中遇到这样一个问题rnrn程序大概是这样子的rn我写了一个用户注册程序,当用户写完资料提交后,由ActionServlet来执行,而相应的用户资料应该保存在ActionForm中,可是我通过验证ActionForm中却没有保留任何值.rnrn请各位多多帮忙
struts 2 VO取不到值
现在做一个项目用Struts2 hibernate spring rn开发遇到一个问题 前台Jsp页面都使用的Struts2 标签 标签里用VO传值如rnrn问题是 表单提交以后action里获得不了VO的值 得到的nullrn有没有谁遇到过这样的情况帮忙解决一下 谢谢n[b]问题补充:[/b]n1、action中包含了userVo的getter和setter rn2、UserVo中包含全部属性的构造方法还有相应的get set 方法n[b]问题补充:[/b]n开始做时是好用的 这几天突然整个项目的VO都不起作用了 添加和修改都失去作用 VO都是null 检查了配置文件也没有多余的配置项 最近也没添加多余的配置n[b]问题补充:[/b]n这是 取几个简单的属性的jsp页面rnrnrn rn rn 供应商姓名:rn rn rn 到货日期:rn rn rn rn 报检日期:rn rn 报检人:rn rn rn rn 物料代码:rn rn rn 物料名称:rn rn rn rn 单位:rn rn rn 数量:rn rn rn rn// 提交到js做判断再提交rnrnrnrnrnrn这是action rnrnpublic class CheckListAction extends ActionSuppert rn private CheckListService checkListService;//相应的get set rn private CheckListVO checVO;//相应的get set rnrn //增加检验单rn public String addCheckList()rn 调用service层的 save方法rn this.checkListService.addCheckList(checVO); return "addCheckList";rn rnrnrnrnrnrnn[b]问题补充:[/b]n用debug 调试VO是null
struts中的select值取不到,求助。
我在页面中设置了由数据库取出的select框,代码如下:rn rn rn rn rn rn rn页面中倒是能够正常显示,可是再要取value的值却取不到,请问谁知道是什么原因么? rn以下是action代码:我设置了一个IF来检查是否取道ID,结果,老是FAIL..rnid=updateForm.getTid();rnkind=updateForm.getKind();rnfield=updateForm.getField();rnSql_data sqldata=new Sql_data();rnif(id.equals("4"))rn String sql,sql1_1,sql1_2;rn sql1_1="update trade set "+kind+"='"+field+"'";rn sql1_2="WHERE tradeid ="+id+"";rn sql=sql1_1+sql1_2;rn sqldata.executeUpdate(sql);rnreturn mapping.findForward("success");rn rnreturn mapping.findForward("failure");
Struts Action中取不到form的值
在Action中,想去的画面中的值,rn但都取不到。。rn但form.setXX。都是有效的。。rn在form对应的get,set方法都写了。。rn不知道是为什么。。。
struts Action中取不到select的值
[code=Java] rnrn rn rn rn rn rn rn[/code] rnInfoList是放到session时的一个名字。rnINFO是中,定义了id和name的get,set方法。。rn在Action中写代码时,想得到onchange时的select值。。也就是form.getId();rn可是就是取不到。。rnForm中的get,set方法都写好了。。rnselect中的值设置也是正常表示了。。rn就是在select的时候。。rnjs中写的rn[code=Java]rnfunction set()rn var indexvalue;rn indexvalue= document.actionForm.id.value;rn alert(indexvalue);rnrn[/code]rnalert出来为未定义。。不知道哪里写的不对。。
struts取不到资源文件~~~
在index.jsp中用rn在src下的org包里定义了ApplicationResourses.properties资源文件rn在web.xml下也有 rn但是仍旧报错,说取不到资源,rnjavax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGErn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)rn org.apache.jsp.index_jsp._jspService(index_jsp.java:66)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:856)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:856)rnrnrn为什么呢??还要什么配置嘛??
json_decode 转成对象后取不到值
前端将 对象 formItem: JSON.stringify(this.formItem)  格式化   PHP  要用  json_decode(input('formItem'), true) ; 转化回来才能取到值 注意点:true     ,  json_decode(input('formItem'))   是取不到值的 ...
JQUERY取不到对象
首先我的SELECTrn[code=JScript]rnrn[/code]rn能保证获取到值rn下拉列表有3个选项rn[code=Assembly]rn张三rn1rn2rn[/code]rn我选择任意一项以后打印rn$("#select_ygci_UseId").find("option:selected").text()rn打印出来的结果是空,就是空白rn我用firebug去抓这个结果试了很多办法都获取不到option,请教如何才能获取到这个select的option...rn引入的JS文件rn[code=JScript]rn rn rn[/code]rn很纳闷...请问该如何解决?IE是7.0版本
为什么取不到对象
htmlrn================================================rn rn rn rn rn 上传附件rn 描述rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn 文件尺寸: 小于 102.4 kb 可用扩展名: gif, jpg, jpeg, rn png rn rn=======================================================rnrnjsrn=======================================================rnfunction findtags(parentobj, tag) rn if(!isUndefined(parentobj.getElementsByTagName)) rn return parentobj.getElementsByTagName(tag);rn else if(parentobj.all && parentobj.all.tags) rn return parentobj.all.tags(tag);rn else rn return null;rn rnrnrn========================================================rnrnnewnode = $('attachbodyhidden').firstChild.cloneNode(true);rntags = findtags(newnode, 'input');rnie下没问题 firefox取不到
cookie取不到值
在项目中遇到html页面需要做一些记忆操作,选择把记忆操作的值存储在cookie中,遇到了某些页面可以获取有些页面获取不到,查阅了一番资料发现cookie也是有路径权限的。 cookie默认路径:当前访问的servlet父路径。 例如:我在http://localhost:8080/myProject/a/b/c/test.html页面设置了一个cookie,我在myProject/a/b/c...
为什么取不到值?
其实我的本意是就让html控件间相互赋值rn以下代码取不到值。显示的是 [undefined]rnfunction Button1_onclick() rnrn document.getElementById("Text1").innerText = rn document.getElementById("Button1").Value ; rn rnrndocument.getElementById("Button1") 后面根本没有Value的选项。但是我确实定义了呀。
request.QueryString()取不到值
我做一个产品展示,在Produclist.aspx页面中列出产品图片和名称,想在Productdetail.aspx页面中显示详细信息,rn代码如下rn.....rn想利用 request.QueryString["productId"进行进一步查询,可是却接收不到值我做了一天了,希望高人指教
取不到隐藏域的值
正在学习ASP+javascriptrnrnrnrn rn rnrn 隐藏域的值是[color=#FF0000]<%=Request.Form("factt")%>[/color]rn rnrn红颜色的,取不到值rn而绿颜色的,能取到值rnrn这是什么原因呢?rn
xmlhttp.responseXML.getElementsByTagName取不到值。
var xmlhttp = new XMLHttpRequest();rnxmlhttp.open('POST', '../servlet/ajaxServlet', true);rn rnxmlhttp.onreadystatechange = function() rn if (xmlhttp.readyState == 4) rn if (xmlhttp.status == 200)rn alert(xmlhttp.responseXML.xml);rn alert(new XMLSerializer().serializeToString(xmlhttp.responseXML.getElementsByTagName("div")[0])); rn rn rnrn我修改服务器端送回来的xml字段(xmlhttp.responseXML.xml),rn如果是 " test";rn就取不到值。rnrn如果是 " test",就能alert出来。rnrn和解? rn怎么样才能把第一种情况的div值取出来?rn
Request.QueryString取不到值
一个页面A放一个GridView,一个页面B放FormViewrnFormView里有一个ImageButton(一个“赞”)rn现在就是想实现,点一下就+1(初始值是0),于是用Request.QueryString去取页面A的GV里的被选中的id。rn可是取不到,这是为什么?rnrn[code=csharp]protected void btngood_Click(object sender, EventArgs e)rn rn string god=Request.QueryString["id"];rn string connectionString = ConfigurationManager.ConnectionStrings["lijunConnectionString"].ConnectionString;rn SqlConnection cnn = new SqlConnection(connectionString);rn string st = "update Article set good=good+1 where artid='"+@god+"'";rn cnn.Open();rn SqlCommand cmd = new SqlCommand(st, cnn);rn SqlDataReader rdr = cmd.ExecuteReader(); rn [/code]rn
存储过程取不到值
用mysql写了个存储过程,写了张临时表,然后想用游标循环这个表中的某个字段,定义游标和写入临时表的数据都没有问题,但用游标循环的时候就报错了,错误是rn1329 - No data - zero rows fetched , selected, or processedrnrn以下是代码,请帮忙解决一下,谢谢rnrn[code=SQL]rnbeginrnrn DECLARE mysql VARCHAR(1000) CHARSET utf8;rn DECLARE s_column VARCHAR(1000);rn DECLARE e_column VARCHAR(1000);rn DECLARE cash_total decimal(12,2);rn DECLARE estateId int;rn DECLARE cash_max decimal(12,2);rnrn DECLARE cur CURSOR FOR SELECT DISTINCT(ESTATE_ID)rn FROM tmp_cash_record;rnrn /* Create temporary table */rn DROP TABLE IF EXISTS tmp_cash_record;rn CREATE TEMPORARY TABLE tmp_cash_record(rn `ESTATE_ID` int NOT NULL,rn `ESTATE_NAME` varchar(50) collate utf8_unicode_ci NOT NULL,rn `CUSTOMER_NAME` varchar(50) collate utf8_unicode_ci NOT NULL,rn `CUSTOMER_ADDRESS` varchar(50) collate utf8_unicode_ci NOT NULL,rn `CUSTOMER_TEL` varchar(50) collate utf8_unicode_ci NOT NULLrnrn ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;rnrn /* Create temporary table */rn DROP TABLE IF EXISTS tmp_cash_record_estate;rn CREATE TEMPORARY TABLE tmp_cash_record_estate(rn `ESTATE_ID` int NOT NULL,rn `ESTATE_NAME` varchar(50) collate utf8_unicode_ci NOT NULL,rn `CASH_TOTAL` decimal(12,2) NOT NULL default '0.00',rn `TOTAL` decimal(12,2) NOT NULL default '0.00',rn `CASH_TOTAL_RATE` decimal(12,2) NOT NULL default '0.00',rn `CUSTOMER_TOTAL` int NOT NULL,rn `CASH_MAX` decimal(12,2) NOT NULL default '0.00'rn ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;rnrnrnrnrn SET s_column = "ESTATE_ID, ESTATE_NAME, YF_MONEY,CUSTOMER_NAME, CUSTOMER_ADDRESS, CUSTOMER_TEL";rn SET mysql = CONCAT('insert into tmp_cash_record(',s_column,')' );rn SET mysql = CONCAT(mysql ,"select s.ESTATE_ID, s.ESTATE_NAME, r.YF_MONEY, c.CUSTOMER_NAME, c.CUSTOMER_ADDRESS, c.CUSTOMER_TEL" );rn SET mysql = CONCAT(mysql, " FROM cash_record_", regionCode, " AS r, sys_estate_2_0_", regionCode, " AS s, cash_record_customer_", regionCode, " AS c");rn SET mysql = CONCAT(mysql, " WHERE r.id = c.CASH_ID AND s.ESTATE_ID = c.ESTATE_ID AND r.CASH_DATETIME BETWEEN '",beginDate," 00:00:00' and '",endDate," 23:59:59' " );rnrn SET @sql = mysql;rn PREPARE stmt FROM @sql;rn EXECUTE stmt;rn DEALLOCATE PREPARE stmt;rnrnrn SET mysql = CONCAT('insert into tmp_cash_record(',s_column,')' );rn SET mysql = CONCAT(mysql ,"select s.ESTATE_ID, s.ESTATE_NAME, r.YF_MONEY, c.CUSTOMER_NAME, c.CUSTOMER_ADDRESS, c.CUSTOMER_TEL" );rn SET mysql = CONCAT(mysql, " FROM cash_record_history_", regionCode, " AS r, sys_estate_2_0_", regionCode, " AS s, cash_record_customer_", regionCode, " AS c");rn SET mysql = CONCAT(mysql, " WHERE r.id = c.CASH_ID AND s.ESTATE_ID = c.ESTATE_ID AND r.CASH_DATETIME BETWEEN '",beginDate," 00:00:00' and '",endDate," 23:59:59' " );rnrn SET @sql = mysql;rn PREPARE stmt FROM @sql;rn EXECUTE stmt;rn DEALLOCATE PREPARE stmt;rnrn SELECT ifnull(sum(YF_MONEY) , 0)INTO cash_total FROM tmp_cash_record;rn SET e_column = "ESTATE_ID, ESTATE_NAME, CASH_TOTAL,TOTAL, CASH_TOTAL_RATE, CUSTOMER_TOTAL,CASH_MAX";rnrn SET mysql = CONCAT('insert into tmp_cash_record_estate(',e_column,')' );rn SET mysql = concat( "SELECT ESTATE_ID, ESTATE_NAME,SUM(YF_MONEY) , ", cash_total, " AS 'CASH_TOTAL', ROUND(SUM(YF_MONEY) *100/",cash_total,", 2) , COUNT(DISTINCT CUSTOMER_TEL),0.00");rn SET mysql = concat(mysql, " from tmp_cash_record group by ESTATE_NAME ORDER BY CASH_TOTAL DESC LIMIT ", pageCount, " , ", pageSize, ";");rnrn SET @sql = mysql;rn PREPARE stmt FROM @sql;rn EXECUTE stmt;rn DEALLOCATE PREPARE stmt;rnrn OPEN cur;rn FETCH cur INTO estateId;rnrn WHILE ( estateId is not null) DOrnrn SELECT MAX(CASH) FROM(SELECT sum(t.YF_MONEY) as 'CASH' FROM tmp_cash_record AS t GROUP BY t.CUSTOMER_TEL) AS NUM INTO cash_max;rn SET mysql = CONCAT("UPDATE tmp_cash_record_estate SET CASH_MAX = ",cash_max," WHERE ESTATE_ID =", estateId);rn SET @sql = mysql;rn PREPARE stmt FROM @sql;rn EXECUTE stmt;rn DEALLOCATE PREPARE stmt;rnrnrn FETCH cur INTO estateId;rn END WHILE;rn CLOSE cur;rnrnrnrn /*SELECT COALESCE(COUNT(distinct ESTATE_NAME),0) INTO totalCount FROM tmp_cash_record;*/rnrnendrn[/code]
Request.Form 取不到值
我在服务端的gridview中手写了一个gridview.Rows[0].cells[0].Text = "",然后客户端的gridview里生成了一个输入框。我输入任意值然后点按钮提交,想用Request.Form["bud_Summary_Nm"]来取得我输入的值,结果取不到,有哪位高手遇见过次问题帮忙解决一下,谢谢。
jquery 取不到值
[code=JScript]rn var $element = $('body:not(.drupalorg-site-main.front) #edit-search-theme-form-1'),rn value = $element.siblings('label').text();rn[/code]rnrnrn[code=HTML]rn rn Search Inkebook.com rn rn rnrn[/code]rnrnvalue为什么没取到值, rn我是用firebug , 在这个页面(http://www.inkebook.com/)执行一下代码rnrn提示:TypeError: element is nullrn[在此错误处中断] rnrnvalue = element.siblings('label').text();
WebBrowser.StatusText 取不到值
WebBrowser 文档内容加载完成后,鼠标没有进行在页面上滚动或移动到其他链接上的一次操作, 在点击超链接弹出新窗口的时候 StatusText 为空,这个怎么解决?rnprivate void browser_NewWindow(object sender, System.ComponentModel.CancelEventArgs e)rn rn var _url = ((System.Windows.Forms.WebBrowser)sender).StatusText; rn browser.Navigate(_url);rn e.Cancel = true;rn
ViewBag取不到值
HomeController 下的Index Action,ViewBag.test="123"rn然后在前台有个按钮,点击按钮发送Ajax请求到后台的GetData()方法rnGetData()方法下 ViewBag.test = "456";rn但是前台ajax的回调函数里取@ViewBag.test值还是"123"rn如果在GetData()方法中设置ViewBag.test2 = "456"; 前台取@ViewBag.test2值为空。rn请教这是怎么回事?对MVC还不是特别熟悉,请指点。rn
session值取不到
我有一个seesion是在异步方法中赋值的,当session的保存方式是InProc时没问题,但是现在为了session不丢失,把session的保存方式改为StateServer,但是改后session值就取不到了。我跟踪已经确定是在异步方法中赋值取不到,其他地方给session赋值都可以取到。求助!
取不到值,怎么回事???
rn有一个用户控件 .ASCX 文件rnrn他里面包含了,一个Repeater控件,而Repeater控件中 又 包含了一个标签控件 LabelrnrnRepeater数据已经绑定,现在要在 这个用户控件中的后台编码文件中 取 Label的值,rnrn 试了好多边取不到 ????rnrnResponse.Write(((Label)rpt.Items[1].FindControl("lbl")).Text);rn
为何取不到值,
QUESTION:1rn dim conn as new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=i:\web\d.mdb")rn dim objcmd as OleDbCommand=new OleDbCommand("showbulletin",conn)rn objcmd.CommandType=CommandType.StoredProcedurern dim objPara as OleDbParameterrn objpara=objcmd.Parameters.add("@id",Oledbtype.integer)rn objpara.direction=parameterDirection.Inputrn objpara.value=3rnrn dim objreader as OleDbDataReaderrn tryrn objcmd.connection.open()rn objreader=objcmd.executeReaderrn lbltitle.text=objreader.getstring(0)rn lbldate.text=objreader.getstring(2)rn txttext.text=objreader.getstring(1)rn txtnickname.text=objreader.getstring(3)rn catch ex as OleDbExceptionrn throw exrn finallyrn conn.closern end tryrnrnSQL SENTENCE:rntable:bulletin ,manrnSELECT [bulletin].[title], [bulletin].[text], [bulletin].[noticedate], [bulletin].[reply], [man].[nickname]rnFROM bulletin LEFT JOIN man ON [bulletin].[relatedman]=[man].[id]rnWHERE [bulletin].[id]=[@id]rnORDER BY [bulletin].[noticedate] DESC;rn在数据库中查询是正常的,ID为自增型。rnrn运行错误提示:No data exists for the row/column.rn但是如果objcmd.executescalar却能返回第一个字段的值!rn求解!rnQUESTION 2:rnrnDATAGRID中,SELECT后触发db_onselect事件;有个查询rnSELECT TOP 40 bulletin.id,bulletin.title FROM bulletinrn当在DATAGRID中选取某行时,如何得到该行bulletin.id的值。rn我用<%# DataBinder.Eval(Container.DataItem, "string" %> 提示:rn'DataBinding' is not an event of 'System.Web.UI.WebControls.ButtonColumn'rn该如何解决?rn谢谢!rn
为什么取不到值
<%@ page contentType="text/html;charset=gb2312" %>rn<%@ page language="java" import="java.sql.*" %>rnrn<%!rn public String getStr(String str)rn rn tryrn rn String temp_p=str;rn byte[] temp_t=temp_p.getBytes("ISO8859-1");rn String temp=new String(temp_t);rn return temp;rn rn catch(Exception e)rn rn e.printStackTrace();rn rn return null;rn rn rn%>rn<%! //处理输入的信息内容rn //该函数能够将字符串sstr中的'\n'、'\r'转换为 ;rn //也能够将字符串sstr中的转换为%nbsp;;rn public static String returnTobr(String sstr)rn rn if(sstr==null||sstr.equals(""))rn rn return sstr; rn rn StringBuffer sTmp=new StringBuffer();rn int i=0;rn while(i<=sstr.length()-1)rn rn if(sstr.charAt(i)=='\n'||sstr.charAt(i)=='\r')rn rn sTmp=sTmp.append(" ");rn rn else if(sstr.charAt(i)==' ')rn rn sTmp=sTmp.append(" ");rn rn elsern rn sTmp=sTmp.append(sstr.substring(i,i+1));rn rn i++;rn rn String s1=sTmp.toString();rn return s1;rn rn%>rn<%! //处理输入的信息内容rn //该函数能够将字符串sstr中的'<'转换为"<";rn //能够将字符串sstr中的'>'转换为">";rn public static String returnTohtml(String sstr)rn rn if(sstr==null||sstr.equals(""))rn rn return sstr;rn rn StringBuffer sTmp1=new StringBuffer();rn int i=0;rn while(i<=sstr.length()-1)rn rn if(sstr.charAt(i)=='<')rn rn sTmp1=sTmp1.append("<");rn rn else if(sstr.charAt(i)=='>')rn rn sTmp1=sTmp1.append(">");rn elsern rn sTmp1=sTmp1.append(sstr.substring(i,i+1));rn rn i++;rn rn String s2=sTmp1.toString(); rn return s2;rn rn%>rn<%! //定义变量rn String author,title,content;rn%>rn<% rn if(session.getAttribute("username")!=null)rn rn author=(String)session.getAttribute("username");rn rn title=returnTobr(returnTohtml(request.getParameter("title")));rn content=returnTobr(returnTohtml(request.getParameter("content")));rn rn author=getStr("author");rn title=getStr("title");rn content=getStr("content");rn rn%>rn<% //执行数据库操作,发布新的帖子rn String sqlinsert="insert into sendnew(author,title,content)";rn sqlinsert=sqlinsert+"Values('"+author+"','"+title+"','"+content+"')";rn workM.executeQuery(sqlinsert);rn%>rn rn rn rn rn<% //显示用户名rnif(session.getAttribute("username")!=null)rnout.println(session.getAttribute("username"));rnrn%> 当前位置:首页 -> 论坛 -> 发表新言论成功rn rn rn rn rn 返回个性论坛rn 返回java论坛rn rn rn
取不到datagird的值,
private void getInput()rn rn DataTable dt =( DataTable) (ViewState["myDataTable"]) ;rn// foreach (DataGridItem di in this.dgDetails.Items)rn// rn//rn// if (di.ItemType == ListItemType.Item || di.ItemType == ListItemType.AlternatingItem)rn// rnrnrnrn for(int i=0;i
sqldatasource取不到值
请各位帮我看看下面代码的问题,如果直接在label1的text中赋值,则下拉列表有结果,但是如果把值先赋给字符串,再把字符串赋给label,下拉就得不到结果,我觉得应该是sqldatasource取不到值得原因。rn <%rn string s = "2012-3";rn Label1.Text = s;rn %>rn rn rn rn rn rn rn rn
session取不到值
问题是这样的rn我们现在用session存放用户名,rn打一个比方rnwww.csdn.net里面可以取到sessionrn域名解析后的网址 111.csdn.com 取不到sessionrnrn请问怎么解决。
取不到dropdownlist的值
updatepanel中放了一个gridview,gridview的某一列包含一个dropdownlist控件,但是编辑保存的时候取到的始终是dropdownlist的第一项,这是为什么?
document.getElementById取不到值???
[b]html文件[/b]rn哈哈哈哈哈哈rnrn....(省略)rnrn[b]js文件[/b]rnfunction selectpin(str,str2,str3)rn....(省略)rnxmlhttp.open('get',encodeURI('abc.asp?d_class='+ str +'&d_ii='+ str2 +'&d_cc='+ str3 +'&'+new Date().getTime()),false);rn....(省略)rnrnrnstr跟str2取值都正常,就是str3取值总是undefined,怎么办?rnrn
cookies取不到值?
写cookiesrn Cookie cookie1=new Cookie("login_name","guest");rn Cookie cookie2=new Cookie("login_pass",strPwd);rn System.out.println("======================");rn cookie1.setMaxAge(60*60*24);rn cookie2.setMaxAge(60*60*24);rn response.addCookie(cookie1);rn response.addCookie(cookie2);rnrnrn读cookiesrnrnrnCookie[] cookie=request.getCookies();rnString name="",pass="";rnif(cookie!=null)rnrnfor(int i=0;i
怎么取不到值?: ">
" name="kh">rn rn请选择客户.. rn<%rnset rskh=server.createobject("adodb.recordset")rnsqlkh="select * from shenqi_table"rnrskh.open sqlkh,conn,1,1rndo while not rskh.eof rn%>rn "><%=rskh("danwei")%>rn<%rnrskh.movenextrnlooprnrskh.closernset rskh=nothingrn%>rn rnrn===================rn代码如上,列表显示的是名称,交时我想取ID,并查找,在当前页面上显示此用户相关的数据rnrn可是action="ji.asp?idd=<%=request.form("D1")%>" 取出来老是这样的:rnaction="ji.asp?idd=",就是空的,怎么办呀
app.config 取不到值
方法如下:rn[code=csharp]rnnamespace Commonrnrn public class ConfigManagerrn rn public static string GetConfigString(string columnName)rn rn tryrn rn string result = ConfigurationManager.AppSettings[columnName];rn return result;rn rn catchrn rn return string.Empty;rn rn rn rnrn[/code]rnapp.config 内容:rn[code=html]rnrnrn rn rn rnrn[/code]rn[img=https://img-bbs.csdn.net/upload/201601/19/1453173711_982820.png][/img]rnrn然后我在另一个项目中调用rn[code=csharp]rn string path = ConfigManager.GetConfigString("DBPath");rn xDocument = XDocument.Load(path);rn[/code]rnrn取不到值啊[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/11.gif][/img]为撒子捏rn断点过去没有报错,得到的 result 值是nullrn[img=https://img-bbs.csdn.net/upload/201601/19/1453173992_48152.png][/img]rnrn求解。
cookie取不到值??
admin.php页面部份程序:rn rn rn rn rn rn rn 登录管理rn 用户名:rn rn 用户密码:rn rn rn rn rn rn rn rn rn rnrnadmin1.php源程序??rnrnrnrnrn怎么我第一次运行admin.php进行登录时,admin1.php输不出来 "对的" rn关掉浏览器后,再次登录,发现已存入cookie了,输出"对的"rn这是什么原因呀???
触发器取不到值
语句中的Comments列插入没有值,但实际用手动查询有,要如何debug 请教高手!感恩!rnrn[code=sql]set ANSI_NULLS ONrnset QUOTED_IDENTIFIER ONrnGOrnrnALTER trigger [dbo].[CDefect]rnon [dbo].[OutcomesData]rnafter insertrnas rndeclare @id intrndeclare @id2 intrnselect @id=outcome from inserted where hashkey='Observation'rnrnif @id is not nullrnbeginrnrnselect @id2=Recno from outcomes with (UPDLOCK) where operationtypename='Defective Log ' and passfail='1' and recno=@idrnif @id2 is not nullrnbeginrninsert into trepair(outcome,TLI,SN,OperationID,Operation,Defect1,Commets1,defect2,AAction,RootCause,DefectPartsn,NewPartsn,ModuleName,Components,commets2,Line)rnselect outcomes.recno,rn Products.TLI,rn Products.SerialNumber,rn max(case hashkey when 'OperatorID' then hashvalue else '' end) OperatorID,rn max(case hashkey when 'WhereFound' then hashvalue else '' end) Operation,rn max(case hashkey when 'observation' then hashvalue else '' end) observation,rn max(case hashkey when 'Comments' then hashvalue else '' end) Commets1,rn max(case hashkey when 'Symptom' then hashvalue else '' end) Symptom,rn ''as AAction,rn ''as RootCause,rn ''as DefectPartsn,rn ''as NewPartsn,rn ''as ModuleName,rn ''as Components,rn ''as Comments2,rn Products.linernfrom outcomesdata with (UPDLOCK)join outcomes with (UPDLOCK) on outcomesdata.outcome =outcomes.recnornjoin products with (UPDLOCK) on outcomes.product =products.recnornwhere outcomesdata.outcome =@idrngroup by outcomes.recno,serialnumber,tli,linernend rnrnrnrnendrnrnrnrnrnrnrnrnrn[/code]
@Value 取不到值
环境:springboot  在配置文件里设置了值 在Util里面去取值 取不到 原因: util类一般为static类 里面没有@Bean 而@Value 和@Bean 一般是一起使用,在注入Bean的时候,给Value赋值 如果类似Util里是没有@Bean(一般也不应该有) 所以@Value会失效 解决办法,so easy 在@Bean的类里面 加入@Value
getParameter取不到值
[code=HTML]rnrn rn AddAdPic.htmlrnrn rn rn rnrn rn rn rnrn rnrn rn rn rn 添加图片广告rn rn rn rn rn rn 广告名 rn rn rn rn rn rn rn rn 广告图片 rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn[code=Java]package controller;rnrnimport java.io.*;rnimport java.util.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport model.*;rnimport org.apache.commons.fileupload.*;rnimport org.apache.commons.fileupload.servlet.*;rnimport org.apache.commons.fileupload.disk.*;rnrnpublic class AdPicServlet extends HttpServlet rn private String filePath; // 存放上传文件的目录rn private String tempFilePath; // 存放临时文件的目录rnrn public void init(ServletConfig config) throws ServletException rn super.init(config);rn filePath = config.getInitParameter("filePath");rn tempFilePath = config.getInitParameter("tempFilePath");rnrn filePath = this.getServletContext().getRealPath(filePath);rn tempFilePath = this.getServletContext().getRealPath(tempFilePath);rn rnrn public void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn rn try rn DiskFileItemFactory factory = new DiskFileItemFactory();rn factory.setSizeThreshold(4 * 1024);rn factory.setRepository(new File(tempFilePath));rnrn ServletFileUpload upload = new ServletFileUpload(factory);rn upload.setFileSizeMax(4 * 1024 * 1024);rnrn List items = upload.parseRequest(request);rn Iterator iter = items.iterator();rn while (iter.hasNext()) rn FileItem item = (FileItem)iter.next();rn if (item.isFormField()) rnrn else rn processUploadedFile(item);rn rn rn catch (Exception ex) rn ex.printStackTrace();rn rnrn //执行插入数据库操作rn PicInfoGo pig = new PicInfoGo();rn pig.picInfoInsert(request);rnrn //执行跳转操作rn this.getServletContext().getRequestDispatcher("/show.jsp").forward(rn request, response);rn rnrn private void processUploadedFile(FileItem item) rn String fileName = item.getName(); //获得文件的名字rn long fileSize = item.getSize(); //获得文件的大小rnrn if (fileName.equals("") && fileSize == 0) rn return;rn rnrn File uploadedFile = new File(filePath + "\\" +fileName);rnrn try rn item.write(uploadedFile);rn catch (Exception e) rn e.printStackTrace();rn rn rn rnrn[/code]rnrn[code=Java]package model;rnrnimport javax.servlet.http.*;rnimport model.entity.*;rnimport model.dataaccess.*;rnrnpublic class PicInfoGo rnrn public PicInfoGo() rnrn rnrn PicInfo pi = new PicInfo();rn PicInfoService pis = new PicInfoService();rnrn public void picInfoInsert(HttpServletRequest request) rn [color=#FF0000]String picName = request.getParameter("picName").trim();[/color]rn String picFilePath = request.getParameter("picFilePath").trim();rnrn pi.setAdPicName(picName);rn pi.setAdPicPicpath(picFilePath);rn pi.setAdPicClickCount(0);rnrn pis.insertAd(pi);rn rnrn[/code]rnrn严重: Servlet.service() for servlet AdPicServlet threw exceptionrnjava.lang.NullPointerExceptionrn at model.PicInfoGo.picInfoInsert(PicInfoGo.java:17)
reqest取不到值
action=request("action")rn'******************************rn '添加大类别rn'******************************rnif action="add" then'rnrn [color=#FF0000]Att_Name=trim(request("Att_Name"))[/color]rnrn sql="select * from cd_Att where 1=1"rn call openrs(rs,sql,3,3)rn rs.addnewrn rs("Att_Name")=Att_Namernrnrn[color=#FF0000]Att_Name=trim(request("Att_Name"))[/color]rnrnrn这一句取不到值
怎么会取不到值
点击投票按钮后显示的总是undefined,按常理来说应该是可以取到单选框的值的,不知道是什么原原rnaaaaaaaaa rnbbbbbbbbb rnccccccccc rnrn
ajax取不到值
在后台把数据json化,ajax取不出来[img=https://img-bbs.csdn.net/upload/201505/13/1431483848_722632.png][/img]
取不到值
rsd.open "select * from shm where bh="&wdns_ed,conn,1,1rnif not rsd.eof thenrnwdns_pm=rsd("mc")rnend ifrn--------rnrnrsd.open "select * from shm where bh="&wdns_ed"",conn,1,1rnif not rsd.eof thenrnwdns_pm=rsd("mc")rnend ifrnrnwdns_ed为表ASQ的hh字段已经取得的值1688,以其做查询表shm符和bh的行。。rnhh与bh均为数字型rn上两方法都用过但取不到rsd("mc")的值rn请高手指导..rnrnrnrn
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池