发帖    主题    评论    推荐    标签    作者    订阅    查搜    注册   登陆   关注
 
面向对象 设计模式 领域驱动设计 企业架构 框架 开发教程 微服务 大数据 扩展性 并发编程 事件驱动 分布式 CQRS

要命了,帮我~~~~~~~~~~~~~~

2005-04-07 10:06
赞助商链接

用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文件就出错....晕

2005-04-16 13:44

既然用了Struts,为什么还在Jsp页面中有如下语句?
[%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %]


import="java.sql.*"是笔误吧!

2005-04-18 00:45

你的action没有配置Formbean

赞助商链接

赞助商链接

返回顶部

移动版 关于本站 使用帮助 联系管理员 最佳分辨率1366x768
OpenSource JIVEJDON Powered by JdonFramework Code © 2002-20 jdon.com