`
adm889486
  • 浏览: 37051 次
  • 性别: Icon_minigender_1
  • 来自: 绵阳
社区版块
存档分类
最新评论

org.apache.jasper.JasperException: File "/struts-tags" not found

阅读更多
org.apache.jasper.JasperException: File "/struts-tags" not found
struts2 子目录jsp File "/struts-tags" not found,根目录就没错

今天在做Struts2配置时,出了这样的错误.
先前按照
<jsp-config>
<taglib>
<taglib-uri>/struts-tags</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>
</jsp-config>
这种方式把配置访导入也没有用.
查了资料原来是和tomcat配置有关.
以下配置配置在</host>后面
我配置在tomcat server.xml是这样的
<Host name="bbb" appBase="D:\workspace\webManageSystem\WebContent"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>test.com</Alias>
<Context path="/" docBase="D:\workspace\webManageSystem\WebContent" reloadable="true"
caseSensitive="false" debug="0"></Context>
</Host>

改成以下则成功
    <Host name="bbb" appBase="D:\workspace\webManageSystem\"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>test.com</Alias>
<Context path="/" docBase="WebContent" reloadable="true"
caseSensitive="false" debug="0"></Context>
</Host>
注:以上配置会让tomcat两次加载web.xml文件.如果配置了数据连接池的话,会出现打开两倍数据连接池的问题.
所以最好还是改成:
<Host name="webGame" appBase=""
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Alias>127.0.0.1</Alias>
<Context path="/" docBase="E:\workspace0\webGame\WebRoot" reloadable="true"
caseSensitive="false" debug="0"></Context>
</Host>
分享到:
评论
1 楼 tangzlboy 2012-03-21  

相关推荐

Global site tag (gtag.js) - Google Analytics