All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.lgeds.jdf.servlet.JDFBaseServlet

com.lgeds.jdf.servlet.JDFBaseServlet

public abstract class JDFBaseServlet

Variable Index

 o lineSeparator

Constructor Index

 o JDFBaseServlet()
BaseServlet constructor comment.

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
Performs the HTTP GET operation; the default implementation reports an HTTP BAD_REQUEST error.
 o doPost(HttpServletRequest, HttpServletResponse)
Performs the HTTP POST operation; the default implementation reports an HTTP BAD_REQUEST error.
 o performBasePreTask(HttpServletRequest, HttpServletResponse)
 o performPreTask(HttpServletRequest, HttpServletResponse)
 o printHtmlPage(HttpServletRequest, HttpServletResponse, String)
Sends a temporary redirect response to the client using the specified redirect location URL.
 o printJspPage(HttpServletRequest, HttpServletResponse, String)
Sends a temporary redirect response to the client using the specified redirect location of jsp file.
 o printMessagePage(HttpServletRequest, HttpServletResponse, Message)
 o printMessagePage(HttpServletRequest, HttpServletResponse, Message, Exception)
 o printMessagePage(HttpServletRequest, HttpServletResponse, Message, String)
 o printMessagePage(HttpServletRequest, HttpServletResponse, String)
 o printMessagePage(HttpServletRequest, HttpServletResponse, String, Exception)
 o printMessagePage(HttpServletRequest, HttpServletResponse, String, String)
ÀÌ Method´Â ¹Ýµå½Ã ÇÁ·ÎÁ§Æ®¿¡¼­ ±¸ÇöÇØ¼­ »ç¿ëÇØ¾ß ÇÔ.
 o printPopupMessagePage(HttpServletRequest, HttpServletResponse, Message)
 o printPopupMessagePage(HttpServletRequest, HttpServletResponse, Message, Exception)
 o printPopupMessagePage(HttpServletRequest, HttpServletResponse, Message, String)
 o printPopupMessagePage(HttpServletRequest, HttpServletResponse, String)
 o printPopupMessagePage(HttpServletRequest, HttpServletResponse, String, Exception)
 o printPopupMessagePage(HttpServletRequest, HttpServletResponse, String, String)
ÀÌ Method´Â ¹Ýµå½Ã ÇÁ·ÎÁ§Æ®¿¡¼­ ±¸ÇöÇØ¼­ »ç¿ëÇØ¾ß ÇÔ.

Variables

 o lineSeparator
 protected static String lineSeparator

Constructors

 o JDFBaseServlet
 public JDFBaseServlet()
BaseServlet constructor comment.

Methods

 o doGet
 protected void doGet(HttpServletRequest req,
                      HttpServletResponse res) throws ServletException, IOException
Performs the HTTP GET operation; the default implementation reports an HTTP BAD_REQUEST error. Overriding this method to support the GET operation also automatically supports the HEAD operation. (HEAD is a GET that returns no body in the response; it just returns the request HEADer fields.)

Servlet writers who override this method should read any data from the request, set entity headers in the response, access the writer or output stream, and, finally, write any response data. The headers that are set should include content type, and encoding. If a writer is to be used to write response data, the content type must be set before the writer is accessed. In general, the servlet implementor must write the headers before the response data because the headers can be flushed at any time after the data starts to be written.

Setting content length allows the servlet to take advantage of HTTP "connection keep alive". If content length can not be set in advance, the performance penalties associated with not using keep alives will sometimes be avoided if the response entity fits in an internal buffer.

Entity data written for a HEAD request is ignored. Servlet writers can, as a simple performance optimization, omit writing response data for HEAD methods. If no response data is to be written, then the content length field must be set explicitly.

The GET operation is expected to be safe: without any side effects for which users might be held responsible. For example, most form queries have no side effects. Requests intended to change stored data should use some other HTTP method. (There have been cases of significant security breaches reported because web-based applications used GET inappropriately.)

The GET operation is also expected to be idempotent: it can safely be repeated. This is not quite the same as being safe, but in some common examples the requirements have the same result. For example, repeating queries is both safe and idempotent (unless payment is required!), but buying something or modifying data is neither safe nor idempotent.

Parameters:
req - HttpServletRequest that encapsulates the request to the servlet
resp - HttpServletResponse that encapsulates the response from the servlet
Throws: IOException
if detected when handling the request
Throws: ServletException
if the request could not be handled
See Also:
setContentType
 o doPost
 protected void doPost(HttpServletRequest req,
                       HttpServletResponse res) throws ServletException, IOException
Performs the HTTP POST operation; the default implementation reports an HTTP BAD_REQUEST error. Servlet writers who override this method should read any data from the request (for example, form parameters), set entity headers in the response, access the writer or output stream and, finally, write any response data using the servlet output stream. The headers that are set should include content type, and encoding. If a writer is to be used to write response data, the content type must be set before the writer is accessed. In general, the servlet implementor must write the headers before the response data because the headers can be flushed at any time after the data starts to be written.

If HTTP/1.1 chunked encoding is used (that is, if the transfer-encoding header is present), then the content-length header should not be set. For HTTP/1.1 communications that do not use chunked encoding and HTTP 1.0 communications, setting content length allows the servlet to take advantage of HTTP "connection keep alive". For just such communications, if content length can not be set, the performance penalties associated with not using keep alives will sometimes be avoided if the response entity fits in an internal buffer.

