Java Set for the Heap Size

1.Find the Maximum heap size: javaw -XX:+PrintFlagsFinal | find “MaxHeapSize” 2.Find the Initial heap size: javaw -XX:+PrintFlagsFinal | find “InitialHeapSize” 3. Change the Heap size @set JAVA_OPTS=-Xms256m -Xmx1g OR java -Xms (set initial Java heap size) java -Xmx (set maximum Java heap size) java -Xss… Read More

JSP Take the Correct Absolute Path

1.Take the Correct Absolute Path Find the absolute path of the current coding JSP file String jspFilePath = getServletContext().getRealPath(request.getRequestURI()).replace(‘\\’, ‘/’); String absPath = jspFilePath.substring(0, jspFilePath.lastIndexOf(“/”)); absPath = absPath.substring(0, absPath.lastIndexOf(“/”));