<%@ taglib prefix="s" uri="/struts-tags"%>
出现的一些问题:
1、Cannot find the tag library descriptor for "/struts-tags"
2、org.apache.jasper.JasperException: File "/struts-tags" not found
原因:缺少jar包
只要把struts2相关的几个lib放在你工程的WEB-INF/lib/下面就可以了.
如:struts2-core-2.0.11.1.jar ognl-2.6.11.jar oro-2.0.8.jar freemarker-2.3.8.jar struts-core-1.3.5.jar 等等
@taglib表明引用标签。
类似java中的import语句 prefix="s" 引用的名称在页面可以使用,就像java中生成的一个对象名,
以后调用的时候直接使用<s:xxx/>就可以了 uri="/struts-tags"%表示标签库的路径。
相当于import一个具体的类~