List of usage examples for javax.servlet.http HttpServletRequest getParameter
public String getParameter(String name);
String
, or null
if the parameter does not exist. From source file:net.duckling.ddl.web.sync.ContextUtil.java
public static Context retrieveContext(HttpServletRequest req) { String device = req.getParameter("device"); String token = req.getParameter("access_token"); String tidStr = req.getParameter("tid"); int tid = 0;//from w w w .j a va 2s . c om if (StringUtils.isNotEmpty(tidStr)) { tid = Integer.parseInt(tidStr); } Context ctx = new Context(); ctx.setDevice(device); ctx.setTid(tid); ctx.setToken(token); ctx.setUid(VWBSession.getCurrentUid(req)); return ctx; }
From source file:com.mobileman.projecth.web.util.KeepScroll.java
public static void save(HttpServletRequest request, Model model) { model.addAttribute(KEEP_SCROLL_KEY, request.getParameter(KEEP_SCROLL_KEY)); }
From source file:nl.surfnet.coin.teams.util.ViewUtil.java
/** * Defines which view must be presented/*from w w w .j a va2 s .c om*/ * * @param request current {@link HttpServletRequest} * @return the name of the view */ public static String getView(HttpServletRequest request) { String view = request.getParameter(VIEW); return getView(view); }
From source file:com.ms.app.web.commons.tools.StaticsTools.java
public static void setDebugModeIfEixisted(HttpServletRequest request) { String isDebug = request.getParameter("_is_debug_"); if (StringUtils.equalsIgnoreCase(isDebug, "true")) { isDebugMode.set(true);/*from ww w . jav a2 s.c om*/ } else { isDebugMode.set(false); } }
From source file:com.enonic.cms.web.portal.instanttrace.InstantTraceRequestInspector.java
public static String getParameterUsername(final HttpServletRequest request) { return request.getParameter("_itrace_username"); }
From source file:com.enonic.cms.web.portal.instanttrace.InstantTraceRequestInspector.java
public static String getParameterPassword(final HttpServletRequest request) { return request.getParameter("_itrace_password"); }
From source file:com.enonic.cms.web.portal.instanttrace.InstantTraceRequestInspector.java
public static String getParameterUserstore(final HttpServletRequest request) { return request.getParameter("_itrace_userstore"); }
From source file:com.enonic.cms.web.portal.instanttrace.InstantTraceRequestInspector.java
public static String getParameterOriginalUrl(final HttpServletRequest request) { return request.getParameter("_itrace_original_url"); }
From source file:io.lavagna.web.helper.Redirector.java
public static String fetchRequestedUrl(HttpServletRequest req) { return cleanupRequestedUrl(req.getParameter("reqUrl")); }
From source file:org.apache.sling.distribution.util.RequestUtils.java
public static DistributionRequest fromServletRequest(HttpServletRequest request) { String action = request.getParameter(DistributionParameter.ACTION.toString()); String[] paths = request.getParameterValues(DistributionParameter.PATH.toString()); String deepParam = request.getParameter(DistributionParameter.DEEP.toString()); boolean deep = false; if ("true".equals(deepParam)) { deep = true;/* ww w.ja v a 2 s . c o m*/ } if (paths == null) { paths = new String[0]; } return new SimpleDistributionRequest(DistributionRequestType.fromName(action), deep, paths); }