Tabnine Logo
ServletActionContext.getRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
getRequest
method
in
com.opensymphony.webwork.ServletActionContext

Best Java code snippets using com.opensymphony.webwork.ServletActionContext.getRequest (Showing top 20 results out of 315)

origin: org.randombits.support/support-confluence

  @Override
  protected HttpServletRequest getHttpServletRequest() {
    return ServletActionContext.getRequest();
  }
}
origin: com.opensymphony/webwork

public String execute() throws Exception {
  HttpServletRequest request = ServletActionContext.getRequest();
  String requestedUrl = request.getPathInfo();
  if (successResultValue == null) successResultValue = requestedUrl;
  return SUCCESS;
}
origin: org.codehaus.redback/redback-xwork-integration

private static String getWebappContext()
{
  // Calculate the webapp context.
  String webappContext = ServletActionContext.getRequest().getContextPath();
  if ( StringUtils.isEmpty( webappContext ) )
  {
    // Still empty?  means you are a root context.
    webappContext = "/";
  }
  return webappContext;
}
origin: com.opensymphony/webwork

protected void before(ActionInvocation invocation) throws Exception {
  _log.debug("Creating HttpSession");
  ServletActionContext.getRequest().getSession(true);
}
origin: org.codehaus.redback/redback-xwork-integration

  protected String getBaseUrl()
  {
    HttpServletRequest req = ServletActionContext.getRequest();
    return req.getScheme() + "://" + req.getServerName() +
      ( req.getServerPort() == 80 ? "" : ":" + req.getServerPort() ) + req.getContextPath();
  }
}
origin: com.atlassian.applinks/applinks-plugin

  public ListEntityLinksContext getApplinksContext() {
    if (context == null) {
      final HttpServletRequest request = ServletActionContext.getRequest();
      final String typeId = request.getParameter("typeId");
      final String key = request.getParameter("key");
      context = velocityContextFactory.buildListEntityLinksContext(request, typeId, key);
    }
    return context;
  }
}
origin: com.atlassian.ext/atlassian-plugin-repository-confluence-plugin

public String execute() throws Exception {
  // Init
  if (hasErrors()) return ERROR;
  // Begin
  if (ServletActionContext.getRequest() instanceof MultiPartRequestWrapper) {
    return handleUploadedFile((MultiPartRequestWrapper) ServletActionContext.getRequest());
  } else {
    return ERROR;
  }
}
origin: org.randombits.support/support-confluence

/**
 * Returns true if the current view is the default display (ie not
 * printable, etc).
 *
 * @param ctx The current page context.
 * @return true if there is no special display in place.
 */
public boolean isDefaultDisplay( ConversionContext ctx ) {
  HttpServletRequest req = ServletActionContext.getRequest();
  return req != null && StringUtils.isBlank( req.getParameter( DECORATOR_PARAM ) )
      && RenderContextOutputType.DISPLAY.equals( ctx.getOutputType() );
}
origin: com.atlassian.confluence.extra.webdav/webdav-plugin

private File generatePdfExportFromPdfExporterService(Object pdfExporterService)
    throws NoSuchMethodException,
    IllegalAccessException,
    InvocationTargetException
{
  Method exportMethod = pdfExporterService.getClass().getMethod("createPdfForPage", User.class, Page.class, String.class);
  return (File) exportMethod.invoke(
      pdfExporterService,
      AuthenticatedUserThreadLocal.get(),
      getPage(),
      ServletActionContext.getRequest().getContextPath()
  );
}
origin: org.codehaus.redback/redback-xwork-integration

  protected String processRequiresAuthentication( ActionInvocation invocation )
    throws ComponentLookupException
  {
    HttpSession session = ServletActionContext.getRequest().getSession();
    
    if ( session != null )
    {
      session.removeAttribute( SecuritySystemConstants.SECURITY_SESSION_KEY );
    }
    
    addActionInvocation( invocation ).setBackTrack();
    return REQUIRES_AUTHENTICATION;
  }    
}
origin: org.codehaus.redback/redback-xwork-integration

private void removeCookiesAndSession()
{
  autologinCookies.removeRememberMeCookie();
  autologinCookies.removeSignonCookie();
  HttpSession session = ServletActionContext.getRequest().getSession();
  if ( session != null )
  {
    session.removeAttribute( SecuritySystemConstants.SECURITY_SESSION_KEY );
  }
}
origin: org.randombits.support/support-confluence

/**
 * Returns true if the current view is printable - either the standard
 * 'print' view, Word or PDF.
 *
 * @param ctx The page context.
 * @return true if the printable view is being displayed.
 */
public boolean isPrintableDisplay( ConversionContext ctx ) {
  if ( RenderContextOutputType.PDF.equals( ctx.getOutputType() )
      || RenderContextOutputType.WORD.equals( ctx.getOutputType() ) )
    return true;
  HttpServletRequest req = ServletActionContext.getRequest();
  return req != null && PRINTABLE_DECORATOR.equals( req.getParameter( DECORATOR_PARAM ) );
}
origin: com.atlassian.ext/atlassian-plugin-repository-confluence-plugin

