The server encountered an internal error () that prevented it from fulfilling this request
来源:互联网 发布:淘宝产品图片 编辑:程序博客网 时间:2024/05/22 23:09
为了测试:request.getReqestDispatcher("test02.jsp").forward(request,response);
写了个程序,一直出现如题异常,最终解决:
在调用它们之前,都不能有内容已经被实际输出到了客户端。如果缓冲区中已经有了一些内容,这些内容将被从缓冲区中清除。
因为myeclipse 自动生成的代码忘记删除,所以导致该错误。
api:
forward
void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException
- Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. This method allows one servlet to do preliminary processing of a request and another resource to generate the response.
For a
RequestDispatcher
obtained viagetRequestDispatcher()
, theServletRequest
object has its path elements and parameters adjusted to match the path of the target resource.forward
should be called beforethe response has been committed to the client (before response body output has been flushed). If the response already has been committed, this method throws anIllegalStateException
. Uncommitted output in the response buffer is automatically cleared before the forward.The request and response parameters must be either the same objects as were passed to the calling servlet's service method or be subclasses of the
ServletRequestWrapper
orServletResponseWrapper
classes that wrap them. - Parameters:
request
- aServletRequest
object that represents the request the client makes of the servletresponse
- aServletResponse
object that represents the response the servlet returns to the client- Throws:
ServletException
- if the target resource throws this exceptionIOException
- if the target resource throws this exceptionIllegalStateException
- if the response was already committed
- description The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error () that prevented it from fulfilling this request
- The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error () that prevented it from fulfilling this request
- The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error that prevented it from fulfilling this request
- The server encountered an internal error () that prevented it from fulfilling this request.
- The server encountered an internal error that prevented it from fulfilling this request. exception
- The server encountered an internal error that prevented it from fulfilling this request.
- The server encountered an internal error that prevented it from fulfilling this request的一种解决办法
- The server encountered an internal error () that prevented it from fulfilling this request.h--模型驱动
- The server encountered an internal error that prevented it from fulfilling this request.
- struts上传文件 时出项问题 The server encountered an internal error () that prevented it from fulfilling this request.
- 一个困扰很久的问题【description The server encountered an internal error () that prevented it from fulfilling this request】
- 解决方法HTTP Status 500 - description The server encountered an internal error () that prevented it from fulfilling this request
- Android开发之道(3)系统演进历史
- keil编程学习备忘
- Linux情景分析 读书笔记(一) 前面的话
- 你真正的社交网络:手机通讯录
- 链表逆置
- The server encountered an internal error () that prevented it from fulfilling this request
- 刚写的一个小游戏,我管它叫“最后的z”
- Chrome中安装JavaScript脚本
- 你真正的社交网络:手机通讯录
- Unix网络编程代码 第30章 客户/服务器程序设计范式
- JLINK与JTAG的区别
- log4j.xml配置文件
- svn 命令介绍
- Linux情景分析 读书笔记(二) 基础知识