下面是我的部分代码
<%
//当前会员
Users loginUser=(Users)session.getAttribute("loginuser");
if(loginUser==null)
{
response.sendRedirect("../index.jsp");
}
//商品信息
ProductManager pm=new ProductManager();
Product ProductByMinPrice=pm.getProductByMinPrice();//特价商品
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>"/>
<title>智@趣--我的帐户</title>
<link rel="stylesheet" type="text/css" href="images/css.css"/>
</head>
我调试了,程序经过了response.sendRedirect("../index.jsp");
但是没有反映,依然执行下面的代码,导致引发空指针引用!
是不是因为没有请求的原因?
我用form表单的处理页面使用刚有效!
白骨们帮忙!
<%
//当前会员
Users loginUser=(Users)session.getAttribute("loginuser");
if(loginUser==null)
{
response.sendRedirect("../index.jsp");
}
//商品信息
ProductManager pm=new ProductManager();
Product ProductByMinPrice=pm.getProductByMinPrice();//特价商品
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>"/>
<title>智@趣--我的帐户</title>
<link rel="stylesheet" type="text/css" href="images/css.css"/>
</head>
我调试了,程序经过了response.sendRedirect("../index.jsp");
但是没有反映,依然执行下面的代码,导致引发空指针引用!
是不是因为没有请求的原因?
我用form表单的处理页面使用刚有效!
白骨们帮忙!
解决方案 »
- 改变浏览器地址栏地址,判断新url 和旧 url 的 域名是否一样
- 初学servlet的菜鸟问题,麻烦了
- java ftp 文件上传,创建多层目录
- 类似这样的功能应该如何实现,请走过路过的帮忙看看
- 一个JSP做的翻页相关的页面,有个冲突问题.不知怎么提问,有空的朋友进来帮看下吧.
- Eclipse中按ctrl点类名或者方法名下面不出现下划线如何配置
- servlet读取xml,xml放在哪?
- 怎样删除包含文件的文件夹??
- 谁用过这个?能用吗?教教我!
- 利用Java 技术,怎样把JSP页面中的表格数据导入到microsoft Excel中
- 如何实现类似OA系统的及时通信?
- 能告诉我下面这个问题怎么解决不。。各位大侠们?
表示index所在目录的上一及下面