Struts2 appears at Com.opensymphony.xwork2.util.filemanager$filerevision.needsreloading (filemanager.java:20.

Source: Internet
Author: User
Tags addchild

Watch the video today see struts2 in the configuration file in the future as long as you add the following configuration, then modify the configuration file later without restarting the Tomcat method. So I tried it by hand, I didn't think it was a test.

The code to add:

[XHTML]View Plaincopyprint?
    1. <constant name="Struts.devmode" value="true" />

<constant name= "Struts.devmode" value= "true"/>

Struts.devmode is the development mode of struts, the default value is False, here is modified to true, and once the configuration in this file does not have to restart Tomcat, it is really convenient. But the problem also arises:

[C-sharp]View Plaincopyprint?
  1. Severity: Exception Starting filter Struts2
  2. Java.lang.NullPointerException
  3. At Com.opensymphony.xwork2.util.filemanager$filerevision.needsreloading (filemanager.java:209)
  4. At Com.opensymphony.xwork2.util.FileManager.fileNeedsReloading (filemanager.java:60)
  5. At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload (Xmlconfigurationprovider.java : 325)
  6. At Org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload (strutsxmlconfigurationprovider.java:168 )
  7. At Com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload (configurationmanager.java:220)
  8. At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:61)
  9. At Org.apache.struts2.dispatcher.Dispatcher.getContainer (dispatcher.java:774)
  10. At Org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader (initoperations.java:77)
  11. At Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( STRUTSPREPAREANDEXECUTEFILTER.JAVA:49)
  12. At Org.apache.catalina.core.ApplicationFilterConfig.getFilter (applicationfilterconfig.java:275)
  13. At Org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (applicationfilterconfig.java:397)
  14. At Org.apache.catalina.core.applicationfilterconfig.<init> (applicationfilterconfig.java:108)
  15. At Org.apache.catalina.core.StandardContext.filterStart (standardcontext.java:3800)
  16. At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4450)
  17. At Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:791)
  18. At Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:771)
  19. At Org.apache.catalina.core.StandardHost.addChild (standardhost.java:526)
  20. At Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:987)
  21. At Org.apache.catalina.startup.HostConfig.deployDirectories (hostconfig.java:909)
  22. At Org.apache.catalina.startup.HostConfig.deployApps (hostconfig.java:495)
  23. At Org.apache.catalina.startup.HostConfig.start (hostconfig.java:1206)
  24. At Org.apache.catalina.startup.HostConfig.lifecycleEvent (hostconfig.java:314)
  25. At Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (lifecyclesupport.java:119)
  26. At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1053)
  27. At Org.apache.catalina.core.StandardHost.start (standardhost.java:722)
  28. At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1045)
  29. At Org.apache.catalina.core.StandardEngine.start (standardengine.java:443)
  30. At Org.apache.catalina.core.StandardService.start (standardservice.java:516)
  31. At Org.apache.catalina.core.StandardServer.start (standardserver.java:710)
  32. At Org.apache.catalina.startup.Catalina.start (catalina.java:583)
  33. At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  34. At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
  35. At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
  36. At Java.lang.reflect.Method.invoke (method.java:597)
  37. At Org.apache.catalina.startup.Bootstrap.start (bootstrap.java:288)
  38. At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:413)
  39. 2010-3-1 22:26:44 org.apache.catalina.core.StandardContext Start
  40. Severity: Error filterstart

Severity: Exception starting filter Struts2java.lang.NullPointerExceptionat com.opensymphony.xwork2.util.filemanager$ Filerevision.needsreloading (filemanager.java:209) at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading (filemanager.java:60) at Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload ( xmlconfigurationprovider.java:325) at Org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload ( strutsxmlconfigurationprovider.java:168) at Com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload (configurationmanager.java:220) at Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:61) at Org.apache.struts2.dispatcher.Dispatcher.getContainer (dispatcher.java:774) at Org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader (initoperations.java:77) at Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init (Strutsprepareandexecutefilter.java : +) at Org.apache.catalina.core.ApplicaTionfilterconfig.getfilter (applicationfilterconfig.java:275) at Org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (applicationfilterconfig.java:397) at Org.apache.catalina.core.applicationfilterconfig.<init> (applicationfilterconfig.java:108) at Org.apache.catalina.core.StandardContext.filterStart (standardcontext.java:3800) at Org.apache.catalina.core.StandardContext.start (standardcontext.java:4450) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:791) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:771) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:526) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:987) at Org.apache.catalina.startup.HostConfig.deployDirectories (hostconfig.java:909) at Org.apache.catalina.startup.HostConfig.deployApps (hostconfig.java:495) at Org.apache.catalina.startup.HostConfig.start (hostconfig.java:1206) at Org.apache.catalina.startup.HostConfig.lifecycleEvent (Hostconfig.java:314) at Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (lifecyclesupport.java:119) at Org.apache.catalina.core.ContainerBase.start (containerbase.java:1053) at Org.apache.catalina.core.StandardHost.start (standardhost.java:722) at Org.apache.catalina.core.ContainerBase.start (containerbase.java:1045) at Org.apache.catalina.core.StandardEngine.start (standardengine.java:443) at Org.apache.catalina.core.StandardService.start (standardservice.java:516) at Org.apache.catalina.core.StandardServer.start (standardserver.java:710) at Org.apache.catalina.startup.Catalina.start (catalina.java:583) at Sun.reflect.NativeMethodAccessorImpl.invoke0 ( Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (DELEGATINGMETHODACCESSORIMPL.JAVA:25) at Java.lang.reflect.Method.invoke (method.java:597) at Org.apache.catalina.startup.Bootstrap.start (Bootstrap.java : 288) at Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:413) 2010-3-1 22:26:44 org.apache.catalina.core.StandardContext start severity: Error filterstart

After Google a search, said will <constant name= "Struts.devmode" value= "true"/> in the value to False, I want to be true, changed to false not against my intention, Later, after several searches, it was said that the Bug,tomcat directory belonging to struts2.1 could not have spaces. I look closely at my Tomcat path, and there really are spaces ...

Finally, it is possible to find this method by modifying the path itself.

Struts2 appears at Com.opensymphony.xwork2.util.filemanager$filerevision.needsreloading (filemanager.java:20.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.