No, that is not possible. This is not a limitation of Struts, but because of the way JSP is constructed.
JSP Engines scan the swiping <% %> as real code, and invoking JSP tags -- the rest is simply out.println() statements. You cannot do what your saying because the JSP Engine would have to take two passes to produce your JSP: first to get the created page, the second to then do it again. If you need to do conditionals, do something like this: <c:if test="${condition"}> struts tags here </c:if> Bob Carpenter <[EMAIL PROTECTED]> wrote: Hi, Is it possible to programmatically create HTML blocks that include struts tags and include them in a JSP? Here's a simple example which fails to produce the text field defined by the html:text tag: ------------ <%@ page language="java" errorPage="ErrorPage.jsp" contentType="text/html" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <% try { StringBuffer sbuf = StringBuffer(); sbuf.append(""); sbuf.append(" "); sbuf.append(" Employee Name: "); sbuf.append(" styleClass=\"FORM_FIELDS\" >"); sbuf.append(" "); sbuf.append(" "); sbuf.append(""); String variableHeaderHTML = sbuf.toString(); %> <%= variableHeaderHTML %> <% } catch(Exception ex) { System.out.println("ERROR: " +ex.toString()); } %> --------------- Thanks, --BobC --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Yahoo! Groups gets better. Check out the new email design. Plus theres much more to come.