可能是你web.xml文档有问题
你帖出来给大家瞧瞧
你帖出来给大家瞧瞧
解决方案 »
- Generic Dao 连接查询
- hibernate如何操作中间表
- string.split("")无法用$进行分割
- (急急)java 网页抓取时,有的空格变成???? 但是汉字不乱码 知道的话在加50分
- Struts2 路径问题
- hibernate Criteria 查询
- javamail问题
- 很奇怪的一个struts的问题,郁闷死了,请高手帮忙(急~~)
- 有关DAO模式的问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 关于j2ee开发包里是否包含了 j2 s(servlet)dk呢
- 哪位大侠有cruisecontrol的国内下载地址,sourceforge太慢了,受不了了。多谢!
- struts,spring,hiberte这三个框架的先后顺序是什么呀?
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<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>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<jsp-config>
<taglib> <taglib-uri>>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>這是配置的 我總是運行Application的時候都有問題,
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
换成这个.
<param-value >3 </param-value >
</init-param >
param-value 的值不要和上面的相同/
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>有錯誤,提示需要標記
<taglib > <taglib-uri > >/tags/struts-bean </taglib-uri >
<taglib-location >/WEB-INF/struts-bean.tld </taglib-location >
</taglib >
<taglib >
<taglib-uri > >/tags/struts-html </taglib-uri >
<taglib-location >/WEB-INF/struts-html.tld </taglib-location >
</taglib >
<taglib >
<taglib-uri > >/tags/struts-logic </taglib-uri >
<taglib-location >/WEB-INF/struts-logic.tld </taglib-location >
</taglib >
<taglib >
<taglib-uri > >/tags/struts-tiles </taglib-uri >
<taglib-location >/WEB-INF/struts-tiles.tld </taglib-location >
</taglib >
<taglib >
<taglib-uri > >/tags/struts-nested </taglib-uri >
<taglib-location >/WEB-INF/struts-nested.tld </taglib-location >
</taglib >
</jsp-config >
多了一个尖括号>其实,你最好先用ie打开这个xml
看看它是否经得起验证
The absolute uri: http://struts.apache.org/tags-bean cannot be resolved in either web.xml or the jar files deployed with this application
而TOmcat里面還是WEB-INF/web.xml not found
<taglib >
<taglib-uri > >/tags/struts-bean </taglib-uri >
<taglib-location >/WEB-INF/struts-bean.tld </taglib-location >
</taglib >不行就工程删了再重新发布,
tomcat报错,就用以前没错的工程试试,否则就重装tomcat
<taglib-uri >http://struts.apache.org/tags-bean </taglib-uri >
<taglib-location >/WEB-INF/struts-bean.tld </taglib-location >
</taglib >在web.xml中把这个给加进去,系统提示的是你没有定义struts标签库的实际地址
/WEB-INF/struts-bean.tld 这个是你的标签库文件的实际地址
http://struts.apache.org/tags-bean这个是uri就像下面那样你在jsp文件引入标签库,但没有配置该uri所对应的
标签库文件的实际地址
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="tb"%>
WEB-INF文件夹不是直接放在web根目录下(多了一层目录)----------web根目录\WebRoot\WEB-INF WebRoot目录就是多出来的
你到tomcat发布的系统你面看看WEB-INF 下面有web.xml么
如果没 删掉重新发布 有的话用ie跑下web.xml看看
<?xml version="1.0" encoding="UTF-8" ?> --正确的
就是第1句报错
<?xml version="1.0" encoding="UTF-8"? > LZ的是这个
注意问号和空格。改下 改成我写的那样应该就没问题了~!