@Override public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) { if (log.isDebugEnabled()) log.debug("begin setup"); try { super.setup(resolver, objectModel, src, par); ContextManager cm = (ContextManager) this.manager.lookup(ContextManager.ROLE); try { if (cm.hasSessionContext()) { cm.deleteContext("authentication"); } } catch (Exception exe) { } userid = par.getParameter("username", null); password = par.getParameter("password", null); try { String jaasRealmTmp = par.getParameter("jaasRealm", null); if (jaasRealmTmp != null && !jaasRealmTmp.equalsIgnoreCase("")) { jaasRealm = jaasRealmTmp; } } catch (Exception se) { } try { String toUpper = par.getParameter("toUpperCase", null); if (toUpper != null && !toUpper.equalsIgnoreCase("true")) { userid = userid.toUpperCase(); } } catch (Exception se) { } if (log.isDebugEnabled()) log.debug("trying to login as " + userid + " on the webpage"); } catch (Exception ex) { new ProcessingException(ex.getMessage()); } if (log.isDebugEnabled()) log.debug("end setup"); }
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, par); this.config = FormsPipelineConfig.createConfig(objectModel, parameters); // enforce a default POST method when using the generator. if (this.config.getFormMethod() == null) { this.config.setFormMethod("POST"); } }
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, parameters); this.exception = parameters.getParameter("exception", super.source); this.code = Integer.parseInt(parameters.getParameter("code", "0")); // Throw exception in the setup phase? if (parameters.getParameterAsBoolean("setup", false)) { ExceptionAction.exception(this.exception, this.code); } }
public void recycle() { super.recycle(); this.config = null; }