Hashtable folders = getFolders(session);  folders.put(folderPath, folder);
	private Folder createFolder(HttpSession session, String folderPath,			String imagePath, String folderRealPath,			String jgalleryContextPath, boolean doCount)			throws GalleryException	{		// No need to synchronize access to the Folders because they are per		// session. In the worst case if a user has several browser windows		// (that share the same session), there might be unnecessary creations of		// Folders.		Folder folder;		Configuration configuration = this.configuration;		File directory = new File(folderRealPath);		if (!directory.exists())		{			throw new GalleryNotFoundException("directory does not exist: "					+ directory.toString());		}		File config = new File(directory, CONFIGFILE);		if (config.exists())		{			InputStream is;			try			{				is = new FileInputStream(config);			}			catch (FileNotFoundException e)			{				throw new GalleryException(e.getMessage());			}			try			{				Configuration conf = new Configuration(is, configuration);				configuration = conf;			}			catch (IOException e)			{				throw new GalleryException(e.getMessage());			}			finally			{				if (is != null)				{					try					{						is.close();					}					catch (IOException e)					{						throw new GalleryException(e.getMessage());					}				}			}		}		ConfigData configData = new ConfigData();		configData.version = version;		configData.urlExtention = urlExtention;		configData.doCount = doCount;		folder = new Folder(directory, getServletContext(), configuration,				configData, jgalleryContextPath, folderPath, imagePath,				dBManager);		Hashtable folders = getFolders(session);		folders.put(folderPath, folder);		return folder;	}