日期:2014-05-17  浏览次数:20681 次

哪位高手帮我看下Source not found for ResponseFacade.sendRedirect(String) line: 483
网站的首页能打开,点击首页的超链接<h3><A href="<%=request.getContextPath()%>/AuloadingServlet">管理员入口</A></h3>后,显示Source not found for ResponseFacade.sendRedirect(String) line: 483 并且出现下面这样的对话框:
Confirm Perspective Switch
 This kind of launch is configured to open the Debug perspective when it suspends.(后面省略不写了

我点击 了yes 还是 出现Source not found for ResponseFacade.sendRedirect(String) line: 483 
AuloadingServlet的代码如下 
public class AuloadingServlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
Cookie []allCookie=request.getCookies();

int i=0;
String val=null;
if(allCookie!=null){
for(i=0;i<allCookie.length;i++){
Cookie temp=allCookie[i];
if(temp.getName().equals("admin")){
 
 
response.sendRedirect("gly.jsp");
}else{
response.sendRedirect("1.jsp");
}

}

}else {
response.sendRedirect("1.jsp");

}
 

}

 
 

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
this.doGet(request, response);



}
代码中的cookie,服务器中应该已经有了……所以allCookie!=null应该为true
 

请各位高手指点下 谢谢 啦


------解决方案--------------------
跳转路径问题,jsp访问不到吧,配成相对路径