Json传送数据的问题 Sturct2

在做web作业的时候想用json传送数据
server端用的是Java SSH框架,
按照网上的方法使用了eclipse报了这个错:
严重: Servlet.service() for servlet [default] in context with path [/ResearchSys] threw exception [Filter execution threw an exception] with root cause
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at org.apache.struts2.json.SerializationParams.(SerializationParams.java:57)
at org.apache.struts2.json.JSONResult.writeToResponse(JSONResult.java:214)
at org.apache.struts2.json.JSONResult.execute(JSONResult.java:177)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
...

其中struct.xml中是这样写的:
图片说明

Action中是这样写的:
图片说明

jsp的调用如下:
图片说明

想请问一下问题出在哪里。。
如果找不出问题能不能告诉我json应该怎么用,谢谢!

2个回答

recorded_living_tips
recorded_living_tips json串要用输出流输出
4 年多之前 回复

org/apache/commons/lang3/StringUtils没有这个类啊,缺少jar包吧

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问