JiveJdon Community Forums
在线135人   首页   主题总表   培训咨询   精华   查搜   注册    登陆
首页 » 论坛 » J2EE/JavaEE/JEE/EJB/JSF等技术讨论
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表
???en_US.forumThreadNext.name??? 下一主题
Go 总共有 7 回复 / 1
 发表新帖子   回复该主题贴
joeee

悄悄话
发表文章: 8
注册时间: 2004年03月11日 16:39
请各们兄长帮忙(无报告,但显示空白页) 2004年03月11日 16:42 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
标签列表
配置如下:
web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
<display-name>eLibrary</display-name>

<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>


<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-html</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-nested.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-template</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-template.tld</taglib-location>
</taglib>


</web-app>
模板文件如下:
%@ page contentType = "text/html;charset = gb2312" %>
<%@ taglib uri = "/struts-template" prefix = "template" %>
<html>
<head>
<title>欢迎常来逛逛</title>
</head>
<body>
<jsp:include page = "header.jsp"/>
<table>
<tr>
<td><jsp:include page = "menu.jsp"/></td>
<td><template:get name = "content"/>
</tr>
</table>
<jsp:include page = "footer.jsp"/>
</body>
</html>
主页面如下:
<%@ taglib uri = "/struts-template" prefix = "/template" %>
<template:insert template = "template.jsp ">
<template:put name = "content" content = "cont.jsp"/>
</template:insert>
头文件如下:
<table class = "header">
<tr><td class = header>welcome</td></tr>
</table>
尾文件:
<%@ page import="java.util.Date, java.text.Dateformat" %>
<% Dateformat df = Dateformat.getDateInstance(Dateformat.MEDIUM, request.getLocale()); %>
<table class="disclaimer">
<tr>
<td class="disclaimer">
<b>Disclaimer:</b>
All content on this site is mine.
Today is <%= df.format(new Date()) %>
</td>
</tr>
</table>
文件目录结构:
jsp/template.jsp,index.jsp,header.jsp,foot.jsp
WEB-INF/tld/.........
jsp和WEB-INF在一级目录上,
请高手指教,
多谢多谢,
急死了,我正在写毕业设计

joeee

悄悄话
发表文章: 8
注册时间: 2004年03月11日 16:39
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年03月11日 16:52 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题


web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
<display-name>eLibrary</display-name>

<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>


<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-html</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-nested.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/struts-template</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-template.tld</taglib-location>
</taglib>


</web-app>
模板文件如下:
%@ page contentType =
"text/html;charset = gb2312" %>
<%@ taglib uri =
"/struts-template" prefix = "template" %>
<html>
<head>
<title>欢迎常来逛逛</title>
</head>
<body>
<jsp:include page =
"header.jsp"/>
<table>
<tr>
<td><jsp:include page =
"menu.jsp"/></td>
<td><template:get name =
"content"/>
</tr>
</table>
<jsp:include page =
"footer.jsp"/>
</body>
</html>
主页面如下:
<%@ taglib uri =
"/struts-template" prefix = "/template" %>
<template:insert template =
"template.jsp ">
<template:put name =
"content" content = "cont.jsp"/>
</template:insert>
头文件如下:
<table class =
"header">
<tr><td class = header>welcome</td></tr>
</table>
尾文件:
<%@ page import=
"java.util.Date, java.text.Dateformat" %>
<% Dateformat df = Dateformat.getDateInstance(Dateformat.MEDIUM, request.getLocale()); %>
<table class=
"disclaimer">
<tr>
<td class=
"disclaimer">
<b>Disclaimer:</b>
All content on this site is mine.
Today is <%= df.format(new Date()) %>
</td>
</tr>
</table>
文件目录结构:
jsp/template.jsp,index.jsp,header.jsp,foot.jsp
WEB-INF/tld/.........
jsp和WEB-INF在一级目录上,
请高手指教,
多谢多谢,
急死了,我正在写毕业设计

oldma

悄悄话
发表文章: 85
注册时间: 2003年09月10日 13:09
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年03月11日 16:56 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
呵呵,不用贴着么多
在用strut时出现“无报告,但显示空白页”的错误
就是jsp运行或是编译出错了
这个错误的具体信息在tomcat的logs目录下的localhost_log.200X-XX-XX.txt

