String x = request.getRealPath(request.getServletPath());  String s = File.separator; String prefsFile=x.substring(0,x.lastIndexOf(s)) + s + "WEB-INF" + s + "debugPrefs.obj";  File pFile = new File(prefsFile);
String prefsFile=getDebugPrefsFileName(request);  File pFile = null; if(prefsFile!=null) pFile=new File(prefsFile);
	public static Map readDebugPrefs(HttpServletRequest request) throws Exception{		String x = request.getRealPath(request.getServletPath());		//Fix submitted by jaakko.linnosaari@tkk.fi to take care of my sloppy OS handling		String s = File.separator;		String prefsFile=x.substring(0,x.lastIndexOf(s)) + s + "WEB-INF" + s + "debugPrefs.obj";		//String prefsFile=x.substring(0,x.lastIndexOf("\\")) + "\\WEB-INF\\debugPrefs.obj";		File pFile = new File(prefsFile);		Map prefs = null;		HttpSession session = request.getSession();		if(pFile.exists()) {			ObjectInputStream ois = new ObjectInputStream(new FileInputStream(prefsFile));			prefs = (Map)ois.readObject();			ois.close();		}else{			prefs=new HashMap();			prefs.put("isActive",Boolean.FALSE);			prefs.put("i2miDir","");			prefs.put("siteDir","");			prefs.put("doShowResources",Boolean.TRUE);			prefs.put("doShowResourcesInSitu",Boolean.FALSE);			prefs.put("doHideStyles",Boolean.FALSE);			prefs.put("doSaveOutput",Boolean.FALSE);			prefs.put("outputDir","");			prefs.put("doShowTilesHistory",Boolean.TRUE);			prefs.put("JSPEditor","");		}		session.setAttribute("debugPrefs",prefs);				return prefs;		}