Compiere 3.1

org.compiere.util
Class WebEnv

java.lang.Object
  extended by 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 Summary
static String CHARSET
          Character Set (iso-8859-1 - utf-8)
static String COOKIE_INFO
          Cookie Name
static boolean DEBUG
          Add HTML Debug Info
static String DIR_BASE
          Base Directory links http://localhost:8080/compiere to the physical %COMPIERE_HOME%/tomcat/webroot/compiere directory
static String ENCODING
          Encoding (ISO-8859-1 - UTF-8)
static String NBSP
          Not Braking Space
static String TARGET_CMD
          Frame name for Commands - WCmd
static String TARGET_MENU
          Frame name for Menu - WMenu
static String TARGET_POPUP
          Frame name for Apps PopUp - WPopUp
static String TARGET_WINDOW
          Frame name for Apps Window - WWindow
static int TIMEOUT
          Timeout - 15 Minutes
 
Constructor Summary
WebEnv()
           
 
Method Summary
static void addFooter(HttpServletRequest request, HttpServletResponse response, HttpServlet servlet, org.apache.ecs.xhtml.body body)
          Add Footer (with diagnostics)
static void dump(HttpServletRequest request)
          Dump Request
static void dump(HttpSession session)
          Dump Session
static void dump(ServletConfig config)
          Dump Servlet Config
static void dump(ServletContext ctx)
          Dump Session
static String getBaseDirectory(String entry)
          Get Base Directory entry.
static String getCellContent(int content)
          Get Cell Content
static String getCellContent(Object content)
          Get Cell Content
static String getImageDirectory(String entry)
          Get Image Directory entry.
static org.apache.ecs.xhtml.img getLogo()
          Get Logo Image HTML tag.
static String getLogoURL()
          Get Logo Path.
static String getStoreDirectory(String entry)
          Get Store Directory entry.
static String getStylesheetURL()
          Get Stylesheet Path.
static boolean initWeb(ServletConfig config)
          Init Web Environment.
static boolean initWeb(ServletContext context, String info)
          Init Web.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Add HTML Debug Info

See Also:
Constant Field Values

DIR_BASE

public static final String DIR_BASE
Base Directory links http://localhost:8080/compiere to the physical %COMPIERE_HOME%/tomcat/webroot/compiere directory

See Also:
Constant Field Values

TARGET_CMD

public static final String TARGET_CMD
Frame name for Commands - WCmd

See Also:
Constant Field Values

TARGET_MENU

public static final String TARGET_MENU
Frame name for Menu - WMenu

See Also:
Constant Field Values

TARGET_WINDOW

public static final String TARGET_WINDOW
Frame name for Apps Window - WWindow

See Also:
Constant Field Values

TARGET_POPUP

public static final String TARGET_POPUP
Frame name for Apps PopUp - WPopUp

See Also:
Constant Field Values

CHARSET

public static final String CHARSET
Character Set (iso-8859-1 - utf-8)

See Also:
Constant Field Values

ENCODING

public static final String ENCODING
Encoding (ISO-8859-1 - UTF-8)

See Also:
Constant Field Values

COOKIE_INFO

public static final String COOKIE_INFO
Cookie Name

See Also:
Constant Field Values

TIMEOUT

public static final int TIMEOUT
Timeout - 15 Minutes

See Also:
Constant Field Values

NBSP

public static final String NBSP
Not Braking Space

See Also:
Constant Field Values
Constructor Detail

WebEnv

public WebEnv()
Method Detail

initWeb

public static boolean initWeb(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(ServletContext context,
                              String info)
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.
/compiere/

Parameters:
entry - file entry or path
Returns:
url to entry in base directory

getImageDirectory

public static String getImageDirectory(String entry)
Get Image Directory entry.
/compiere/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.
/compiere/store

Parameters:
entry - file entry or path
Returns:
url to entry in store directory

getLogoURL

public static String getLogoURL()
Get Logo Path. Removing/modifying the Compiere logo is a violation of the license

/compiere/LogoSmall.gif

Returns:
url to logo

getLogo

public static org.apache.ecs.xhtml.img getLogo()
Get Logo Image HTML tag. Removing/modifying the Compiere logo or copyright notice is a violation of the license

Returns:
Image

getStylesheetURL

public static String getStylesheetURL()
Get Stylesheet Path.

/compiere/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(ServletConfig config)
Dump Servlet Config

Parameters:
config - config

dump

public static void dump(ServletContext ctx)
Dump Session

Parameters:
ctx - servlet context

dump

public static void dump(HttpSession session)
Dump Session

Parameters:
session - session

dump

public static void dump(HttpServletRequest request)
Dump Request

Parameters:
request - request

addFooter

public static void addFooter(HttpServletRequest request,
                             HttpServletResponse response,
                             HttpServlet servlet,
                             org.apache.ecs.xhtml.body body)
Add Footer (with diagnostics)

Parameters:
request - request
response - response
servlet - servlet
body - - Body to add footer

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.