Package org.compiere.util
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 Summary
Fields Modifier and Type Field Description static String
CHARSET
Character Set (iso-8859-1 - utf-8)static String
COOKIE_INFO
Cookie Namestatic boolean
DEBUG
Add HTML Debug Infostatic String
DIR_BASE
Base Directory links http://localhost:8080/adempiere to the physical %adempiere_HOME%/jetty/webroot/adempiere directorystatic String
ENCODING
Encoding (ISO-8859-1 - UTF-8)static String
NBSP
Not Braking Spacestatic String
TARGET_CMD
Frame name for Commands - WCmdstatic String
TARGET_MENU
Frame name for Menu - WMenustatic String
TARGET_POPUP
Frame name for Apps PopUp - WPopUpstatic String
TARGET_WINDOW
Frame name for Apps Window - WWindowstatic int
TIMEOUT
Timeout - 15 Minutes
-
Constructor Summary
Constructors Constructor Description WebEnv()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addFooter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServlet servlet, org.apache.ecs.xhtml.body body)
Add Footer (with diagnostics)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
getLogoURL()
Get Logo Path.static String
getStoreDirectory(String entry)
Get Store Directory entry.static String
getStylesheetURL()
Get Stylesheet Path.static boolean
initWeb(javax.servlet.ServletConfig config)
Init Web Environment.static boolean
initWeb(javax.servlet.ServletContext context)
Init Web.
-
-
-
Field Detail
-
DEBUG
public static boolean DEBUG
Add HTML Debug Info
-
DIR_BASE
public static final String DIR_BASE
Base Directory links http://localhost:8080/adempiere to the physical %adempiere_HOME%/jetty/webroot/adempiere 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 String NBSP
Not Braking Space
-
-
Method Detail
-
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
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)
Add Footer (with diagnostics)- Parameters:
request
- requestresponse
- responseservlet
- servletbody
- - Body to add footer
-
-