%! public String root = "/azaro/accessories"; // HttpServletRequest hreq; String jsroot =getServletContext().getRealPath("azaro"); System.out.println(jsroot); public String jsproot =jsroot +"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 ; } %> <%! String jsroot =getServletContext().getRealPath();// i removed the parameter application name here since its azaro // String jsroot =getServletContext().getRealPath("azaro"); %>