Old thread... However, I believe I'm doing exactly what you are saying: Struts 2.0.x + XHTML + .jspx file with a <s:if> embedded inside a <td> element. This is working perfectly. No errors in my editor (NetBeans 5.5.1) or in the runtime (Glassfish v2). Here is a simple example:
<?xml version="1.0" encoding="UTF-8"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:s="/struts-tags" xmlns="http://www.w3.org/1999/xhtml"> <jsp:directive.page contentType="application/xhtml+xml;charset=UTF-8"/> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" /> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Some Page</title> <script type="text/javascript" language="JavaScript"> // <![CDATA[ // <![CDATA[ // ]]> // ]]> </script> </head> <body> <h2>This is a test page</h2> <p> Message: <s:property value="message" /><br/> <table> <tr> <td> <s:if test="found"> Found<br/> </s:if> <s:if test="!found"> Not Found <br/> </s:if> </td> </tr> </table> </p> </body> </html> </jsp:root> Ray Clough wrote: > > I produce all my jsp pages is xml format - ie. as 'jspx' jsp-documents. I > find a serious drawback to the struts tags, and I'm wondering if anyone > has a suggestion. The xhtml does not allow element content within other > elements; for example the <td> tag cannot contain a <s:if> tag. Lots of > examples in the struts documentation use this, which is not a problem for > regular html, but is a big show stopper in xml. The tags do allow jsp-el, > but not other elements. > > Any suggestions? > - Ray Clough > -- View this message in context: http://www.nabble.com/xhtml-problem-tf3848996.html#a12510895 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]