IllegalStateException: Cannot forward a response that is already committed
对于初学者来说,一个常见的误解是:当调用 forward() 或者 sendRedirect() 时控制流将会自动跳出原函数。标题所示错误通常是基于此误解而引起的。示例代码:protected void doPost() { if (someCondition) { sendRedirect(); } forward(); // ...
2014-04-18 15:34:45 ·
528 阅读 ·
0 评论