joeee

悄悄话
发表文章: 8
注册时间: 2004年03月11日 16:39
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年03月11日 17:38 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
兄长,谢谢你了,不过问题还是没有解决,在日志文件中的最后报告中,好像没有说明这个问题,而以前的方方面面的错误,倒是全部记录是下来,还请帮我仔细看看
joeee

悄悄话
发表文章: 8
注册时间: 2004年03月11日 16:39
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年03月11日 18:03 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
以下是我从日志文件中拷贝下来后部分报告

2004-03-11 18:01:46 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-03-11 18:02:08 StandardContext[/struts-example]action: []: Verifying ModuleConfig for this application module
2004-03-11 18:02:10 StandardContext[/struts-example]action: []: Verification of ModuleConfig has been completed
2004-03-11 18:02:40 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2004-03-11 18:02:40 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2004-03-11 18:02:42 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2004-03-11 18:02:42 StandardContext[/servlets-examples]SessionListener: contextInitialized()

附上最后一次出错报告,请兄长们帮助
l0190269454

悄悄话
发表文章: 19
注册时间: 2004年03月01日 20:34
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年03月11日 18:16 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
使用Tomcat? Tomcat的错误报告机制确实不太好!


下面的方法或许对你有帮助:

在JBuilder中编译jsp看看能不能通过。

在jsp文件的主要部分用try catch括起来,并将错误信息打出来。对照错误行数,到tomcat/work目录下看看jsp编译后的java文件的位置最后追踪到jsp文件中的位置。
mikecaolei

悄悄话
发表文章: 17
注册时间: 2003年11月20日 14:02
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年04月02日 15:27 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
我也有类似问题,看了log,显示一下信息


[2004/04/02 15:15:15] null
java.lang.NullPointerException
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:700)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:665)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:324)
at javax.servlet.GenericServlet.init(GenericServlet.java:82)
at com.caucho.server.http.Application.createServlet(Application.java:3103)
at com.caucho.server.http.Application.loadServlet(Application.java:3054)
at com.caucho.server.http.Application.initServlets(Application.java:1914)
at com.caucho.server.http.Application.init(Application.java:1827)
at com.caucho.server.http.VirtualHost.init(VirtualHost.java:720)
at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:853)
at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:698)
at com.caucho.server.http.ServletServer.init(ServletServer.java:509)
at com.caucho.server.http.ResinServer.init(ResinServer.java:377)
at com.caucho.server.http.ResinServer.main(ResinServer.java:1137)
at com.caucho.server.http.HttpServer.main(HttpServer.java:103)
[2004/04/02 15:15:15] init exception for `action'
java.lang.NullPointerException
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:700)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:665)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:324)
at javax.servlet.GenericServlet.init(GenericServlet.java:82)
at com.caucho.server.http.Application.createServlet(Application.java:3103)
at com.caucho.server.http.Application.loadServlet(Application.java:3054)
at com.caucho.server.http.Application.initServlets(Application.java:1914)
at com.caucho.server.http.Application.init(Application.java:1827)
at com.caucho.server.http.VirtualHost.init(VirtualHost.java:720)
at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:853)
at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:698)
at com.caucho.server.http.ServletServer.init(ServletServer.java:509)
at com.caucho.server.http.ResinServer.init(ResinServer.java:377)
at com.caucho.server.http.ResinServer.main(ResinServer.java:1137)
at com.caucho.server.http.HttpServer.main(HttpServer.java:103)

请各位帮忙看看是什么原因
corlin

悄悄话
发表文章: 3
注册时间: 2004年03月25日 11:30
Re: 请各们兄长帮忙(无报告,但显示空白页) 2004年08月23日 14:19 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
struts配置文件有问题..非tomcat的错..
这个主题有 7 回复 / 1Go
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表    返回页首返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache 缓存 DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Seam Spring Struts
正在读取,请等待...
google yahoo 新浪ViVi 365Key网摘 天极网摘 CSDN网摘 添加到百度搜藏 POCO网摘 博采网摘
查询本论坛内 回复超过的热门帖子
     回复该主题贴
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

手机阅读 add to google add to yahoo
解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-08 jdon.com
anti spam