See attached.
/*
* Created on Sep 27, 2003
*
* @author mliotta
*/
package com.montarasoftware.cfx;
import org.apache.bsf.BSFEngine;
import org.apache.bsf.BSFManager;
import com.allaire.cfx.CustomTag;
import com.allaire.cfx.Request;
import com.allaire.cfx.Response;
/**
* @author mliotta
*
*/
public class Script implements CustomTag {
/**
* @see com.allaire.cfx.CustomTag#processRequest(com.allaire.cfx.Request,
com.allaire.cfx.Response)
*/
public void processRequest(Request request, Response response) throws
Exception {
String language = request.getAttribute("language");
String script = request.getAttribute("script");
BSFManager mgr = new BSFManager();
BSFEngine engine = mgr.loadScriptingEngine(language);
try {
mgr.declareBean("request", request, request.getClass());
mgr.declareBean("response", response, response.getClass());
} catch(Exception e) {
response.writeDebug(e.toString());
}
engine.exec ("CFML", 1, 1, script);
}
}
Matt Liotta
President & CEO
Montara Software, Inc.
http://www.MontaraSoftware.com
(888) 408-0900 x901