<a href="#" onclick="window.open('look.jsp? id=<%=Articles.getAuthor()%>')">查看</a></td>
在look.jsp中, int id=Integer.parseInt(request.getParameter( "id")); out.println(id);
点击查看, 输出结果总是:null。 请大家帮帮手!
在look.jsp中, int id=Integer.parseInt(request.getParameter( "id")); out.println(id);
点击查看, 输出结果总是:null。 请大家帮帮手!
解决方案 »
- action调用service的方法卡住了,求解答
- 表单取值?
- 写一段时间段控制代码, 2007-08-29 至 2007-09-04 跳过接下来的程序执行.
- java连接ORACLE JDBC问题?
- 关于hibernate中使用sum()函数的问题
- 谁能告诉我哪里能下载支持eclipse3.0.1的MyEclipse,如果有注册码能否告诉我或者告诉我在哪下载?
- 围绕Jbiulder的问题,请详细解答,节贴给分!
- 关于DocumentBuilder.parse()的一个问题
- 关于ejb_jar.xml(100分求救)
- J2EE听着很熟,怎么才能下载到J2EE呢?
- 关于hibernate的问题(加急)
- Struts 2 与Spring 整合
然后在'look.jsp中request.getParameter("id");
你这个是超链接<a >参数可以直接到href里面传递...不用click试试...
先在你的本页,输出一下Articles.getAuthor()这个值是不是为空!!
或者你进入这个页面的时候,查看下源代码,看下你的window.open里面的参数
总感觉,你的这个Aticles没有实例化,直接拿来用的,最好把代码粘完全点,应该是你在这里就没有获得值呢!
<a href="#" onclick="window.open('look.jsp? id= <%=Articles.getAuthor()%>')">查看 </a>你再试试
没空格.
int id=Integer.parseInt(request.getParameter( "id"));
//改成:
int id=Integer.parseInt(request.getParameter( "id")+"");
//试试看