空指针错误是不是你的判定条件的 错?
response.sendRedirect() 应该不会出现这种错误,
我一直用的它。
response.sendRedirect() 应该不会出现这种错误,
我一直用的它。
解决方案 »
- 分页处理
- struts action 提交问题
- 怎么用eclipse调试web应用程序
- JavaBean的问题
- 求教一个关于java结合数据库开发系统的源代码下载地址!!
- tomat不能访问jsp页面
- HTTP Status 405 - HTTP method POST is not supported by this URL错误,请高手指教!
- 高手请进来!帮帮我看看!这个问题我解决不了!解决马上散分!!
- jive安装过程中的jive.license文件,怎么总是说有错误呢?
- 做第一个Servlet.....
- 怎样在jsp中将xml包的文件全部显示,并定义显示格式?
- 如何在JSP中使用菜单,急,在线等待
<%
if (判定接收的条件)
//response.sendRedirect("index.htm");
out.println("OK");
else
out.println("error");%>同样的条件,后台就没有什么错误提示了。
我就是:)
<%
if (判定接收的条件)
%>
<script>
window.location="index.htm";
</script>
<% else
out.println("error");%>
<%
if ( testbean.check(str1,str2,str3))
{
session.setAttribute("str",str1);
response.sendRedirect("index.htm");
}
else
out.println("验证错误,请检查输入的是否正确!");
%>如果注释掉response.sendRedirect("index.htm");
就没有任何问题。