-1
我在理解下面提到的代碼片段時遇到了問題。實際上,它是.inc文件中的一個內容。我感到困惑的是存儲在路徑變量中的內容。 不會是當前的工作目錄或任何其他的路徑...理解上的困惑在我的web應用程序中包含文件
<%
String path = application.getRealPath(request.getServletPath());
path = path.substring(0, path.lastIndexOf(java.io.File.separator));
String dictionaryPath = path + java.io.File.separator + "dictionaries/english.txt";
String userdict = path + java.io.File.separator + "spellchecker/dictionaries/user/user-dictionary.txt";
int searchdepth = 50;
boolean striphtml = true;
String format = "javascript";
int suggestions = 14;
if (request.getParameter("jsvar") != null) {
if (!java.util.regex.Pattern.matches("^[a-zA-Z0-9_.\\[\\]]+$", request.getParameter("jsvar"))) {
out.println("Invalid Jsvar");
return;
}
}
%>
感謝您的答覆....有點幫助......但還是要做的事情.... :) – 2011-06-09 09:16:40
@Abhimanyu:我等待您的項目完成,然後;) – 2011-06-09 09:21:21
@adeel ...謝謝,,,希望我快速做到.... – 2011-06-09 10:05:34