private User getRemoteUser()
{
  HttpServletRequest request = ServletActionContext.getRequest();
  if (request != null)
  {
    String remoteUserName = request.getRemoteUser();
    if (remoteUserName != null)
      return userAccessor.getUser(remoteUserName);
  }
  return AuthenticatedUserThreadLocal.getUser();
}
origin: com.atlassian.ext/atlassian-plugin-repository-confluence-plugin

private User getRemoteUser()
{
  HttpServletRequest request = ServletActionContext.getRequest();
  if (request != null)
  {
    String remoteUserName = request.getRemoteUser();
    if (remoteUserName != null)
      return userAccessor.getUser(remoteUserName);
  }
  return AuthenticatedUserThreadLocal.getUser();
}
origin: com.atlassian.confluence.plugins/confluence-advanced-macros

private String calculateBaseUrl() {
  // use request contextPath if it exists, otherwise (as in exports) use the configured base URL
  HttpServletRequest request = ServletActionContext.getRequest();
  if (request != null) {
    return request.getContextPath();
  } else {
    return settingsManager.getGlobalSettings().getBaseUrl();
  }
}
origin: com.opensymphony/webwork

/**
 * Executes the regular servlet result.
 *
 * @param finalLocation
 * @param actionInvocation
 */
private void executeRegularServletResult(String finalLocation,
    ActionInvocation actionInvocation) throws ServletException, IOException {
  ServletContext ctx = ServletActionContext.getServletContext();
  HttpServletRequest req = ServletActionContext.getRequest();
  HttpServletResponse res = ServletActionContext.getResponse();
  try {
    ctx.getRequestDispatcher(finalLocation).include(req, res);
  } catch (ServletException e) {
    LOG.error("ServletException including " + finalLocation, e);
    throw e;
  } catch (IOException e) {
    LOG.error("IOException while including result '" + finalLocation + "'", e);
    throw e;
  }
}
origin: org.randombits.support/support-confluence

/**
 * Returns true if the current action is the view option for the current
 * content. If we are not viewing any editable content, false is returned.
 *
 * @param ctx The page context.
 * @return true if the content is in 'view' mode.
 */
public boolean isViewAction( ConversionContext ctx ) {
  HttpServletRequest req = ServletActionContext.getRequest();
  if ( req == null )
    return false;
  Action action = getCurrentAction();
  ContentEntityObject content = ctx.getEntity();
  if ( content instanceof AbstractPage ) {
    // Page or BlogPost
    if ( action instanceof ViewPageAction )
      return true;
  }
  return false;
}
origin: org.codehaus.redback/redback-xwork-integration

  private SecuritySession getSecuritySession()
  {
    HttpSession session = ServletActionContext.getRequest().getSession();
    if ( session == null )
    {
      getLogger().debug( "No HTTP Session exists." );
      return null;
    }

    SecuritySession secSession =
      (SecuritySession) session.getAttribute( SecuritySystemConstants.SECURITY_SESSION_KEY );
    getLogger().debug( "Returning Security Session: " + secSession );
    return secSession;
  }
}
origin: org.codehaus.redback/redback-xwork-integration

public AuthenticationKey getSignonKey()
{
  Cookie ssoCookie = getCookie( ServletActionContext.getRequest(), SIGNON_KEY );
  if ( ssoCookie == null )
  {
    getLogger().debug( "Single Sign On Cookie Not Found: " + SIGNON_KEY );
    return null;
  }
  // Found user with a single sign on key.
  String providedKey = ssoCookie.getValue();
  getLogger().debug( "Found sso cookie : " + providedKey );
  CookieSettings settings = securitySystem.getPolicy().getSignonCookieSettings();
  return findAuthKey( SIGNON_KEY, providedKey, settings.getDomain(), settings.getPath() );
}
origin: org.codehaus.redback/redback-xwork-integration

public AuthenticationKey getRememberMeKey()
{
  if ( !isRememberMeEnabled() )
  {
    return null;
  }
  Cookie rememberMeCookie = getCookie( ServletActionContext.getRequest(), REMEMBER_ME_KEY );
  if ( rememberMeCookie == null )
  {
    getLogger().debug( "Remember Me Cookie Not Found: " + REMEMBER_ME_KEY );
    return null;
  }
  // Found user with a remember me key.
  String providedKey = rememberMeCookie.getValue();
  getLogger().debug( "Found remember me cookie : " + providedKey );
  CookieSettings settings = securitySystem.getPolicy().getRememberMeCookieSettings();
  return findAuthKey( REMEMBER_ME_KEY, providedKey, settings.getDomain(), settings.getPath() );
}
com.opensymphony.webworkServletActionContextgetRequest

Javadoc

Gets the HTTP servlet request object.

Popular methods of ServletActionContext

  • getResponse
    Gets the HTTP servlet response object.
  • getContext
  • getServletContext
    Gets the servlet context.
  • getActionContext
  • getPageContext
    Returns the HTTP page context.
  • getServletConfig
  • getValueStack
  • setRequest
    Sets the HTTP servlet request object.
  • setResponse
    Sets the HTTP servlet response object.

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JPanel (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now