Author: ndkhoiits
Date: 2010-11-29 06:40:57 -0500 (Mon, 29 Nov 2010)
New Revision: 5350
Modified:
portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
Log:
GTNPORTAL-1701 FilterDefinition match the patterns properly
Modified:
portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29
11:36:41 UTC (rev 5349)
+++
portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29
11:40:57 UTC (rev 5350)
@@ -99,7 +99,10 @@
public void doFilter(ServletRequest request, ServletResponse response) throws
IOException, ServletException
{
- String path = ((HttpServletRequest)request).getRequestURI();
+ HttpServletRequest req = (HttpServletRequest) request;
+ String regex = "[/]*" + req.getContextPath() + "[/]*";
+ String path = req.getRequestURI().replaceFirst(regex, "/");
+
while (filters.hasNext())
{
FilterDefinition filterDef = filters.next();
Show replies by date