System.out.println("user = " + user + "; password = " + password);
	public void generate()		throws IOException, SAXException, ProcessingException {		if (inputSource == null)			throw new ProcessingException("No input source");		Request request = ObjectModelHelper.getRequest(objectModel);		Response response = ObjectModelHelper.getResponse(objectModel);				Session session = request.getSession(createSession);		String user = null;        String password = null;        // check if user and password can be read from the session        if(session != null && request.isRequestedSessionIdValid()) {            user = (String)session.getAttribute("user");            password = (String)session.getAttribute("password");        }        if(user == null)            user = defaultUser;        if(password == null)            password = defaultPassword;        System.out.println("user = " + user + "; password = " + password);		try {			Collection collection = DatabaseManager.getCollection(collectionURI, user, password);			if(collection == null) {				if(getLogger().isErrorEnabled())					getLogger().error("Collection " + collectionURI + " not found");				throw new ProcessingException("Collection " + collectionURI + " not found");			}			XQueryService service = (XQueryService)				collection.getService("XQueryService", "1.0");			service.setProperty(Serializer.GENERATE_DOC_EVENTS, "false");			String prefix = RequestModule.PREFIX;			service.setNamespace(prefix, RequestModule.NAMESPACE_URI);			service.declareVariable(prefix + ":request", new CocoonRequestWrapper(request));			service.declareVariable(prefix + ":response", new CocoonResponseWrapper(response));			service.declareVariable(prefix + ":session", new CocoonSessionWrapper(session));						String uri = inputSource.getURI();			CompiledExpression expr;			CachedExpression cached;			synchronized(cache) {				cached = (CachedExpression)cache.get(uri);				if(cached != null) {					// check if source is valid or should be reloaded					int valid = cached.validity.isValid();					if(valid == SourceValidity.UNKNOWN)						valid = cached.validity.isValid(inputSource.getValidity());					if(valid != SourceValidity.VALID) {						cache.remove(uri);						cached = null;					}				}				if(cached == null) {					String xquery = readQuery();					expr = service.compile(xquery);					cached = new CachedExpression(inputSource.getValidity(), expr);					cache.put(uri, cached);				} else					expr = cached.expr;			}			ResourceSet result = service.execute(expr);			            XMLResource resource;			this.contentHandler.startDocument();			for(long i = 0; i < result.getSize(); i++) {				resource = (XMLResource) result.getResource(i);				resource.getContentAsSAX(this.contentHandler);			}			this.contentHandler.endDocument();		} catch (XMLDBException e) {			throw new ProcessingException("XMLDBException occurred: " + e.getMessage(), e);		}	}