1 7 package com.inversoft.verge.mvc.servlet.test; 8 9 10 import javax.servlet.http.HttpServletRequest ; 11 import javax.servlet.http.HttpServletResponse ; 12 13 import com.inversoft.verge.mvc.MVCException; 14 import com.inversoft.verge.mvc.MVCMediator; 15 16 17 23 public class TestMVCMediator implements MVCMediator { 24 25 29 public static final String FAIL = "fail"; 30 31 32 35 public TestMVCMediator() { 36 } 37 38 39 50 public void mediate(HttpServletRequest request, HttpServletResponse response) 51 throws MVCException { 52 assert (request != null) : "request == null"; 53 assert (response != null) : "response == null"; 54 55 if (request.getParameter(FAIL) != null && 56 request.getParameter(FAIL).equals(FAIL)) { 57 throw new MVCException(FAIL); 58 } 59 } 60 } 61 | Popular Tags |