File "/struts-tags" not found
来源:互联网 发布:java 弹出路径框 编辑:程序博客网 时间:2024/05/09 08:47
最近用struts2标签开发jsp,有些页面就出现File "/struts-tags" not found的异常,做了一下实验,只要在struts.xml文件中注册一个action就可以了(需要先写个Action类),小编猜想struts2标签要和struts2框架有一定的联系。如果这时候还不能解决问题,那得修改一下server的server locations,将其选到第二项Use tomcat installation。具体方法:正在使用中的server其server locations是灰色的,不能选择,要将server上的project全部移除,然后c右键clean一下,这样就能重新选择了,选择后别忘了保存。
另外在查找资料的过程中发现另外一个解决方法,如下:
其实java里的东西真是不少,由于开源,是的个个环节都有好多可供选择的东西,而个个公司用到的都可能不同,是的程序员们需要学习同一环节的不同产品,应用服务器也是一样,什么tomcat ,weblogic等等。以至于有些东西无法深入了解。
今天遇到一个tomcat的部署的问题,问题根源在于server.xml 的配置里。
错误如标题,说/struts-tags not found ,几经查找测试,程序并没有错误,struts 的core 包也存在,路径都没错,后来和旧的测试服务器上一对比server.xml文件,发现了差异。
新的server.xml 配置对Host 以及其内的Context 是如下配置的:
<Host name="localhost" appBase="/var/local/apps/myapp" .....>
<Context path="" docBase="." reloadable="false"/>
</Host>
而新的配置里没有<Context ...>
<Host name="localhost" appBase="/var/local/apps" .....>
</Host>
测试中是这样访问应用的:http://localhost:8080/myapp
而新部署的访问方式为:http://10.10.10.20:8080 ,没有应用名。如此的确是可以访问,但直接访问jsp页面时(为经过action的跳转),就出现了如题所示的错误。
后来改成如下形式,就没报错了,访问地址也无需变更:
<Host name="localhost" appBase="/var/local/apps" .....>
<Context path="" docBase="myapp" reloadable="false"/>
</Host>
- File "/struts-tags" not found
- struts2 jsp File "/struts-tags" not found
- 项目部署到外网发生File "/struts-tags" not found错误
- 项目部署到外网发生File "/struts-tags" not found错误
- tomcat部署 struts2 File "/struts-tags" not found
- File "/tags/struts-tiles" not found或java.lang.ClassNotFoundException: org.apache.struts.taglib.tile
- org.apache.jasper.JasperException: File "/struts-tags" not found本地没问题但上传上去就报错
- j2ee中,url直接进入jsp页面,提示File "/struts-tags" not found
- eclipse关于"/struts-tags" not found错误的最新解决方法
- /WEB-INF/tags" not found
- 有关struts2日历控件的小问题,struts-dojo-tags not found
- struts2 标签库 /struts-dojo-tags not found&Expression parameters.parseContent is undefined
- 'cassert' file not found
- 'cmath' file not found
- LINK1104:File not found
- file not found
- File Not Found
- 'string' file not found
- servlet3.1规范翻译:第1章 概述
- HDOJ2044 一只小蜜蜂(2阶斐波那契数列题)
- 关于Struts has detected an unhandled exception这个异常
- 新笑话。
- mysql的limit offset后面不能跟变量 只能硬编码数字的问题
- File "/struts-tags" not found
- Windows Store apps开发[65]Windows 8 开发31日-第08日-本地和漫游数据
- Flex 获取系统字体
- oracle 函数学习一(数值型函数)
- android adb shell 命令大全
- 一个写得非常不错的俄罗斯广块的实现。
- Flex 圆角效果
- 各种浏览器的Hack写法(chrome firefox ie等)
- IndexOf、LastIndexOf、Substring的用法