`
ssydxa219
  • 浏览: 622293 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

struts2上传得不到页面值

 
阅读更多

08:48:09.850 [http-bio-81-exec-7] DEBUG c.o.xwork2.DefaultActionInvocation - Executing action method = upload
08:48:19.824 [http-bio-81-exec-7] ERROR o.a.struts2.dispatcher.Dispatcher - Exception occurred during processing request: null
java.lang.NullPointerException: null
    at java.io.File.<init>(File.java:277) ~[na:1.8.0_20]
    at com.pop.cores.security.action.GroupCtrlAction.upload(GroupCtrlAction.java:101) ~[pop-cores-security-2.0.0-SNAPSHOT.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20]
    at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:325) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:325) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at com.pop.cores.util.interceptor.RequestInterceptor.intercept(RequestInterceptor.java:55) ~[pop-cores-util-2.0.0-SNAPSHOT.jar:na]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ~[xwork-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562) ~[struts2-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) [struts2-core-2.3.16.1.jar:2.3.16.1]
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) [struts2-core-2.3.16.1.jar:2.3.16.1]
    at com.pop.cores.util.fitle.PrepareAndExecuteFilter.doFilter(PrepareAndExecuteFilter.java:72) [pop-cores-util-2.0.0-SNAPSHOT.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.56]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.56]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at com.pop.cores.security.MySecurityFilter.invoke(MySecurityFilter.java:52) [pop-cores-security-2.0.0-SNAPSHOT.jar:na]
    at com.pop.cores.security.MySecurityFilter.doFilter(MySecurityFilter.java:31) [pop-cores-security-2.0.0-SNAPSHOT.jar:na]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:139) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter$$FastClassBySpringCGLIB$$510f8b9a.invoke(<generated>) [spring-core-4.0.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:711) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at com.pop.cores.security.service.impl.MyUsernamePasswordAuthenticationFilterServiceImpl$$EnhancerBySpringCGLIB$$9b05d589.doFilter(<generated>) [spring-core-4.0.3.RELEASE.jar:na]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.56]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.56]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [catalina.jar:7.0.56]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.56]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) [catalina.jar:7.0.56]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [catalina.jar:7.0.56]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.56]
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.56]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.56]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) [catalina.jar:7.0.56]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) [tomcat-coyote.jar:7.0.56]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-coyote.jar:7.0.56]
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-coyote.jar:7.0.56]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.56]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
08:48:19.826 [http-bio-81-exec-7] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
08:48:19.826 [http-bio-81-exec-7] DEBUG o.a.s.d.ng.PrepareOperations - skipping cleanup counter=1

分享到:
评论

相关推荐

    Struts2实现文件上传

    Struts2是一个强大的MVC框架,广泛应用于Java Web开发中,尤其在...总之,Struts2提供的文件上传功能使得在Java Web应用中处理文件上传变得简单而高效。通过合理的配置和编码实践,可以构建稳定、安全的文件上传系统。

    struts2 zip 上传下载

    Java的IO和ZIP库提供了强大的文件操作能力,使得在Struts2框架下实现文件上传和下载功能变得相对简单。 总结来说,Struts2 ZIP文件上传下载涉及到的主要知识点有:Struts2 MVC框架的使用、文件上传与下载的处理、...

    struts 图片上传demo

    2. **配置Struts**:在`struts-config.xml`配置文件中,我们需要声明`MultipartRequestHandler`为默认的请求处理器,这样Struts就能识别并处理文件上传请求。 3. **ActionForm**:在Struts应用中,表单数据通常被...

    struts2 ajax图片上传

    在Struts2中实现Ajax图片上传功能,可以帮助用户在不刷新整个页面的情况下提交图片,提高用户体验。Ajax技术利用JavaScript的XMLHttpRequest对象与服务器进行异步数据交换,使得网页部分更新成为可能。 首先,我们...

    struts2的各种jar包

    10. **插件系统**:Struts2的插件机制使得扩展和定制变得容易,比如Spring插件可以实现依赖注入,i18n插件处理国际化问题。 11. **开发工具集成**:Eclipse、IntelliJ IDEA等IDE都有Struts2的插件,可以帮助开发者...

    Struts2文件上传(二) 深入FileUploadInterceptor

    Struts2 文件上传是Web开发中的一个重要组成部分,它允许用户通过网页上传文件到服务器。在Struts2框架中,文件上传通常涉及到Action类、表单、拦截器(Interceptor)以及配置等多个方面。本文将深入探讨Struts2中的...

    struts2文件上传文档

    2. **Interceptor(拦截器)**:Struts2的拦截器机制使得文件上传变得简单。`FileUploadInterceptor`是一个专门处理文件上传的拦截器,它会检查请求中是否存在文件,并将文件保存到服务器上。 3. **表单设计**:在...

    struts2文件上传

    在Struts2中,文件上传功能是通过`Struts2 MultipartResolver`插件实现的,这个插件使得处理用户上传的图片和其他文件变得简单。下面将详细介绍Struts2文件上传的相关知识点。 **1. MultipartFile接口** 在Struts2...

    struts2(2)PDF

    此外,还能学习到如何使用Struts2的注解简化配置,以及如何进行表单验证和文件上传等常见功能的实现。 总的来说,Struts2框架为Java web开发提供了一种结构化的、可维护的解决方案,它简化了MVC模式的实现,使得...

    struts2.pdf

    ### Struts2框架的核心概念与工作流程 #### Struts2框架简介 Struts2是一个用于构建企业级Java Web应用程序的开源框架,它是Struts1的后续版本,同时也是Apache Struts项目的一部分。相比于Struts1,Struts2采用了...

    Struts2Jar

    在Struts2中,它使得上传文件到服务器变得简单和可靠。 这些jar文件的组合为开发者提供了完整的Struts2框架环境,可以用来快速构建基于Java的Web应用,而无需关注底层的实现细节。然而,由于缺少Hibernate和Spring...

    struts2带进度条的异步上传

    1. **Struts2.2.3**:这是Struts2的一个版本,它支持Action和Result的注解,增强了对RESTful风格的支持,以及对JSON的处理能力,这使得异步通信变得更加方便。 2. **JSON(JavaScript Object Notation)**:这是一...

    struts2 uploadify 上传图片

    在Struts2中集成Uploadify,可以创建一个强大的图片上传系统,允许用户方便地上传图片到服务器,并将这些图片保存到指定的路径。以下是关于如何实现这个功能的详细步骤和关键知识点: 1. **环境准备**: - 首先...

    struts 2 文件上传 (新手必看)

    Struts 2提供了许多特性,如拦截器、结果类型、动态方法调用等,使得文件上传变得相对简单。 2. **前端表单设计** 要实现文件上传,首先需要在HTML页面上创建一个`&lt;form&gt;`标签,并设置`enctype`属性为`multipart/...

    Struts2DesignAndProgramming

    - **视图技术**:Struts2支持多种视图技术,包括但不限于JSP、Freemarker、Velocity等。 #### 五、Struts2的优势与应用场景 - **易于集成**:Struts2可以轻松与其他Java框架(如Spring、Hibernate)集成,形成完整...

    struts文件上传大小限制

    - `struts.action.extension`: 这个配置项虽然不直接与文件大小限制相关,但用于指定可接受的Action扩展名,确保文件上传请求被正确处理。 2. **Action类中的配置** 在Action类上使用注解`@FileSize`和`@...

    struts2入门的学习资料.pdf

    例如,Struts2提供了Result类型如`redirectAction`和`dispatcher`,使得跳转到不同的页面进行显示、更新或删除操作变得简单。 4. **新表单标志的使用**: - Struts2支持多种表单标签,如`s:textfield`, `s:...

    struts2文件上传与下载

    在Struts2框架中,文件上传与下载变得异常简单且高效,极大地提高了开发效率。本文将详细介绍Struts2框架中文件上传与下载的具体实现过程及其背后的技术原理。 #### 二、文件上传 ##### 2.1 文件上传的基本流程 在...

    struts2+dwr上传带进度条监控

    按一秒钟循环访问一个方法去取上传进度的相关数据显示到页面上就行了 不过目前没有做上传中途取消功能和断电续传 也没有什么思路和时间去研究了 有时间再说吧 或者谁会弄得话 可以传上来一起研究研究 呵呵

Global site tag (gtag.js) - Google Analytics