public class WebCommonUtility extends MaliCommonHttpServlet
encoding, out| Constructor and Description |
|---|
WebCommonUtility() |
| Modifier and Type | Method and Description |
|---|---|
static void |
downloadWebFile(javax.servlet.http.HttpServletRequest p_requset,
javax.servlet.http.HttpServletResponse p_response,
java.lang.String downloadurl,
java.lang.String inoutputfilename)
提供Web 執行實際檔案下載動作, 提供 Web 目錄的 檔名,系統會自動轉換為絶對目錄檔名
|
static void |
downloadWebFilewithInputStream(javax.servlet.http.HttpServletResponse p_response,
java.io.InputStream sf,
java.lang.String inoutputfilename)
沒有實際產生檔案在sever, 只要有產生成 InputStream 即可提供檔案下載
|
static void |
downloadWebFilewithRealPath(javax.servlet.http.HttpServletResponse p_response,
java.lang.String realpathfile,
java.lang.String inoutputfilename)
提供 Web 執行實際檔案下載動作, 提供絶對目錄檔名
|
static java.lang.String |
getRealPath(javax.servlet.http.HttpServletRequest request,
java.lang.String inpath)
取實際目錄
|
static BaseTable |
parserQueryString(java.lang.String s)
解析 request.QueryString
|
static java.lang.String |
tranDeCodeFullfilePath(java.lang.String in)
轉換回解密文字
|
static java.lang.String |
tranEnCodeFullfilePath(java.lang.String in)
轉換原 FILE NAME 或文字轉成加密 文字
|
static void |
ViewWebFilewithRealPath(javax.servlet.http.HttpServletResponse p_response,
java.lang.String realpathfile,
java.lang.String inoutputfilename,
java.lang.String contentType)
直接Web View file
|
checkSpaceWord, doGet, doPost, forwardErrorpage, forwardErrorpage, getAjaxAttribute, getAjaxForward, getAjaxForwardAttribute, getAjaxObject, getAttributeData, getClassLoader, getencoding, getForward, getForwardAttribute, getForwardObject, getForwardParas, getParameter, getParameter, getParameterData, getServletAttribute, getServletUrl, getTableAttribute, getTableClass, getTableType, getTarget, init, isSystemUseConfig, isUseConfig, isUseforward, outputJson, outputXML, setCurRunAction, setencoding, setParameter, setTableType, setTarget, setUseConfig, toChi, transferProceseRequestpublic static void downloadWebFile(javax.servlet.http.HttpServletRequest p_requset,
javax.servlet.http.HttpServletResponse p_response,
java.lang.String downloadurl,
java.lang.String inoutputfilename)
throws java.lang.Exception
p_request - p_response - downloadurl - Web目錄檔名inoutputfilename - 準備產出下載另外命名檔名,若是空白,則依原來準備下載的 downloadurl上的檔名為主java.lang.Exceptionpublic static void downloadWebFilewithRealPath(javax.servlet.http.HttpServletResponse p_response,
java.lang.String realpathfile,
java.lang.String inoutputfilename)
throws java.lang.Exception
p_response - realpathfile - RealPath 絶對目錄檔名,準備要下載的檔名inoutputfilename - 產出下載的java.lang.Exceptionpublic static void ViewWebFilewithRealPath(javax.servlet.http.HttpServletResponse p_response,
java.lang.String realpathfile,
java.lang.String inoutputfilename,
java.lang.String contentType)
throws java.lang.Exception
p_response - realpathfile - inoutputfilename - contentType - View 檔案的型態 Ex text/xml or application/pdfjava.lang.Exceptionpublic static void downloadWebFilewithInputStream(javax.servlet.http.HttpServletResponse p_response,
java.io.InputStream sf,
java.lang.String inoutputfilename)
throws java.io.IOException
p_response - 在jsp 中送入 reponsesf - InputStream 資料inoutputfilename - 準備產生下載的檔名java.io.IOExceptionpublic static java.lang.String getRealPath(javax.servlet.http.HttpServletRequest request,
java.lang.String inpath)
request - inpath - public static java.lang.String tranEnCodeFullfilePath(java.lang.String in)
throws java.lang.Exception
in - java.lang.Exceptionpublic static java.lang.String tranDeCodeFullfilePath(java.lang.String in)
throws java.lang.Exception
in - java.lang.Exceptionpublic static BaseTable parserQueryString(java.lang.String s)
s -