List of usage examples for javax.servlet.http HttpServletResponse SC_OK
int SC_OK
To view the source code for javax.servlet.http HttpServletResponse SC_OK.
Click Source Link
From source file:com.smartsheet.api.HttpTestServer.java
public void start() throws Exception { _server = new Server(port); _server.setHandler(getMockHandler()); _server.start();// ww w . j a va 2s . c om status = HttpServletResponse.SC_OK; }
From source file:com.acc.storefront.controllers.integration.MerchantCallbackController.java
@RequestMapping(value = "/integration/merchant_callback", method = RequestMethod.POST) public void process(final HttpServletRequest request, final HttpServletResponse response) { initializeSiteFromRequest(request);//w w w .ja v a 2 s. c o m try { acceleratorPaymentService.handleCreateSubscriptionCallback(getParameterMap(request)); } finally { //Kill this session at the end of the request processing in order to reduce the server overhead, otherwise //this session will hang around until it's timed out. final HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); } } response.setStatus(HttpServletResponse.SC_OK); }
From source file:baggage.hypertoolkit.views.JSONResponse.java
public JSONResponse(JSONArray o) { this(o, HttpServletResponse.SC_OK); }
From source file:cn.org.once.cstack.config.UserAjaxLogoutSuccessHandler.java
@Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { logger.debug("SC_OK"); response.setStatus(HttpServletResponse.SC_OK); }
From source file:fr.treeptik.cloudunit.config.UserAjaxLogoutSuccessHandler.java
@Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { logger.info("SC_OK"); response.setStatus(HttpServletResponse.SC_OK); }
From source file:th.co.geniustree.osgi.prototype.authen.security.DefaultLogoutSuccessHandler.java
private void invalidSessionAndRedirect(HttpSession session, HttpServletResponse response, String redirectUrl) throws IOException { try {//from w w w.j ava2 s . c o m session.invalidate(); } catch (Exception ex) { //swallow exception ex.printStackTrace(); } finally { response.setStatus(HttpServletResponse.SC_OK); response.sendRedirect(redirectUrl); } }
From source file:com.acc.storefront.controllers.integration.FraudUpdateController.java
@RequestMapping(value = "/integration/order_review_callback", method = RequestMethod.POST) public void process(@RequestBody final MultiValueMap<String, String> bodyParameterMap, final HttpServletRequest request, final HttpServletResponse response) throws Exception { initializeSiteFromRequest(request);// w ww . j a v a 2 s . c o m try { acceleratorPaymentService.handleFraudUpdate(bodyParameterMap.toSingleValueMap()); } finally { //Kill this session at the end of the request processing in order to reduce the server overhead, otherwise //this session will hang around until it's timed out. final HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); } } response.setStatus(HttpServletResponse.SC_OK); }
From source file:rashjz.info.com.az.util.UserLoginSuccessHandler.java
@Override public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException { HttpSession session = httpServletRequest.getSession(); UserDetails authUser = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); // AppUser localUser = new AppUser(null, authUser.getUsername(), authUser.getUsername(), true, true, true, true, authUser.getAuthorities()); // SecurityUtil.authenticateUser(localUser); session.setAttribute("username", authUser.getUsername()); session.setAttribute("authorities", authentication.getAuthorities()); //set our response to OK status httpServletResponse.setStatus(HttpServletResponse.SC_OK); httpServletResponse.sendRedirect("admin"); }
From source file:gsn.http.GMLHandler.java
public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setStatus(HttpServletResponse.SC_OK); String reqName = request.getParameter("name"); String reqGroup = request.getParameter("group"); String reqUsername = request.getParameter("username"); String reqPassword = request.getParameter("password"); response.getWriter().write(buildOutput(reqName, reqGroup, reqUsername, reqPassword)); }
From source file:net.proest.librepilot.web.handler.DefinitionHandler.java
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setCharacterEncoding("utf-8"); response.setStatus(HttpServletResponse.SC_OK); PrintWriter out = response.getWriter(); List<String> targetObjects = Arrays.asList(target.split("/")); SortedMap<String, UAVTalkXMLObject> objects = new TreeMap<>(); for (UAVTalkXMLObject xmlObj : mFcDevice.getObjectTree().getXmlObjects().values()) { if (targetObjects.size() == 0 || targetObjects.contains(xmlObj.getName())) { if (mShowSettings && xmlObj.isSettings() || mShowState && !xmlObj.isSettings()) { objects.put(xmlObj.getName(), xmlObj); }//from w w w. java 2s . co m } } String callback = request.getParameter("callback"); if (callback != null) { response.setContentType("application/javascript"); out.println(callback + "("); } else { response.setContentType("application/json"); } ObjectMapper mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); out.println(mapper.writeValueAsString(objects)); if (callback != null) { out.print(")"); } baseRequest.setHandled(true); }