Class WebEnv

java.lang.Object
org.compiere.util.WebEnv

public class WebEnv extends Object
Web Environment and debugging
Version:
$Id: WebEnv.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
  • Field Details

  • Constructor Details

    • WebEnv

      public WebEnv()
  • Method Details

    • initWeb

      public static boolean initWeb(javax.servlet.ServletConfig config)
      Init Web Environment. To be called from every Servlet in the init method or any other Web resource to make sure that the environment is properly set.
      Parameters:
      config - config
      Returns:
      false if initialization problems
    • initWeb

      public static boolean initWeb(javax.servlet.ServletContext context)
      Init Web. Only call directly for Filters, etc.
      Parameters:
      context - servlet context
      Returns:
      false if initialization problems
    • getBaseDirectory

      public static String getBaseDirectory(String entry)
      Get Base Directory entry.
      /adempiere/
      Parameters:
      entry - file entry or path
      Returns:
      url to entry in base directory
    • getImageDirectory

      public static String getImageDirectory(String entry)
      Get Image Directory entry.
      /adempiere/images
      Parameters:
      entry - file entry or path
      Returns:
      url to entry in image directory
    • getStoreDirectory

      public static String getStoreDirectory(String entry)
      Get Store Directory entry.
      /adempiere/store
      Parameters:
      entry - file entry or path
      Returns:
      url to entry in store directory
    • getLogoURL

      public static String getLogoURL()
      Get Logo Path.

      /adempiere/LogoSmall.gif

      Returns:
      url to logo
    • getLogo

      public static org.apache.ecs.xhtml.img getLogo()
      Get Logo Image HTML tag.
      Returns:
      Image
    • getStylesheetURL

      public static String getStylesheetURL()
      Get Stylesheet Path.

      /adempiere/standard.css

      Returns:
      url of Stylesheet
    • getCellContent

      public static String getCellContent(Object content)
      Get Cell Content
      Parameters:
      content - optional content
      Returns:
      string content or non breaking space
    • getCellContent

      public static String getCellContent(int content)
      Get Cell Content
      Parameters:
      content - optional content
      Returns:
      string content
    • dump

      public static void dump(javax.servlet.ServletConfig config)
      Dump Servlet Config
      Parameters:
      config - config
    • dump

      public static void dump(javax.servlet.ServletContext ctx)
      Dump Session
      Parameters:
      ctx - servlet context
    • dump

      public static void dump(javax.servlet.http.HttpSession session)
      Dump Session
      Parameters:
      session - session
    • dump

      public static void dump(javax.servlet.http.HttpServletRequest request)
      Dump Request
      Parameters:
      request - request
    • addFooter

      @Deprecated public static void addFooter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServlet servlet, org.apache.ecs.xhtml.body body)
      Deprecated.
      Add Footer (with diagnostics)
      Parameters:
      request - request
      response - response
      servlet - servlet
      body - - Body to add footer