tomcat和resin,jsp:include問題,急呀,大家救救我~~~~~~~~~~~~~~~~~~

angel_jdon發表於2005-04-07
用tomcat5.0.27 [jsp:include page=".do"/]問題

a2.jsp
----------------------------------------------------------------------

[%@ page contentType="text/html; charset=gb2312" language="java"%]

[html]

[head]

[title][/title]

[meta http-equiv="Content-Type" content="text/html; charset=gb2312"]

[/head]

[body]

[jsp:include page="../temp.do"/]
a2

[/body]

[/html]

temp.java
----------------------------------------------------------------------
package web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class temp extends Action {
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm,HttpServletRequest request,javax.servlet.http.HttpServletResponse response) throws Exception {
return actionMapping.findForward("success");
}
}

struts-config.xml
-----------------------------------------------------------------------

[action path="/temp" type="web.temp" scope="request" validate="false"]

[forward name="success" path="/include/head.jsp" redirect="false"/]

[/action]

head.jsp
----------------------------------------------------------------------

[%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %]

[html]

[head]

[title][/title]

[meta http-equiv="Content-Type" content="text/html; charset=gb2312"]

[/head]

[body]
head

[/body]

[/html]
========================================================================
執行時報錯:
2005-4-7 9:33:57 org.apache.jasper.runtime.PageContextImpl release
警告: Internal error flushing the buffer in release()

頁面顯示:
head
----
a2不顯示,也就是說,在[jsp:include]之後的內容不顯示,我懷疑是上面的錯誤導致,但單執行temp.do又沒錯,也不報錯.
而且resin都能顯示出a2,可能是糾錯能力強,55555,怎麼辦呀,錯誤是什麼問題.有什麼辦法解決...急死我了..
include 呼叫.do檔案就出錯....暈

相關文章