<%! public String root = "/azaro/accessories"; HttpServletRequest hreq; public String jsproot ="C:\\www\\TC-5.5.17\\webbapps\\azaro\\accessoriesjsp"; // public String jsproot =hreq.getRealPath("/")+"azaro/accessoriesjsp"; private String replace(String pat, String rep, String ori) { int count = 0; int i, j; StringBuffer sb; for (i=0; (i = ori.indexOf(pat, i)) != -1; i += pat.length()) ++count; sb = new StringBuffer(ori.length() + count*(rep.length()-pat.length())); for (i=0; (j = ori.indexOf(pat, i)) != -1; i = j + pat.length()) sb.append(ori.substring(i, j)).append(rep); sb.append(ori.substring(i)); return sb.toString(); } protected String getParameter( javax.servlet.http.HttpServletRequest request, String name, String defaultVal ) { if ( request.getParameter( name ) != null ) return request.getParameter( name ) ; else return defaultVal ; } %>