Search code examples
javahtmlcssstruts2html-table

struts2 <s:textfield /> generating table after compilation


I am using Struts2 <s:textfield /> tag in HTML . After I compile the page and run it on web. the code gets automatically converted in Table format. What should I do to avoid the table generation or any extra code generation.


Solution

  • If you don't want like this, using your form tag with theme simple

    <s:form action="xxx" name="frmXX" method="post" theme="simple">
    

    or configure into your struts.xml likes this

    <constant name="struts.ui.theme" value="simple" />
    

    Struts default theme is xhtml theme and it renders like html table format. See this documentation.