我的项目(用的是struts1.2)在本机上行是没有一点问题的,但把项目部署到服务器中,如果引了struts标签的JSP页面是在WebRoot根目录下,运行没有问题,但如果是引用了strruts标签的JSP页面是在WebRoot下的子目录下就报错:
org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deployed with this application............
我在网上搜了好多解决方法,但还是一样的错误,希望各位高手都来看看
org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-logic cannot be resolved in either web.xml or the jar files deployed with this application............
我在网上搜了好多解决方法,但还是一样的错误,希望各位高手都来看看
解决方案 »
- httpconnection post 传参数 中文
- hibernate做HQL根据日期进行聚合搜索出现了问题,求助!
- logic:iterate问题
- jsp分页
- 菜鸟求救struts2的简单问题
- 对于java application(含main方法的class),在war包内怎么通过命令行执行?
- 那位兄弟有下载jdbcodbc桥的驱动程序~!!!!
- 一个JDBC连接SQLSERVER的JSP网页制作问题,请指教
- 在线等:java运行环境如何设置??
- 这个报错要怎么解决,感谢各位大神org.osoa.sca.ServiceRuntimeException: java.lang.reflect.Invocati
- 页面全屏锁键盘的防作弊(应用于在线考试)
- 是struts2实现文件下载问题 在线等
还要导入相关jar包
服务器上找不到的,把要用的jar文件都放在lib下就OK了
页面引用标签用<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
或<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld" %>
都是一样的报上面的错误
web.xml中我是这样配置的:
<jsp-config>
<taglib>
<taglib-uri>http://struts.apache.org/tags-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://struts.apache.org/tags-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://struts.apache.org/tags-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</jsp-config>
引用了strruts标签的JSP页面放在WEB-INF下是可以运行的,但放在WEB-INF的子目录下就不行
<taglib>
<taglib-uri>/WEB-INF/c.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>
<jsp-config>
<taglib>
<taglib-uri>http://jpager.com/taglibs/page(名字可以随便起)</taglib-uri>
<taglib-location>/WEB-INF/tld/jpager.tld(tld的相对路径)</taglib-location
</taglib>
</jsp-config>
然后在jsp页面上添加
<%@ taglib prefix="page(别名)" uri="http://jpager.com/taglibs/page(自己起的名字)" %>