[mycontainer] r830 committed - [No log message]

0 views
Skip to first unread message

mycon...@googlecode.com

unread,
Jun 25, 2011, 3:09:27 PM6/25/11
to mycontain...@googlegroups.com
Revision: 830
Author: fuw...@gmail.com
Date: Sat Jun 25 12:08:32 2011
Log: [No log message]
http://code.google.com/p/mycontainer/source/detail?r=830

Added:

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/http

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/http/hook

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/http/hook/HookFilter.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/HookFilterTest.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookDouble.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookFilter.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookReply.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookSquare.java
Deleted:

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/request
Modified:

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/BasicChain.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/BasicRequestService.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Chain.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Hook.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Request.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/RequestService.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Response.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/BasicRequestServiceTest.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/TestHookDouble.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/TestHookReply.java

/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/TestHookSquare.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/ServletUtil.java

/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/webapp/WEB-INF/web.xml

=======================================
--- /dev/null
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/http/hook/HookFilter.java
Sat Jun 25 12:08:32 2011
@@ -0,0 +1,73 @@
+package org.mycontainer.commons.servlet.http.hook;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.RequestService;
+import org.mycontainer.commons.http.hook.Response;
+import org.mycontainer.commons.io.IOUtil;
+import org.mycontainer.commons.servlet.ServletUtil;
+
+public class HookFilter implements Filter {
+
+ protected RequestService service;
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ Request req = parse((HttpServletRequest) request);
+ Response resp = service.invoke(req);
+ write(resp, (HttpServletResponse) response);
+ }
+
+ public static void write(Response resp, HttpServletResponse response) {
+ Integer code = resp.getCode();
+ if (code != null) {
+ response.setStatus(code);
+ }
+ ServletUtil.setHeaders(response, resp.getHeaders());
+ Object content = resp.getContent();
+ if (content == null) {
+ return;
+ }
+ if (content instanceof char[]) {
+ ServletUtil.write(response, (char[]) content);
+ } else if (content instanceof byte[]) {
+ ServletUtil.write(response, (byte[]) content);
+ } else {
+ String c = content.toString();
+ char[] array = c.toCharArray();
+ ServletUtil.write(response, array);
+ }
+ }
+
+ public static Request parse(HttpServletRequest request) {
+ try {
+ Request req = new Request();
+ req.setMethod(req.getMethod()).setUri(request.getRequestURI());
+ ServletUtil.getHeaders(req.getHeaders(), request);
+ ServletUtil.getParameters(req.getQueryString(), request);
+ req.setContent(IOUtil.readAll(request.getInputStream()));
+ return req;
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void destroy() {
+
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/HookFilterTest.java
Sat Jun 25 12:08:32 2011
@@ -0,0 +1,81 @@
+package org.mycontainer.commons.servlet.http.hook;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Random;
+
+import javax.naming.InitialContext;
+
+import org.eclipse.jetty.server.session.HashSessionIdManager;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mycontainer.commons.httpclient.RequestMethod;
+import org.mycontainer.commons.httpclient.WebClient;
+import org.mycontainer.commons.httpclient.WebRequest;
+import org.mycontainer.commons.httpclient.WebResponse;
+import org.mycontainer.commons.io.IOUtil;
+import org.mycontainer.kernel.ShutdownCommand;
+import org.mycontainer.kernel.boot.ContainerBuilder;
+import org.mycontainer.web.ContextWebServer;
+import org.mycontainer.web.FilterDesc;
+import org.mycontainer.web.jetty.JettyServerDeployer;
+
+public class HookFilterTest {
+
+ protected TestHookFilter filter;
+
+ @Before
+ public void boot() throws Exception {
+ ContainerBuilder builder = new ContainerBuilder();
+ builder.deployVMShutdownHook();
+
+ JettyServerDeployer webServer = builder
+ .createDeployer(JettyServerDeployer.class);
+ webServer.bindPort(8380);
+ webServer.getServer().setSessionIdManager(
+ new HashSessionIdManager(new Random()));
+ webServer.setName("WebServer");
+
+ ContextWebServer webContext = webServer.createContextWebServer();
+ webContext.setContext("/jseng");
+ filter = new TestHookFilter();
+ webContext.getFilters().add(new FilterDesc(filter, "/*"));
+
+ webServer.deploy();
+ }
+
+ @After
+ public void shutdown() throws Exception {
+ ShutdownCommand shutdown = new ShutdownCommand();
+ shutdown.setContext(new InitialContext());
+ shutdown.shutdown();
+ }
+
+ public WebClient createClient() {
+ WebClient ret = new WebClient();
+ ret.setTimeout(2000l);
+ ret.setUrl("http://localhost:8380/jseng");
+ ret.setUser("admin", "admin");
+ return ret;
+ }
+
+ @Test
+ public void testRequestReply() {
+ filter.addHook(new TestHookDouble());
+ filter.addHook(new TestHookSquare());
+ filter.addHook(new TestHookReply());
+ WebClient client = createClient();
+ WebRequest req = client.createRequest(RequestMethod.GET);
+ try {
+ req.setUri("/hook/my/uri");
+ req.addParameter("v", "5");
+ WebResponse resp = req.invoke();
+ assertEquals(200, resp.getCode());
+ assertEquals("100", resp.getContentAsString());
+ } finally {
+ IOUtil.close(req);
+ }
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookDouble.java
Sat Jun 25 12:08:32 2011
@@ -0,0 +1,19 @@
+package org.mycontainer.commons.servlet.http.hook;
+
+import org.mycontainer.commons.http.hook.Chain;
+import org.mycontainer.commons.http.hook.Hook;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;
+
+public class TestHookDouble implements Hook {
+
+ public void invoke(Request request, Response response, Chain chain) {
+ }
+
+ public Response invoke(Request request, Chain chain) {
+ Long content = Long.parseLong(request.getQueryString().get("v").get(0));
+ request.getQueryString().get("v").set(0, Long.toString(2 * content));
+ return chain.proceed(request);
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookFilter.java
Sat Jun 25 12:08:32 2011
@@ -0,0 +1,20 @@
+package org.mycontainer.commons.servlet.http.hook;
+
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+
+import org.mycontainer.commons.http.hook.BasicRequestService;
+import org.mycontainer.commons.http.hook.Hook;
+
+public class TestHookFilter extends HookFilter {
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ service = new BasicRequestService();
+ super.init(filterConfig);
+ }
+
+ public void addHook(Hook hook) {
+ ((BasicRequestService) service).addHook(hook);
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookReply.java
Sat Jun 25 12:08:32 2011
@@ -0,0 +1,17 @@
+package org.mycontainer.commons.servlet.http.hook;
+
+import org.mycontainer.commons.http.hook.Chain;
+import org.mycontainer.commons.http.hook.Hook;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;
+
+public class TestHookReply implements Hook {
+
+ public Response invoke(Request request, Chain chain) {
+ Response response = new Response();
+ response.setCode(200);
+ response.setContent(request.getQueryString().get("v").get(0));
+ return response;
+ }
+
+}
=======================================
--- /dev/null
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/java/org/mycontainer/commons/servlet/http/hook/TestHookSquare.java
Sat Jun 25 12:08:32 2011
@@ -0,0 +1,16 @@
+package org.mycontainer.commons.servlet.http.hook;
+
+import org.mycontainer.commons.http.hook.Chain;
+import org.mycontainer.commons.http.hook.Hook;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;
+
+public class TestHookSquare implements Hook {
+
+ public Response invoke(Request request, Chain chain) {
+ Long content = Long.parseLong(request.getQueryString().get("v").get(0));
+ request.getQueryString().get("v").set(0, Long.toString(content *
content));
+ return chain.proceed(request);
+ }
+
+}
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/BasicChain.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/BasicChain.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

import java.util.Iterator;

=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/BasicRequestService.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/BasicRequestService.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

import java.util.ArrayList;
import java.util.List;
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/Chain.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Chain.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

public interface Chain {

=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/Hook.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Hook.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

public interface Hook {

=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/Request.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Request.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

import java.util.HashMap;
import java.util.List;
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/RequestService.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/RequestService.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

public interface RequestService {

=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/request/Response.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/main/java/org/mycontainer/commons/http/hook/Response.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

import java.util.HashMap;
import java.util.List;
@@ -8,12 +8,12 @@

private Integer code;

- private String codeMessage;
-
private Map<String, List<String>> headers = new HashMap<String,
List<String>>();

private Object content;

+ private String codeMessage;
+
public Integer getCode() {
return code;
}
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/request/BasicRequestServiceTest.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/BasicRequestServiceTest.java
Sat Jun 25 12:08:32 2011
@@ -1,10 +1,13 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

import static org.junit.Assert.assertEquals;

import java.util.Map;

import org.junit.Test;
+import org.mycontainer.commons.http.hook.BasicRequestService;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;
import org.mycontainer.commons.util.MapUtil;

public class BasicRequestServiceTest {
@@ -30,10 +33,6 @@
Map<String, Object> content = (Map<String, Object>) resp.getContent();
assertEquals("k1=v11&k1=v12&k2=v2&", content.get("queryString"));
assertEquals(5l, content.get("result"));
-
- service.addHook(new TestHookDouble());
- service.addHook(new TestHookSquare());
-
}

@SuppressWarnings("unchecked")
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/request/TestHookDouble.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/TestHookDouble.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,9 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;
+
+import org.mycontainer.commons.http.hook.Chain;
+import org.mycontainer.commons.http.hook.Hook;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;

public class TestHookDouble implements Hook {

=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/request/TestHookReply.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/TestHookReply.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,4 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;

import java.util.HashMap;
import java.util.List;
@@ -6,6 +6,11 @@
import java.util.Map.Entry;
import java.util.Set;

+import org.mycontainer.commons.http.hook.Chain;
+import org.mycontainer.commons.http.hook.Hook;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;
+
public class TestHookReply implements Hook {

public Response invoke(Request request, Chain chain) {
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/request/TestHookSquare.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-commons/src/test/java/org/mycontainer/commons/http/hook/TestHookSquare.java
Sat Jun 25 12:08:32 2011
@@ -1,4 +1,9 @@
-package org.mycontainer.commons.http.request;
+package org.mycontainer.commons.http.hook;
+
+import org.mycontainer.commons.http.hook.Chain;
+import org.mycontainer.commons.http.hook.Hook;
+import org.mycontainer.commons.http.hook.Request;
+import org.mycontainer.commons.http.hook.Response;

public class TestHookSquare implements Hook {

=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/ServletUtil.java
Sat Jun 25 11:17:50 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/main/java/org/mycontainer/commons/servlet/ServletUtil.java
Sat Jun 25 12:08:32 2011
@@ -9,6 +9,8 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -126,5 +128,77 @@
throw new RuntimeException(e);
}
}
+
+ @SuppressWarnings("unchecked")
+ public static Map<String, List<String>> getHeaders(
+ Map<String, List<String>> ret, HttpServletRequest request) {
+ if (ret == null) {
+ ret = new HashMap<String, List<String>>();
+ }
+ Enumeration<String> names = request.getHeaderNames();
+ while (names.hasMoreElements()) {
+ String name = names.nextElement();
+ Enumeration<String> headers = request.getHeaders(name);
+ while (headers.hasMoreElements()) {
+ String header = headers.nextElement();
+ List<String> list = ret.get(name);
+ if (list == null) {
+ list = new ArrayList<String>();
+ ret.put(name, list);
+ }
+ list.add(header);
+ }
+ }
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Map<String, List<String>> getParameters(
+ Map<String, List<String>> ret, HttpServletRequest request) {
+ if (ret == null) {
+ ret = new HashMap<String, List<String>>();
+ }
+ Set<Entry<String, String[]>> entries = request.getParameterMap()
+ .entrySet();
+ for (Entry<String, String[]> entry : entries) {
+ String key = entry.getKey();
+ String[] values = entry.getValue();
+ List<String> list = ret.get(key);
+ if (list == null) {
+ list = new ArrayList<String>();
+ ret.put(key, list);
+ }
+ list.addAll(Arrays.asList(values));
+ }
+ return ret;
+ }
+
+ public static void setHeaders(HttpServletResponse response,
+ Map<String, List<String>> headers) {
+ Set<Entry<String, List<String>>> set = headers.entrySet();
+ for (Entry<String, List<String>> entry : set) {
+ String key = entry.getKey();
+ List<String> values = entry.getValue();
+ for (String value : values) {
+ response.addHeader(key, value);
+ }
+ }
+ }
+
+ public static void write(HttpServletResponse response, char[] array) {
+ try {
+ response.getWriter().write(array);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static void write(HttpServletResponse response, byte[] content) {
+ try {
+ response.getOutputStream().write(content);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }

}
=======================================
---
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/webapp/WEB-INF/web.xml
Wed Jun 22 05:40:21 2011
+++
/trunk/devel/implementation/mycontainer-components/mycontainer-servlet-commons/src/test/webapp/WEB-INF/web.xml
Sat Jun 25 12:08:32 2011
@@ -57,23 +57,23 @@
<filter-name>NamingInvokerFilter</filter-name>
<url-pattern>/invoker/naming/*</url-pattern>
</filter-mapping>
-
+
<filter>
- <filter-name>RestrictNamingInvokerFilter</filter-name>
-
<filter-class>org.mycontainer.commons.servlet.json.RestrictNamingInvokerFilter</filter-class>
- <init-param>
- <param-name>ignore</param-name>
- <param-value>^/invoker/restrictnaming/</param-value>
- </init-param>
- <init-param>
- <param-name>domain</param-name>
- <param-value>view</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>RestrictNamingInvokerFilter</filter-name>
- <url-pattern>/invoker/restrictnaming/*</url-pattern>
- </filter-mapping>
+ <filter-name>RestrictNamingInvokerFilter</filter-name>
+
<filter-class>org.mycontainer.commons.servlet.json.RestrictNamingInvokerFilter</filter-class>
+ <init-param>
+ <param-name>ignore</param-name>
+ <param-value>^/invoker/restrictnaming/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>domain</param-name>
+ <param-value>view</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>RestrictNamingInvokerFilter</filter-name>
+ <url-pattern>/invoker/restrictnaming/*</url-pattern>
+ </filter-mapping>

<filter>
<filter-name>PojoInvokerServlet</filter-name>

Reply all
Reply to author
Forward
0 new messages