This method does not need to be either "safe" or "idempotent". Operations requested through POST can have side effects for which the user can be held accountable. Specific examples including updating stored data or buying things online.

Parameters:
req - HttpServletRequest that encapsulates the request to the servlet
resp - HttpServletResponse that encapsulates the response from the servlet
Throws: IOException
if detected when handling the request
Throws: ServletException
if the request could not be handled
See Also:
setContentType
 o performBasePreTask
 protected void performBasePreTask(HttpServletRequest req,
                                   HttpServletResponse res) throws ServletException, IOException
Parameters:
req - HttpServletRequest
res - HttpServletResponse
 o performPreTask
 protected abstract void performPreTask(HttpServletRequest req,
                                        HttpServletResponse res) throws Exception
Parameters:
req - HttpServletRequest
res - HttpServletResponse
 o printHtmlPage
 protected void printHtmlPage(HttpServletRequest req,
                              HttpServletResponse res,
                              String location)
Sends a temporary redirect response to the client using the specified redirect location URL. The URL must be absolute (for example, https://hostname/path/file.html). Relative URLs are not permitted here.

Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
location - the redirect location URL
Throws: IOException
If an I/O error has occurred.
 o printJspPage
 protected void printJspPage(HttpServletRequest req,
                             HttpServletResponse res,
                             String jspfile)
Sends a temporary redirect response to the client using the specified redirect location of jsp file. The URL must be absolute (for example, /example/result.jsp). Relative URLs are not permitted here.

Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
jspfile - the redirect location URL of jsp file.
 o printMessagePage
 protected void printMessagePage(HttpServletRequest req,
                                 HttpServletResponse res,
                                 Message msg)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
msg - java.lang.String
 o printMessagePage
 protected void printMessagePage(HttpServletRequest req,
                                 HttpServletResponse res,
                                 Message user_msg,
                                 Exception e)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
e - Exception: °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printMessagePage
 protected void printMessagePage(HttpServletRequest req,
                                 HttpServletResponse res,
                                 Message user_msg,
                                 String debug_msg)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
debug_msg - °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printMessagePage
 protected void printMessagePage(HttpServletRequest req,
                                 HttpServletResponse res,
                                 String msg)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
msg - ÃÖÁ¾»ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
 o printMessagePage
 protected void printMessagePage(HttpServletRequest req,
                                 HttpServletResponse res,
                                 String user_msg,
                                 Exception e)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
e - Exception: °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printMessagePage
 protected abstract void printMessagePage(HttpServletRequest req,
                                          HttpServletResponse res,
                                          String user_msg,
                                          String debug_msg)
ÀÌ Method´Â ¹Ýµå½Ã ÇÁ·ÎÁ§Æ®¿¡¼­ ±¸ÇöÇØ¼­ »ç¿ëÇØ¾ß ÇÔ. ¿Ö³Ä¸é, ÇÁ·ÎÁ§Æ®¸¶´Ù Message¸¦ º¸¿©ÁÖ´Â È­¸éÀÌ ´Ù¸¦ ¼ö Àֱ⠶§¹®.

Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
debug_msg - °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printPopupMessagePage
 protected void printPopupMessagePage(HttpServletRequest req,
                                      HttpServletResponse res,
                                      Message msg)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
msg - java.lang.String
 o printPopupMessagePage
 protected void printPopupMessagePage(HttpServletRequest req,
                                      HttpServletResponse res,
                                      Message user_msg,
                                      Exception e)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
e - Exception: °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printPopupMessagePage
 protected void printPopupMessagePage(HttpServletRequest req,
                                      HttpServletResponse res,
                                      Message user_msg,
                                      String debug_msg)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
debug_msg - °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printPopupMessagePage
 protected void printPopupMessagePage(HttpServletRequest req,
                                      HttpServletResponse res,
                                      String msg)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
msg - ÃÖÁ¾»ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
 o printPopupMessagePage
 protected void printPopupMessagePage(HttpServletRequest req,
                                      HttpServletResponse res,
                                      String user_msg,
                                      Exception e)
Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
e - Exception: °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.
 o printPopupMessagePage
 protected abstract void printPopupMessagePage(HttpServletRequest req,
                                               HttpServletResponse res,
                                               String user_msg,
                                               String debug_msg)
ÀÌ Method´Â ¹Ýµå½Ã ÇÁ·ÎÁ§Æ®¿¡¼­ ±¸ÇöÇØ¼­ »ç¿ëÇØ¾ß ÇÔ. ¿Ö³Ä¸é, ÇÁ·ÎÁ§Æ®¸¶´Ù Message¸¦ º¸¿©ÁÖ´Â È­¸éÀÌ ´Ù¸¦ ¼ö Àֱ⠶§¹®.

Parameters:
req - javax.servlet.http.HttpServletRequest
res - javax.servlet.http.HttpServletResponse
user_msg - ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô º¸¿©Áú ¸Þ¼¼Áö
debug_msg - °³¹ß½ÃÁ¡¿¡¼­ °³¹ßÀÚ°¡ DebuggingÀ» À§ÇØ º¸´Â ¸Þ¼¼Áö, Åë»ó ¿î¿µ½Ã´Â º¸ÀÌÁö ¾Êµµ·Ï ÇÔ.

All Packages  Class Hierarchy  This Package  Previous  Next  Index