return mapping.findForward("edit");
}
public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
log.debug("entering save");
ConfigForm cf = (ConfigForm)form;
// int port = Integer.parseInt(cf.getPort());
// int emptyQWait = Integer.parseInt(cf.getEmptyQWait());
// boolean useRandomizer = (("no".equals(cf.getUseRandomizer()))?false:true);
// configurator.startEngines(cf.getLibPath(), port, useRandomizer, emptyQWait);
configurator.startEngines(cf.getLibPath(), cf.getPort(), cf.getUseRandomizer(), cf.getEmptyQWait());
try {configurator.createM3U(new URL(request.getRequestURL().toString()).getHost()); }
catch (MalformedURLException mue) {log.error("Could not get propery requestURL for creating M3U: "+mue.getMessage());}
return mapping.findForward("success");
}