斯柯云 斯柯云
关注数: 22 粉丝数: 69 发帖数: 3,416 关注贴吧数: 24
有木有人?求教一个问题,在线帮忙解答啊。急死了,灰常感谢 问题描述:我在写一个上传文件的web项目,这段是后台的java处理代码: public String execute() throws Exception { // TODO Auto-generated method stub String targetDirectory = context.getRealPath("/"); System.out.println(targetDirectory); String lsTarget=targetDirectory+"upload"; File dirFile = new File(lsTarget); if(!dirFile.exists()){ //file.createNewFile(); System.out.println("开始创建"); dirFile.mkdirs(); if(!dirFile.exists()){ System.out.println("没创建成功"); } }else{ System.out.println("已经存在"); } targetDirectory = lsTarget; System.out.println(targetDirectory); String targetFileName = ufileFileName; File target = new File(targetDirectory, targetFileName); FileUtils.copyFile(ufile, target); return SUCCESS; } 这个本来是成功的,第一次上传一个文件,成功了,但是第二次上传另外的文件会报错,报错的内容是: 六月 18, 2014 6:36:37 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Removing file ufile B:\TomCat\install-TomCat\work\Catalina\localhost\load\upload__41d8137_146acc42c9a__7fea_00000001.tmp 六月 18, 2014 6:36:53 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn 警告: Could not find action or result There is no Action mapped for namespace /upload and action name . - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:475) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:744) 感谢大神们解答啊,急死了
问题:安装g++的问题 在安装g++的时候,我用yum install gcc-c++怎么接下来出现的是这样 [root@localhost yc]# yum install gcc-c++ http://tieba.baidu.com/mo/q/checkurl?url=ftp%3A%2F%2Fmirrors.kernel.org%2Ffedora.us%2Ffedora%2Ffedora%2F1%2Fi386%2Fyum%2Fos%2Frepodata%2Frepomd.xml%3A&urlrefer=449ab20d015905de5003072a33b2f932 [Errno 14] FTP Error 550 - Server denied you to change to the given directory 正在尝试其它镜像。 One of the configured repositories failed (Fedora Core 1 -- Fedora US mirror), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Disable the repository, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable fedora-us-1 4. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=fedora-us-1.skip_if_unavailable=true failure: repodata/repomd.xml from fedora-us-1: [Errno 256] No more mirrors to try. http://tieba.baidu.com/mo/q/checkurl?url=ftp%3A%2F%2Fmirrors.kernel.org%2Ffedora.us%2Ffedora%2Ffedora%2F1%2Fi386%2Fyum%2Fos%2Frepodata%2Frepomd.xml%3A&urlrefer=449ab20d015905de5003072a33b2f932 [Errno 14] FTP Error 550 - Server denied you to change to the given directory 这是什么意思阿?
1 下一页