且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从servlet执行JSP,并将响应返回给servlet?

更新时间:2022-11-26 13:54:56

使用RequestDispatcherforward 方法.请参阅此处进行讨论: http://www.theserverside.com/discussions/thread.tss?thread_id= 2472 [^ ].

但是,请让JSP 负责输出.这就是JSP编程中的过程:让servlet处理所有业务逻辑和数据访问内容,并使用JSP 将整个内容呈现为HTML.

问候,

—MRB
Use the RequestDispatcher''s forward method. See here for a discussion: http://www.theserverside.com/discussions/thread.tss?thread_id=2472[^].

Please let the JSP take care of the output though. That''s the procedure in JSP programming: Let the servlets handle all the business logic and data access stuff and the JSP is used to render the whole thing to HTML.

Regards,

—MRB