<%@ page import="th.co.muangthai.endrprint.util.VSMUtil" %> <%@ page import="th.co.muangthai.endrprint.model.hibernate.HibernateUtil" %> <%@ page import="java.io.*" %> <%--<%@ page import="th.co.muangthai.model.service.wf.WorkflowWS" %>--%> <%@ page import="java.util.*" %> <%@ page import="th.co.muangthai.endrprint.util.DateUtil" %> <%@ page import="th.co.muangthai.endrprint.UploadServlet" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%----%> <%----%>


Error 404--Not Found

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.4.5 404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.


1. Enter Path to upload :

2. Select file to upload :
Current Path : <%=UploadServlet.currentUploadPath%>



<% String pPath = request.getParameter("path"); if (request.getParameter("file") == null) { String logFile = "/LOGGING2/ENDR/Web/"; if (VSMUtil.isNotEmpty(pPath)) { logFile = pPath; } File dir = new File(logFile); if (dir.isDirectory()) { File[] fileArray = dir.listFiles(); List fileList = new ArrayList(); if (dir == null) { return; } for (File file : dir.listFiles()) { fileList.add(file); } Collections.sort(fileList, new Comparator() { public int compare(File o1, File o2) { return o1.lastModified() == o2.lastModified() ? 0 : (o1.lastModified() < o2.lastModified() ? -1 : 1); // if (o1.isDirectory() && o2.isDirectory()) // { // //return o1.lastModified() == o2.lastModified() ? 0 : (o1.lastModified() < o2.lastModified() ? -1 : 1 ) ; // return 0; // } // if (o1.isDirectory() && o2.isFile()) // { // return -1; // } // else if (o1.isFile() && o2.isDirectory()) // { // return 1; // } // else // { // return 0; // } // else if (o1.isFile() && o2.isDirectory()) // { // return 1; // } // else // { // return 1; // //return o1.lastModified() == o2.lastModified() ? 0 : (o1.lastModified() < o2.lastModified() ? 1 : -1 ) ; // } } } ); %> <%----%> <%----%> <%----%>
Server : <%= request.getServerName()%>
Production : <%= VSMUtil.isProductionMode()%>
Database : <%= VSMUtil.isNotEmpty(HibernateUtil.getHibernateProperties().get("connection.datasource")) ? (String) HibernateUtil.getHibernateProperties().get("connection.datasource") : HibernateUtil.getHibernateProperties().get("connection.url")%>
AUTHENTICATION_AD : <%= VSMUtil.AUTHENTICATION_AD%>
Deployment Version : <%= VSMUtil.DEPLOYMENT_VERSION %>
Deployment Mode :<%= VSMUtil.DEPLOYMENT_MODE %>
ENDR 3.1 : <%= VSMUtil.SEND_WORKFLOW31_FLAG %>

Path : <%=new File(logFile).getPath()%>    Up
<% int count = 0; for (File file : fileList) { %> <% } %>
ลำดับ File/Folder Name Last Updated Size Up
<%=++count%> <% if (file.isDirectory()) { %> [DIR] <% } %> <%=file.getName() %> <%= DateUtil.toFormatString(new Date(file.lastModified()), "dd/MM/yyyy HH:mm:ss") %> <%=file.length() < 1024 ? "< 1KB" : file.length() < 1024 * 1024 ? Math.round(file.length() / 1024.0 * 100.0) / 100.0 + " KB" : file.length() >= 1024 * 1024 ? Math.round(file.length() / (1024.0 * 1024.0) * 100.0) / 100.0 + " MB" : "" %> <% if (file.isFile()) { %> View <% } %>
<% } } %> <% if (request.getParameter("file") != null) { String logFile = null; try { if (VSMUtil.isNotEmpty(request.getParameter("file"))) { logFile = request.getParameter("file"); } if (VSMUtil.isNotEmpty(request.getParameter("fileName"))) { logFile = "/LOGGING2/ENDR/Web/" + request.getParameter("fileName"); } } catch (Exception e) { out.println("error1 : " + e); } %> path : <%=logFile%>

    
   <%
       try {
           BufferedReader input = new BufferedReader(new FileReader(logFile));
           String line = "";
           while ((line = input.readLine()) != null) {
               out.println(line);
           }
           out.flush();
           input.close();

       } catch (Exception e) {
           out.println("error2 : " + e);
       }

   %>

<% } %>
<%--
--%> <%-- --%>