|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.servlet.E4ServletImplementation
e4s.servlet.E4ServletImplementation_Servlet
public class E4ServletImplementation_Servlet
Main and common implementation of the e4s when running on a web server such as Tomcat.
Alternate implementations are E4ServletImplementation_Applet for local applets
and E4ServletImplementation_Symbol for PDA environments.
E4ServletImplementation_Applet,
E4ServletImplementation_Symbol| Field Summary |
|---|
| Fields inherited from class e4s.servlet.E4ServletImplementation |
|---|
COOKIE_PREFIX, COOKIE_SEPERATOR, m_last_alias, m_last_mref |
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Fields inherited from interface e4s.servlet.E4ServletImplementation_Intf |
|---|
PARAM_FUNCTION, PARAM_PRESERVED |
| Constructor Summary | |
|---|---|
E4ServletImplementation_Servlet(HttpServletRequest req,
HttpServletResponse res)
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
void |
assignCSS(int level,
CSS_Name name)
Assign a E4CSS style to the current session. |
java.lang.String |
closeHtmlOutput()
|
E4DocumentBase |
defaultE4DocumentBase()
This is the default document base, defined in e4settings#getDocBase(). |
E4PersistantBase |
defaultPersistantBase()
|
void |
flushBuffer()
|
java.lang.String |
get(java.lang.String paramname)
Get the CGI Parameter specified by the name. |
int |
getContentLength()
Get the servlet's content length. |
java.lang.String |
getContentType()
Get the servlet's content type. |
ServletContext |
getContext()
Get the servlet's context. |
java.lang.String |
getCookie(java.lang.String name)
Get value from a local cookie. |
CSS_Name |
getCSS(int level)
Get the E4CSS style for the current session. |
java.text.SimpleDateFormat |
getDateTimeFormat()
Get the date and time format. |
java.lang.String |
getHttpAddr()
Get the HttpAddr out of the request context. |
int |
getMaxInactiveInterval()
Gets the interactive timeout for the current session, this calls HttpRequest.getMaxInactiveInterval(). |
long |
getOutputBufSize()
Char's written to the output buffer. |
ServletOutputStream |
getOutputStream()
The servlet response output stream. |
E4CgiParams |
getParameters()
Collect the HTML (CGI) Parameters. |
E4CgiParams |
getParameters(boolean UTF8)
Collect the HTML (CGI) Parameters. |
java.lang.String |
getPersistantParameter(java.lang.String paramname)
Get a user dependent parameter from the user value settings. |
int[] |
getPersistantParameterIntArr(java.lang.String paramname)
Get a user dependent parameter from the user value settings. |
E4StringBufferHtml |
getPreserved(java.lang.String preservedId)
Get the buffer for the preserved element. |
java.lang.String |
getReferer()
Returns the reference (from where it comes from) |
java.lang.String |
getRemoteAddr()
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request. |
HttpServletRequest |
getRequest()
Get the servlet's request. |
HttpServletResponse |
getResponse()
Get the servlet's response. |
HttpSession |
getSession()
Get the servlet's session. |
java.lang.String |
getSessionId()
Get the servlet's session identification. |
java.lang.Object |
getSessionObject(java.lang.String obj_id)
Get a session object for the current user session. |
java.lang.Object |
getSessionObject(java.lang.String obj_id,
boolean exception_not_found)
Get a session object for the current user session. |
java.util.Hashtable |
getSessionObjects()
Get a Hashtable containing all session objects. |
java.lang.String |
getUrl()
Get the URL of the servlet itself. |
java.lang.String |
getUserAgent()
Returns the user's browser. |
void |
invalidateSession(boolean immediatly)
Invalidates the session, unbinds any objects related to this session. |
boolean |
invoceFunction()
|
HTML |
invoceFunctionHTML(E4Method_Intf mref)
Main function dispatcher |
HTML |
invoceFunctionHTML(E4Method_Intf mref,
E4CgiParams params)
Main function dispatcher |
boolean |
isRunningClient()
Check, if the implementation of this interface is running in E4Client mode. |
boolean |
isRunningServer()
Check, if the implementation of this interface is running in Server mode. |
void |
onExitTask()
This function is called on exit of the current task. |
void |
openHtmlOutput()
|
void |
rem(java.lang.String s)
|
void |
removeSessionObject(java.lang.String obj_id)
Remove a session object for the current user session. |
void |
removeSessionObjects()
Removes all session objects for the current session. |
void |
sendmail(java.lang.Throwable t,
java.lang.String txt)
Sends an error mail to the mail address that is specified in E4Settings.getErrorMailto(),
requires that mail is enabled (E4SendMail.isMailEnabled()). |
void |
setCookie(java.lang.String name,
java.lang.String val)
Store a value in a cookie. |
static void |
setDefaultE4DocumentBase(E4DocumentBase base)
|
static void |
setDefaultPersistantBase(E4PersistantBase base)
|
void |
setMaxInactiveInterval(int interval)
Sets the interactive timeout for the current session, this calls HttpRequest.setMaxInactiveInterval(). |
void |
setPersistantParameter(java.lang.String paramname,
java.lang.String paramvalue)
Save a user dependent parameter in the user value settings. |
void |
setSessionObject(E4SessionObject_Intf obj)
Set a session object for the current user session. |
void |
setSessionObject(java.lang.String obj_id,
java.lang.Object obj)
Set a session object for the current user session. |
void |
SystemError(E4DBException dbe)
|
void |
SystemError(E4ServletInvocationError sie)
|
void |
SystemError(int errortype,
java.lang.Throwable t,
java.lang.String txt)
|
void |
SystemError(java.io.IOException ioe)
|
void |
SystemError(org.xml.sax.SAXParseException spe)
|
void |
SystemError(java.lang.String errormsg)
|
void |
SystemError(java.lang.Throwable t)
|
void |
write(java.awt.image.BufferedImage image)
Write an image (as graphic) to the servlet's context. |
void |
write(java.awt.image.BufferedImage image,
java.lang.String contentType)
Write an image (as graphic) to the servlet's context. |
void |
write(E4HtmlElement element)
Execute the E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) functions for this element
and append the HTML content generated to the current output buffer. |
void |
write(HTML element,
boolean silent)
Execute the E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) functions for this element
and append the HTML content generated to the current output buffer. |
void |
write(java.lang.String s)
|
void |
write(java.lang.StringBuffer s)
|
void |
writeln(java.lang.String s)
|
void |
writePreserved(java.lang.String id,
E4HtmlElement_Intf element)
Store any (typically frame) content for later output by the function writePreservedOut(). |
boolean |
writePreservedOut()
Process (write out) any prestored output. |
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public E4ServletImplementation_Servlet(HttpServletRequest req,
HttpServletResponse res)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public HttpServletRequest getRequest()
getContext(),
getResponse()public HttpServletResponse getResponse()
getContext(),
getRequest()public ServletContext getContext()
getResponse(),
getRequest()public boolean isRunningServer()
E4ServletImplementation_Intf
isRunningServer in interface E4ServletImplementation_IntfE4ServletImplementation_Servlet,
E4ServletImplementation_Intf.isRunningClient()public boolean isRunningClient()
E4ServletImplementation_Intf
isRunningClient in interface E4ServletImplementation_IntfE4ServletImplementation_Intf.isRunningServer()public void openHtmlOutput()
openHtmlOutput in interface E4ServletImplementation_Intfpublic void flushBuffer()
public void writeln(java.lang.String s)
writeln in interface E4ServletImplementation_Intfpublic void write(java.lang.String s)
write in interface E4ServletImplementation_Intfpublic void write(java.lang.StringBuffer s)
public void rem(java.lang.String s)
rem in interface E4ServletImplementation_Intfpublic java.lang.String closeHtmlOutput()
closeHtmlOutput in interface E4ServletImplementation_Intf
public void write(E4HtmlElement element)
throws java.lang.Exception
E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) functions for this element
and append the HTML content generated to the current output buffer.
write in interface E4ServletImplementation_Intfelement - the HTML element to be rendered
java.lang.ExceptionE4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf)
public void write(HTML element,
boolean silent)
throws java.lang.Exception
E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) functions for this element
and append the HTML content generated to the current output buffer.
element - the HTML element to be rendered
java.lang.ExceptionE4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf)
public void writePreserved(java.lang.String id,
E4HtmlElement_Intf element)
writePreservedOut().
writePreserved in interface E4ServletImplementation_Intfid - the value of the E4ServletImplementation_Intf.PARAM_PRESERVED parameter as generated by the FRAMESET.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function.element - the element to convert into plain HtmlE4ServletImplementation_Intf.writePreserved(String,E4HtmlElement_Intf),
FRAMESET.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf),
E4ServletImplementation_Intf.writePreservedOut()public boolean writePreservedOut()
E4ServletImplementation_IntfFRAMESET and E4ServletImplementation_Intf.writePreserved(java.lang.String, e4s.html.E4HtmlElement_Intf).
This function needs to be placed in doPost() or doGet() before any other
actions take place.
writePreservedOut in interface E4ServletImplementation_IntfE4ServletImplementation_Intf.PARAM_PRESERVED parameter.
In this case, no further output or action is needed.
false, no preserved requested ID available, normal proceeding recommended.E4ServletImplementation_Intf.writePreservedOut()public E4StringBufferHtml getPreserved(java.lang.String preservedId)
E4ServletImplementation_Intf
getPreserved in interface E4ServletImplementation_IntfE4ServletImplementation_Intf.writePreservedOut(),
E4ServletImplementation_Intf.writePreserved( String, E4HtmlElement_Intf ),
e4s.E4Constants#PARAM_PRESERVEDpublic HTML invoceFunctionHTML(E4Method_Intf mref)
invoceFunctionHTML in interface E4ServletImplementation_Intf
public HTML invoceFunctionHTML(E4Method_Intf mref,
E4CgiParams params)
invoceFunctionHTML in interface E4ServletImplementation_Intfmref - the function beeing calledparams - the CgiParameterspublic java.lang.String get(java.lang.String paramname)
paramname - the name of the parameter
E4CgiParams using getParameters().public boolean invoceFunction()
invoceFunction in interface E4ServletImplementation_Intf
public E4CgiParams getParameters()
throws java.lang.Exception
getParameters in interface E4ServletImplementation_Intfjava.lang.Exceptionpublic E4CgiParams getParameters(boolean UTF8)
UTF8 - true: switch servlet request into UTF-8 mode
public java.lang.String getUrl()
getUrl in interface E4ServletImplementation_Intfpublic java.lang.String getSessionId()
getSessionId in interface E4ServletImplementation_IntfgetSessionId in class E4ServletImplementationE4ServletImplementation_Intf.invalidateSession(boolean),
E4ServletImplementation_Intf.getSession()public HttpSession getSession()
getSession in interface E4ServletImplementation_IntfE4ServletImplementation_Intf.invalidateSession(boolean),
E4ServletImplementation_Intf.getSessionId()public java.lang.Object getSessionObject(java.lang.String obj_id)
getSessionObject in interface E4ServletImplementation_IntfgetSessionObject in class E4ServletImplementationobj_id - identifyer for the object
removeSessionObject( String ),
setSessionObject( String, Object ),
getSessionObjects(),
E4ServletImplementation.setSessionObject( String, boolean ),
E4ServletImplementation.setSessionObject( String, long ),
E4ServletImplementation.getSessionObject_String( String ),
E4ServletImplementation.getSessionObject_Long( String ),
E4ServletImplementation.getSessionObject_Boolean( String )
public java.lang.Object getSessionObject(java.lang.String obj_id,
boolean exception_not_found)
throws E4Exception
getSessionObject in interface E4ServletImplementation_Intfobj_id - identifyer for the objectexception_not_found - if true, throws an exception if session object cannot be found
E4ExceptionremoveSessionObject( String ),
setSessionObject( String, Object ),
getSessionObjects(),
E4ServletImplementation.setSessionObject( String, boolean ),
E4ServletImplementation.setSessionObject( String, long ),
E4ServletImplementation.getSessionObject_String( String ),
E4ServletImplementation.getSessionObject_Long( String ),
E4ServletImplementation.getSessionObject_Boolean( String )public void setSessionObject(E4SessionObject_Intf obj)
setSessionObject in interface E4ServletImplementation_Intfobj - the object to be storedremoveSessionObject( String ),
getSessionObject( String ),
getSessionObjects(),
E4ServletImplementation.setSessionObject( String, boolean ),
E4ServletImplementation.setSessionObject( String, long ),
E4ServletImplementation.getSessionObject_String( String ),
E4ServletImplementation.getSessionObject_Long( String ),
E4ServletImplementation.getSessionObject_Boolean( String )
public void setSessionObject(java.lang.String obj_id,
java.lang.Object obj)
setSessionObject in interface E4ServletImplementation_IntfsetSessionObject in class E4ServletImplementationobj_id - identifyer for the objectobj - the object to be storedremoveSessionObject( String ),
getSessionObject( String ),
getSessionObjects(),
E4ServletImplementation.setSessionObject( String, boolean ),
E4ServletImplementation.setSessionObject( String, long ),
E4ServletImplementation.getSessionObject_String( String ),
E4ServletImplementation.getSessionObject_Long( String ),
E4ServletImplementation.getSessionObject_Boolean( String )public java.util.Hashtable getSessionObjects()
getSessionObjects in interface E4ServletImplementation_IntfgetSessionObjects in class E4ServletImplementationremoveSessionObject( String ),
setSessionObject( String, Object ),
getSessionObject( String ),
E4ServletImplementation.setSessionObject( String, boolean ),
E4ServletImplementation.setSessionObject( String, long ),
E4ServletImplementation.getSessionObject_String( String ),
E4ServletImplementation.getSessionObject_Long( String ),
E4ServletImplementation.getSessionObject_Boolean( String )public void removeSessionObject(java.lang.String obj_id)
removeSessionObject in interface E4ServletImplementation_IntfremoveSessionObject in class E4ServletImplementationobj_id - identifyer for the objectgetSessionObject( String ),
setSessionObject( String, Object ),
getSessionObjects(),
E4ServletImplementation.setSessionObject( String, boolean ),
E4ServletImplementation.setSessionObject( String, long ),
E4ServletImplementation.getSessionObject_String( String ),
E4ServletImplementation.getSessionObject_Long( String ),
E4ServletImplementation.getSessionObject_Boolean( String )public void removeSessionObjects()
E4ServletImplementation_Intf
removeSessionObjects in interface E4ServletImplementation_Intfpublic java.text.SimpleDateFormat getDateTimeFormat()
getDateTimeFormat in interface E4ServletImplementation_IntfE4ServletImplementation_Intf.getDateFormat(),
E4ServletImplementation_Intf.getTimeFormat()public void SystemError(java.lang.Throwable t)
SystemError in interface E4ServletImplementation_Intfpublic void SystemError(E4DBException dbe)
SystemError in interface E4ServletImplementation_Intfpublic void SystemError(org.xml.sax.SAXParseException spe)
public void SystemError(java.io.IOException ioe)
SystemError in interface E4ServletImplementation_Intfpublic void SystemError(E4ServletInvocationError sie)
public void SystemError(int errortype,
java.lang.Throwable t,
java.lang.String txt)
SystemError in interface E4ServletImplementation_Intfpublic void SystemError(java.lang.String errormsg)
SystemError in interface E4ServletImplementation_Intfpublic E4DocumentBase defaultE4DocumentBase()
e4settings#getDocBase().
defaultE4DocumentBase in interface E4ServletImplementation_IntfsetDefaultE4DocumentBase(e4s.html.E4DocumentBase),
e4settings#getDocBase()public static void setDefaultE4DocumentBase(E4DocumentBase base)
public E4PersistantBase defaultPersistantBase()
defaultPersistantBase in interface E4ServletImplementation_Intfpublic static void setDefaultPersistantBase(E4PersistantBase base)
public void setPersistantParameter(java.lang.String paramname,
java.lang.String paramvalue)
setPersistantParameter in interface E4ServletImplementation_Intfparamname - name of the parameterparamvalue - value for this parameterE4ServletImplementation_Intf.getPersistantParameter(java.lang.String),
#getSystemParameterpublic java.lang.String getPersistantParameter(java.lang.String paramname)
getPersistantParameter in interface E4ServletImplementation_Intfparamname - name of the parameter
E4ServletImplementation_Intf.setPersistantParameter(java.lang.String, java.lang.String),
#setSystemParameter,
E4ServletImplementation_Intf.getPersistantParameterIntArr(java.lang.String)public int[] getPersistantParameterIntArr(java.lang.String paramname)
getPersistantParameterIntArr in interface E4ServletImplementation_Intfparamname - name of the parameter
E4ServletImplementation_Intf.getPersistantParameter(java.lang.String),
E4ServletImplementation_Intf.getPersistantParameterIntArr(java.lang.String)public long getOutputBufSize()
public ServletOutputStream getOutputStream()
public void assignCSS(int level,
CSS_Name name)
throws E4Exception
assignCSS in interface E4ServletImplementation_Intfname - the name of the E4CSS to be associated with this session
E4ExceptionE4CssFile,
#getCSS(integer)public CSS_Name getCSS(int level)
getCSS in interface E4ServletImplementation_IntfE4CssFile,
assignCSS(int, e4s.html.style.CSS_Name)
public void setCookie(java.lang.String name,
java.lang.String val)
setCookie in interface E4ServletImplementation_IntfsetCookie in class E4ServletImplementationname - the name of the cookieval - the value of the cookieE4ServletImplementation.setCookie(String,String[]),
E4ServletImplementation.setCookie(String,boolean),
E4ServletImplementation.setCookie(String,long),
E4ServletImplementation.setCookie(String,int),
E4ServletImplementation.setCookie(String,e4s.util.E4String),
E4ServletImplementation.setCookie(String,e4s.util.E4Long),
E4ServletImplementation.setCookie(String,java.util.Date),
#getCookie()public java.lang.String getCookie(java.lang.String name)
getCookie in interface E4ServletImplementation_IntfgetCookie in class E4ServletImplementationname - the name of the cookie
#setCookie(String)public java.lang.String getRemoteAddr()
getRemoteAddr in interface E4ServletImplementation_IntfgetRemoteAddr in class E4ServletImplementationpublic java.lang.String getUserAgent()
public java.lang.String getReferer()
public java.lang.String getContentType()
getContentLength()public int getContentLength()
getContentType()
public void sendmail(java.lang.Throwable t,
java.lang.String txt)
E4Settings.getErrorMailto(),
requires that mail is enabled (E4SendMail.isMailEnabled()).
t - the errortxt - some additional textE4Settings.getErrorMailto(),
E4SendMail.isMailEnabled(),
E4Util.getRevisionCodeFromSVN(Class),
_getSVNVersionString(),
e4s.html.SystemErrorpublic void invalidateSession(boolean immediatly)
getSession().invalidate().
invalidateSession in interface E4ServletImplementation_Intfimmediatly - true: immediatly terminates the session now, false: terminates the session an servlet exitgetSession(),
getSessionId()public void onExitTask()
E4ServletImplementation_Intf
onExitTask in interface E4ServletImplementation_Intfpublic java.lang.String getHttpAddr()
E4Settings.getHttpAddr() is, that this value
is really taken from the servlet request and not from the .ini file of the
application which can be defined by an administrative user (e.g. without any
port information). It is recommended, that you will use the value from
E4Settings.getHttpAddr() which in the case it is not defined
will be taken from this function here initially.
getHttpAddr in interface E4ServletImplementation_IntfE4Settings.getHttpAddr()public void setMaxInactiveInterval(int interval)
interval - seconds of timeoutgetMaxInactiveInterval(),
FRAMESET.addKeepAliveScript(e4s.servlet.E4ServletImplementation_Intf),
BODY.addKeepAliveScript(e4s.servlet.E4ServletImplementation_Intf)public int getMaxInactiveInterval()
setMaxInactiveInterval(int),
FRAMESET.addKeepAliveScript(e4s.servlet.E4ServletImplementation_Intf),
BODY.addKeepAliveScript(e4s.servlet.E4ServletImplementation_Intf)
public void write(java.awt.image.BufferedImage image)
throws java.io.IOException
image - the image
java.io.IOExceptionwrite(BufferedImage,String)
public void write(java.awt.image.BufferedImage image,
java.lang.String contentType)
throws java.io.IOException
image - the image
java.io.IOExceptionwrite(BufferedImage)public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||