Struts中应用Struts-menu的简单例子

来源:互联网 发布:开网店 知乎 编辑:程序博客网 时间:2024/05/03 14:55

具体步骤如下:

使用Struts-blank生成空的Struts项目,将Struts-menu引入到该项目中:

引入struts-menu2.3.jar文件到lib目录下,引入struts-menu.tldWEB-INF目录下,将struts-menu.war中的images、scripts和styles三个目录拷贝到web应用相应的目录下

 

错误1

  • "rolesMenu.jsp": org.apache.jasper.JasperException: file:D:/liuhe/project/SmsProject/smsapp/tiles/rolesMenu.jsp(1,1) File "/taglibs.jsp" not found

 

  • "rolesMenu.jsp": org.apache.jasper.JasperException: file:D:/liuhe/project/SmsProject/smsapp/tiles/rolesMenu.jsp(1,1) The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application

解决方法:

taglibs.jsp文件引入了JSP中所有用到的taglib,其中的uri属性应该与web.xml文件中声明的<taglib-uri>一致。

另外,将<%@ include file="/taglibs.jsp"%>修改为<%@ include file="taglibs.jsp"%>

 

Make即可成功运行,但是没有达到预期的显示效果?分析可能是CSSJS没有成功引入到JSP中,导致的显示问题。哪位能够给予指教,谢谢!!

转自:http://blog.csdn.net/taiyangdao/archive/2005/08/21/460921.aspx

 
原创粉丝点击