我使用我的自定义模板(.properties)在ATG中创建了REST,其中参数通过url(查询字符串)传递。现在,我需要在请求正文中创建带有参数的REST。有可能吗?
我所拥有的例子:
myTemplate.properties
$class=atg.repository.seo.IndirectUrlTemplate
urlTemplateFormat=/rest/service/it/app/webservices/getProductInfo/{IdProd}
indirectRegex=.*/rest/service/it/app/webservices/getProductInfo/([^/].*?)
regexElementList=IdProd|string
forwardUrlTemplateFormat=/restApp/getProductInfo.jsp?IdProd\={IdProd}
webAppRegistry=/atg/registry/WebApplicationRegistry
getProductInfo.jsp
...
<dsp:getvalueof var="IdProd" param="IdProd" />
<%-- WORK WITH IdProd-->
...
在这种情况下,我这样拨打服务:
https://mydomain.it/rest/service/it/app/webservices/getProductInfo/eProd192005087
现在,我希望将参数放置在请求正文中,因为我想要多个产品的列表。 可能吗? 我应该如何转换myTemplate.properties? 以及如何在我的JSP页面中使用该列表?
非常感谢。