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

本文记录了在配置Struts2框架过程中遇到的子目录jspFile路径错误问题,并详细介绍了如何通过调整Tomcat的server.xml配置文件来解决该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

2009-05-24 17:20

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="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>

 引用资料网址:http://hdxiong.iteye.com/blog/370969

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值