List of usage examples for javax.servlet.http HttpServletRequest getQueryString
public String getQueryString();
From source file:net.shopxx.plugin.yeepayPayment.YeepayPaymentPlugin.java
@Override public String getNotifyMessage(PaymentPlugin.NotifyMethod notifyMethod, HttpServletRequest request) { if ("2".equals(WebUtils.parse(request.getQueryString(), "GBK").get("r9_BType"))) { return "success"; }//from w w w . j a v a2 s. c o m return null; }
From source file:io.specto.hoverfly.recorder.HoverflyFilter.java
private HoverflyRecording.HoverFlyRequest recordRequest(final HttpServletRequest request) throws IOException { final String path = request.getPathInfo(); final String query = request.getQueryString(); final String requestMethod = request.getMethod(); final String destination = simulatedBaseUrl; final String requestBody = request.getReader() != null ? CharStreams.toString(request.getReader()) : ""; return new HoverflyRecording.HoverFlyRequest(path, requestMethod, destination, query, requestBody); }
From source file:org.apache.hadoop.gateway.dispatch.AbstractGatewayDispatch.java
@Override public URI getDispatchUrl(HttpServletRequest request) { StringBuffer str = request.getRequestURL(); String query = request.getQueryString(); if (query != null) { str.append('?'); str.append(query);//from w ww . j av a 2s. com } URI url = URI.create(str.toString()); return url; }
From source file:QueryModifier.java
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { String requestUrl = request.getRequestURL().toString(); String querystr = request.getQueryString(); if (querystr != null) { querystr = querystr + "&inspector-name=Jen&inspector-email=Jenniferq@yahoo.com"; } else {//from ww w .ja v a 2s.com querystr = "inspector-name=Jen&inspector-email=Jenniferq@yahoo.com"; } RequestDispatcher dispatcher = request.getRequestDispatcher("/viewPost.jsp?" + querystr); dispatcher.forward(request, response); }
From source file:GoTo.java
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // Determine the site where they want to go String site = req.getPathInfo(); String query = req.getQueryString(); // Handle a bad request if (site == null) { res.sendError(res.SC_BAD_REQUEST, "Extra path info required"); }/*from w ww .j av a 2 s.c om*/ // Cut off the leading "/" and append the query string // We're assuming the path info URL is always absolute String url = site.substring(1) + (query == null ? "" : "?" + query); // Log the requested URL and redirect log(url); // or write to a special file res.sendRedirect(url); }
From source file:com.apress.progwt.server.web.controllers.IndexController.java
@Override protected ModelAndView handleRequestInternal(HttpServletRequest req, HttpServletResponse arg1) throws Exception { log.debug("SERVLET PATH: " + req.getServletPath() + " " + req.getPathInfo() + " " + req.getQueryString()); Map<String, Object> model = getDefaultModel(req); // parameter may be on param line if we're redirect:ed here // (createUserController) model.put("message", req.getParameter("message")); model.put("frontPage", new FrontPageData(userService, schoolService)); ModelAndView mav = new ModelAndView(); mav.addAllObjects(model);/*from ww w . ja v a2 s . c o m*/ return mav; }
From source file:org.esupportail.papercut.web.PayBoxCallbackController.java
/** * Manage callback response from paybox - url like : * //from ww w . j a v a2 s.c o m * /payboxcallback?montant=200&reference=bonamvin@univrouen@200-2013-08-23-17-08-18-394&auto=XXXXXX&erreur=00000&idtrans=3608021&signature=CPqq18Un24NL0llB3E3G9kbKI4ztlkoL%2BSRTnMMrWlPBTVNTsn%2B%2FxA0YMSQOGGnU0wm45HYh%2F2RHoZGG3THzj7xKSY6upNJcnKrfFmzfTgA5FTFA3dyM27RgKmLcCeH48FRNoZPjVsKk0G2npvaP%2FY5pkSvn%2BQUl34DkmJkTejs%3D * * @param uiModel * @return empty page */ @RequestMapping("/payboxcallback") @ResponseBody public ResponseEntity<String> index(@RequestParam String montant, @RequestParam String reference, @RequestParam(required = false) String auto, @RequestParam String erreur, @RequestParam String idtrans, @RequestParam String signature, HttpServletRequest request) { String paperCutContext = reference.split("@")[1]; String ip = request.getRemoteAddr(); String queryString = request.getQueryString(); if (esupPaperCutServices.get(paperCutContext).payboxCallback(montant, reference, auto, erreur, idtrans, signature, queryString, ip, null)) { HttpHeaders headers = new HttpHeaders(); headers.add("Content-Type", "text/html; charset=utf-8"); return new ResponseEntity<String>("", headers, HttpStatus.OK); } else { HttpHeaders headers = new HttpHeaders(); headers.add("Content-Type", "text/html; charset=utf-8"); return new ResponseEntity<String>("", headers, HttpStatus.FORBIDDEN); } }
From source file:com.consol.citrus.simulator.servlet.SimulatorStatusServlet.java
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (StringUtils.hasText(req.getQueryString()) && req.getQueryString().contains("clear=true")) { testResults.clear();/*w w w . j a v a2 s. c o m*/ } Map<String, Object> model = new HashMap<String, Object>(); model.put("running", runningTests); model.put("results", reverseOrder(testResults)); model.put("contextPath", req.getContextPath()); Context context = Context.newContext(model); statusTemplate.apply(context, resp.getWriter()); }
From source file:edu.du.penrose.systems.fedoraProxy.web.bus.Solr_select.java
/** * @param webSite (path variable) used to retrieve the webSite collection pid from the webSiteCollection.properties file, if not found a response status of 404 is returned. * @param queryString ('q' request parameter) the query string passed to solr, should be escaped. * <br>/*from ww w . j a v a 2s .co m*/ * @param request the original http request object. * @param response the http response sent back to the browser. * @throws Exception */ @RequestMapping(method = RequestMethod.GET) public final void proxyCall(@RequestParam(required = true, value = "q") String queryString, @PathVariable String webSite, HttpServletRequest request, HttpServletResponse response) throws Exception // MUST BE type Exception for annotation to work! { this.logger.info("Request recived:" + request.getQueryString()); this.performProxyCall(webSite, null, SOLR_QUERY_CMD + request.getQueryString(), response); }