Home > Back-end >  Instantiated struts 2 ActionSupport cannot getText
Instantiated struts 2 ActionSupport cannot getText

Time:09-16

I'm in the code, ActionSupport support=new ActionSupport (); Instantiate a ActionSupport, use it to getText throws an exception, not the right to get to the internationalization of text, but there's no way to pass a ActionSupport come over again, consult everybody, how to do this?

CodePudding user response:

The exception thrown:
Java. Lang. NullPointerException
At com. Opensymphony. Xwork2. ActionSupport. GetLocale (ActionSupport. Java: 64)
At com. Opensymphony. Xwork2. TextProviderSupport. GetLocale (TextProviderSupport. Java: 329)
At com. Opensymphony. Xwork2. TextProviderSupport. GetText (TextProviderSupport. Java: 204)
At com. Opensymphony. Xwork2. TextProviderSupport. GetText (TextProviderSupport. Java: 119)
At com. Opensymphony. Xwork2. ActionSupport. GetText (ActionSupport. Java: 82)
At sun. Reflect. NativeMethodAccessorImpl. Invoke0 (Native Method)
At sun. Reflect. NativeMethodAccessorImpl. Invoke (Unknown Source)
At sun. Reflect. DelegatingMethodAccessorImpl. Invoke (Unknown Source)
The at Java. Lang. Reflect. Method. Invoke (Unknown Source)
The at ognl. OgnlRuntime. InvokeMethod (OgnlRuntime. Java: 873)
The at ognl. OgnlRuntime. CallAppropriateMethod (OgnlRuntime. Java: 1539)
The at ognl. ObjectMethodAccessor. CallMethod (ObjectMethodAccessor. Java: 68)
At com. Opensymphony. Xwork2. Ognl. Accessor. XWorkMethodAccessor. CallMethodWithDebugInfo (XWorkMethodAccessor. Java: 96)
At com. Opensymphony. Xwork2. Ognl. Accessor. XWorkMethodAccessor. CallMethod (XWorkMethodAccessor. Java: 88)
The at ognl. OgnlRuntime. CallMethod (OgnlRuntime. Java: 1615)
The at ognl. ASTMethod. GetValueBody (ASTMethod. Java: 91)
The at ognl. SimpleNode. EvaluateGetValueBody (SimpleNode. Java: 212)
The at ognl. SimpleNode. GetValue (SimpleNode. Java: 258)
The at ognl. Ognl. GetValue (ognl. Java: 467)
The at ognl. Ognl. GetValue (ognl. Java: 431)
At com. Opensymphony. Xwork2. Ognl. OgnlUtil $3. The execute (OgnlUtil. Java: 351)
At com.opensymphony.xwork2.ognl.OgnlUtil.com pileAndExecuteMethod OgnlUtil. Java: (403)
At com. Opensymphony. Xwork2. Ognl. OgnlUtil. CallMethod (OgnlUtil. Java: 349)
At com. Opensymphony. Xwork2. DefaultActionInvocation. InvokeAction (DefaultActionInvocation. Java: 436)
At com. Opensymphony. Xwork2. DefaultActionInvocation. InvokeActionOnly (DefaultActionInvocation. Java: 291)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 252)
At org, apache struts 2) interceptor) was debugging. DebuggingInterceptor. Intercept (DebuggingInterceptor. Java: 253)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
At com. Opensymphony. Xwork2. Interceptor. DefaultWorkflowInterceptor. DoIntercept (DefaultWorkflowInterceptor. Java: 177)
At com. Opensymphony. Xwork2. Interceptor. MethodFilterInterceptor. Intercept (MethodFilterInterceptor. Java: 98)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
At com. Opensymphony. Xwork2. The validator. ValidationInterceptor. DoIntercept (ValidationInterceptor. Java: 260)
The at org, apache struts 2. Interceptor. Validation. AnnotationValidationInterceptor. DoIntercept (AnnotationValidationInterceptor. Java: 73)
At com. Opensymphony. Xwork2. Interceptor. MethodFilterInterceptor. Intercept (MethodFilterInterceptor. Java: 98)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
At com. Opensymphony. Xwork2. Interceptor. ConversionErrorInterceptor. DoIntercept (ConversionErrorInterceptor. Java: 139)
At com. Opensymphony. Xwork2. Interceptor. MethodFilterInterceptor. Intercept (MethodFilterInterceptor. Java: 98)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
At com. Opensymphony. Xwork2. Interceptor. ParametersInterceptor. DoIntercept (ParametersInterceptor. Java: 133)
At com. Opensymphony. Xwork2. Interceptor. MethodFilterInterceptor. Intercept (MethodFilterInterceptor. Java: 98)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
At com. Opensymphony. Xwork2. Interceptor. ParametersInterceptor. DoIntercept (ParametersInterceptor. Java: 133)
At com. Opensymphony. Xwork2. Interceptor. MethodFilterInterceptor. Intercept (MethodFilterInterceptor. Java: 98)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
At com. Opensymphony. Xwork2. Interceptor. StaticParametersInterceptor. Intercept (StaticParametersInterceptor. Java: 192)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
The at org, apache struts 2. Interceptor. MultiselectInterceptor. Intercept (MultiselectInterceptor. Java: 69)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
The at org, apache struts 2. Interceptor. DateTextFieldInterceptor. Intercept (DateTextFieldInterceptor. Java: 115)
At com. Opensymphony. Xwork2. DefaultActionInvocation. Invoke (DefaultActionInvocation. Java: 247)
The at org, apache struts 2. Interceptor. CheckboxInterceptor. Intercept (CheckboxInterceptor. Java: 88)
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related