Author: ndkhoiits
Date: 2010-11-29 06:36:41 -0500 (Mon, 29 Nov 2010)
New Revision: 5349
Modified:
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
Log:
EXOGTN-195 FilterDefinition match the patterns properly
Modified:
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
===================================================================
---
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29
11:15:53 UTC (rev 5348)
+++
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-11-29
11:36:41 UTC (rev 5349)
@@ -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