eclipse配置struts总是不行

fudali_doob 天健 全栈开发  2015-10-22 03:04:44
严重: Failed to open access log file [/home/fudali/xuexi/apache-tomcat-8.0.28/logs/localhost_access_log.2015-10-22.txt]
java.io.FileNotFoundException: /home/fudali/xuexi/apache-tomcat-8.0.28/logs/localhost_access_log.2015-10-22.txt (权限不够)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.apache.catalina.valves.AccessLogValve.open(AccessLogValve.java:579)
at org.apache.catalina.valves.AccessLogValve.startInternal(AccessLogValve.java:609)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:170)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:930)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)




严重: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.
filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4583)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
...全文
109 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
fudali_doob 2015-10-22
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng. filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <!-- 让Struts 2的核心Filter拦截所有请求 --> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <!--<constant name="struts.enable.DynamicMethodInvocation" value="false" /> <constant name="struts.devMode" value="true" /> <constant name="struts.custom.i18n.resources" value="mess"/> <constant name="struts.enable.DynamicMethodInvocation" value="false"/> <package name="default" namespace="/" extends="struts-default"> --> <package name="login" extends="struts-ddefault"> <action name="loginUser" class="fy.action.user.UserAction"> <result name="success">/WEB-INF/content/success.jsp</result> <result name="error">/WEB-INF/content/error.jsp</result> </action> </package> </struts> 这是我的配置文件
回复
fudali_doob 2015-10-22
引用 4 楼 u012743772 的回复:
java.io.FileNotFoundException,是你的Struts文件找不到 你把你配置中org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 按住Ctrl键 看能不能点进去。。。
没明白什么意思
回复
u012743772 2015-10-22
java.io.FileNotFoundException,是你的Struts文件找不到 你把你配置中org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 按住Ctrl键 看能不能点进去。。。
回复
fudali_doob 2015-10-22
引用 2 楼 xiesq5112 的回复:
严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2中StrutsPrepareAndExecuteFilter 异常如果是2.1.3之前的版本用org.apache.struts2.dispatcher.FilterDispatcher,否则用org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。 因为从Struts2.1.3开始,将废弃ActionContextCleanUp过滤器,而在StrutsPrepareAndExecuteFilter过滤器中包含相应的功能。在web.xml中做修改红色字体部分 <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
我就是这样子配置的啊
回复
心随自在飞 2015-10-22
严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2中StrutsPrepareAndExecuteFilter 异常如果是2.1.3之前的版本用org.apache.struts2.dispatcher.FilterDispatcher,否则用org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。 因为从Struts2.1.3开始,将废弃ActionContextCleanUp过滤器,而在StrutsPrepareAndExecuteFilter过滤器中包含相应的功能。在web.xml中做修改红色字体部分 <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
回复
fudali_doob 2015-10-22
请大神们帮我指点指点吧,都在这里卡了好久了
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2015-10-22 03:04
社区公告
暂无公告