`

java.lang.IllegalStateException:Cannot forward after response has been committed

阅读更多
try {
    username = session.getAttribute("username").toString();
   } catch(NullPointerException ex) {
    request.getRequestDispatcher("LoginServlet").forward(request, response);
    
    return; // 务必注意要加上 return
   }

 

分享到:
评论
1 楼 greatwqs 2011-02-25  
java.lang.IllegalStateException: Cannot forward after response has been committed

相关推荐

Global site tag (gtag.js) - Google Analytics