What about using directly a org.apache.commons.el.ExpressionEvaluatorImpl? No PageContext is needed.
You just have to provide a javax.servlet.jsp.el.VariableResolver and I think you should write it carefully to avoid generating a security hole as your EL comes from the request.


Marc.

f. wrote:
Hi,

The idea is an hyperlink on HTML Page calling a Struts Action
and with an URI ending with like myAction.do?elexpression="sessionScope['mylist'][param.row]"


So I need the ELanguage power in my Action.execute( ) method.
I tryed to get a PageContext( ) from JSPFactory.DefaultFactory( ) (using current request, response,etc )
but now my container (Jetty) send JSP source instead of JSP processing result.


--------------------------
public class DetailHandlerAction extends Action {

   public ActionForward execute(
       ActionMapping mapping,
       ActionForm form,
       HttpServletRequest request,
       HttpServletResponse response)
       throws Exception {

PageContext pc = JspFactory.getDefaultFactory().getPageContext(this.getServlet(),request, response, null, true, 4096 , false );
evaluatedDetailRef = ExpressionEvaluatorManager.evaluate(null, detailRef, Object.class, pc);
javax.servlet.jsp.JspFactory.getDefaultFactory().releasePageContext(pc);
----------------------------


Any idea ?
Thanks for your help.
Denis.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to