Package org.compiere.util
Class WebEnv
java.lang.Object
org.compiere.util.WebEnv
Web Environment and debugging
- Version:
- $Id: WebEnv.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Character Set (iso-8859-1 - utf-8)static final String
Cookie Namestatic boolean
Add HTML Debug Infostatic final String
Base Directory links http://localhost:8080/adempiere to the physical %adempiere_HOME%/jetty/webroot/adempiere directorystatic final String
Encoding (ISO-8859-1 - UTF-8)static String
Not Braking Spacestatic final String
Frame name for Commands - WCmdstatic final String
Frame name for Menu - WMenustatic final String
Frame name for Apps PopUp - WPopUpstatic final String
Frame name for Apps Window - WWindowstatic final int
Timeout - 15 Minutes -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFooter
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServlet servlet, org.apache.ecs.xhtml.body body) Deprecated.static void
dump
(javax.servlet.http.HttpServletRequest request) Dump Requeststatic void
dump
(javax.servlet.http.HttpSession session) Dump Sessionstatic void
dump
(javax.servlet.ServletConfig config) Dump Servlet Configstatic void
dump
(javax.servlet.ServletContext ctx) Dump Sessionstatic String
getBaseDirectory
(String entry) Get Base Directory entry.static String
getCellContent
(int content) Get Cell Contentstatic String
getCellContent
(Object content) Get Cell Contentstatic String
getImageDirectory
(String entry) Get Image Directory entry.static org.apache.ecs.xhtml.img
getLogo()
Get Logo Image HTML tag.static String
Get Logo Path.static String
getStoreDirectory
(String entry) Get Store Directory entry.static String
Get Stylesheet Path.static boolean
initWeb
(javax.servlet.ServletConfig config) Init Web Environment.static boolean
initWeb
(javax.servlet.ServletContext context) Init Web.
-
Field Details
-
DEBUG
public static boolean DEBUGAdd HTML Debug Info -
DIR_BASE
Base Directory links http://localhost:8080/adempiere to the physical %adempiere_HOME%/jetty/webroot/adempiere directory- See Also:
-
TARGET_CMD
Frame name for Commands - WCmd- See Also:
-
TARGET_MENU
Frame name for Menu - WMenu- See Also:
-
TARGET_WINDOW
Frame name for Apps Window - WWindow- See Also:
-
TARGET_POPUP
Frame name for Apps PopUp - WPopUp- See Also:
-
CHARSET
Character Set (iso-8859-1 - utf-8)- See Also:
-
ENCODING
Encoding (ISO-8859-1 - UTF-8)- See Also:
-
COOKIE_INFO
Cookie Name- See Also:
-
TIMEOUT
public static final int TIMEOUTTimeout - 15 Minutes- See Also:
-
NBSP
Not Braking Space
-
-
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
Get Base Directory entry.
/adempiere/- Parameters:
entry
- file entry or path- Returns:
- url to entry in base directory
-
getImageDirectory
Get Image Directory entry.
/adempiere/images- Parameters:
entry
- file entry or path- Returns:
- url to entry in image directory
-
getStoreDirectory
Get Store Directory entry.
/adempiere/store- Parameters:
entry
- file entry or path- Returns:
- url to entry in store directory
-
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
Get Stylesheet Path./adempiere/standard.css
- Returns:
- url of Stylesheet
-
getCellContent
Get Cell Content- Parameters:
content
- optional content- Returns:
- string content or non breaking space
-
getCellContent
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
-