Hi,
According to the request-map below the redirect will be to the category
view. This view is defined as part of the OFBiz ecommerce project. One
of the many scripts run by this view is categorydetail.bsh. I have added
the following lines to this script, but by all accounts something is
lacking, most probably knowledge.
Can someone please explain to me why my request attribute
(otaHotelAvailRSDocument) is getting lost.
<request-map uri="otasearch">
<security https="false" auth="false"/>
<event type="java"
path="com.gat.search.service.product.ota.ProductSearchSession"
invoke="search"/>
<response name="success" type="view" value="category"/>
<response name="none" type="none" value=""/>
</request-map>
ProductSearchSession.search(HttpServletRequest request,
HttpServletResponse response) {
.......
request.setAttribute("otaHotelAvailRSDocument",
otaHotelAvailRSDocument);
.........
String requestName = "/category/~category_id=" + categoryId;
String target = rh.makeLink(request, response, requestName, false,
false, false);
........
try {
response.sendRedirect(target);
return "none";
} catch (IOException e) {
Debug.logError(e, "Could not send redirect to: " + target,
module);
}
}
categorydetail.bsh --->
otaHotelAvailRSDocument = request.getAttribute("otaHotelAvailRSDocument");
if (otaHotelAvailRSDocument == null) {
System.out.println("---request----> otaHotelAvailRSDocument is
NULL");
} else {
System.out.println("---request----> otaHotelAvailRSDocument is NOT
NULL");
}
---request----> otaHotelAvailRSDocument is NULL
Kind regards
Grant Edwards