Permalink
Browse files

Still not sure why Eclipse complained about

request.getSession().getServletContext()).getContextPath()

anyway
request.getContextPath()
is enough

see bottom of oracle.com/javaee/6/api/javax/servlet/ServletContext.html#method_detail

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1449290 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent edd7ff5 commit ddc7b6d066d22c3deece40fe46c452d2ec01e9bc @JacquesLeRoux JacquesLeRoux committed Feb 23, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java
@@ -35,9 +35,9 @@
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.StringUtil.StringWrapper;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.StringUtil.StringWrapper;
import org.ofbiz.common.UrlServletHelper;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
@@ -342,7 +342,7 @@ public static String makeCategoryUrl(HttpServletRequest request, String previous
GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), true);
CategoryContentWrapper wrapper = new CategoryContentWrapper(productCategory, request);
List<String> trail = CategoryWorker.getTrail(request);
- return makeCategoryUrl(delegator, wrapper, trail, request.getSession().getServletContext().getContextPath(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
+ return makeCategoryUrl(delegator, wrapper, trail, request.getContextPath(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
} catch (GenericEntityException e) {
Debug.logWarning(e, "Cannot create category's URL for: " + productCategoryId, module);
return redirectUrl;
@@ -417,7 +417,7 @@ public static String makeProductUrl(HttpServletRequest request, String previousC
GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true);
ProductContentWrapper wrapper = new ProductContentWrapper(product, request);
List<String> trail = CategoryWorker.getTrail(request);
- url = makeProductUrl(delegator, wrapper, trail, request.getSession().getServletContext().getContextPath(), previousCategoryId, productCategoryId, productId);
+ url = makeProductUrl(delegator, wrapper, trail, request.getContextPath(), previousCategoryId, productCategoryId, productId);
} catch (GenericEntityException e) {
Debug.logWarning(e, "Cannot create product's URL for: " + productId, module);
return redirectUrl;

0 comments on commit ddc7b6d

Please sign in to comment.