Tabnine Logo
ServletUtil.computeContextName
Code IndexAdd Tabnine to your IDE (free)

How to use
computeContextName
method
in
uk.org.ponder.servletutil.ServletUtil

Best Java code snippets using uk.org.ponder.servletutil.ServletUtil.computeContextName (Showing top 5 results out of 315)

origin: uk.org.ponder.rsf/rsf-core

public void setApplicationContext(ApplicationContext applicationContext)
  throws BeansException {
 WebApplicationContext wac = (WebApplicationContext) applicationContext;
 contextURL = ServletUtil.computeContextName(wac.getServletContext());
}
origin: sakaiproject/sakai

public void contextInitialized(ServletContextEvent sce) {
  ServletContext context = sce.getServletContext();
  try {
    WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(context);
    if (wac == null) {
      Logger.log.error("Error locating application context");
      return;
    }
    locator = wac.getBean(SakaiServletContextLocatorLocator.SAKAI_SCL);
    if (locator == null) {
      Logger.log.warn(error);
      return;
    }
  } catch (Exception e) {
    Logger.log.error(error, e);
  }
  String name = context.getInitParameter("sakai-context-name");
  if (name == null) {
    name = ServletUtil.computeContextName(context);
  }
  contextName = name;
  try {
    Method method = locator.getClass().getMethod("registerContext",
        new Class[] { String.class, ServletContext.class });
    method.invoke(locator, new Object[] { name, context });
  } catch (Exception e) {
    Logger.log.error("Error registering context with name " + name, e);
  }
}
origin: uk.org.ponder.sakairsf/sakairsf

name = ServletUtil.computeContextName(context);
origin: sakaiproject/sakai

public StaticBaseURLProvider computeBaseURLProvider(HttpServletRequest request) {
  ServletContext servletcontext = wac.getServletContext();
  // yes, these two fields are not request-scope, but not worth creating
  // a whole new class and bean file for them.
  resourceurlbase = servletcontext.getInitParameter("resourceurlbase");
  if (resourceurlbase == null) {
    resourceurlbase = ServletUtil.computeContextName(servletcontext);
  }
  // compute the baseURLprovider.
  StaticBaseURLProvider sbup = new StaticBaseURLProvider();
  String baseurl = fixSakaiURL(request, ServletUtil.getBaseURL2(request));
  sbup.setResourceBaseURL(computeResourceURLBase(baseurl));
  // baseurl += SakaiEarlyRequestParser.FACES_PATH + "/";
  sbup.setBaseURL(baseurl);
  return sbup;
}
origin: uk.org.ponder.sakairsf/sakairsf

 public StaticBaseURLProvider computeBaseURLProvider(HttpServletRequest request) {
  ServletContext servletcontext = wac.getServletContext();
  // yes, these two fields are not request-scope, but not worth creating
  // a whole new class and bean file for them.
  resourceurlbase = servletcontext.getInitParameter("resourceurlbase");
  if (resourceurlbase == null) {
   resourceurlbase = ServletUtil.computeContextName(servletcontext);
  }

  // compute the baseURLprovider.
  StaticBaseURLProvider sbup = new StaticBaseURLProvider();
  String baseurl = fixSakaiURL(request, ServletUtil.getBaseURL2(request));
  sbup.setResourceBaseURL(computeResourceURLBase(baseurl));
//    baseurl += SakaiEarlyRequestParser.FACES_PATH + "/";
  sbup.setBaseURL(baseurl);
  return sbup;
 }
 
uk.org.ponder.servletutilServletUtilcomputeContextName

Javadoc

Returns the context name of this ServletContext, using an algorithm based on using the context's web.xml file as a "test resource". This name will include both leading and trailing slash.

Popular methods of ServletUtil

  • getBaseURL2
    Computes the "Base URL" of this servlet, defined as the complete request path, with any trailing str
  • getContextBaseURL2
    Computes the "Context Base URL" of this servlet, which will include the extra stub of the path that

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • 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