我有一个模拟响应,需要返回请求中的值.例如,此请求可以包含:
<myReqest><myValue>123</myValue></myRequest>
Run Code Online (Sandbox Code Playgroud)
我已经有了一个mockResponse:
<myResponse><yourValue>${theValue}</yourValue></myResponse>
Run Code Online (Sandbox Code Playgroud)
我知道如何通过上下文变量设置$ {theValue}的值,但我无法弄清楚如何访问请求并解析它的值.
任何帮助将非常感激.
谢谢,强尼
Struts 1.x中是否存在可配置的方式,因此我的操作类仅在HTTP'POST'上执行.
我知道我可以request.getMethod()在我的动作类中使用,然后根据它做某些"东西".
此致,乔纳森