Is Boostrap compatible with Struts 2?

后端 未结 2 1815
無奈伤痛
無奈伤痛 2021-01-03 03:15

I am using Bootstrap for my UI development. When I use Struts 2 tags for textfield in it, the complete page alignment is destroyed. When I replace the s:<

相关标签:
2条回答
  • 2021-01-03 03:53

    Solution n.1:

    Use the simple theme and write the Bootstrap-compliant HTML on your own:

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

    Solution n.2:

    Use the Struts2 Boostrap plugin (showcase) and the bootstrap theme and let it automatically generate the Bootstrap-compliant HTML from Struts tags:

    <constant name="struts.ui.theme" value="bootstrap" />
    
    0 讨论(0)
  • 2021-01-03 03:56

    Struts 2 uses themes while rendering output of the JSP page. You can read more about themes in Struts 2 Themes. To change a default theme put this in the struts.xml

    <constant name="struts.ui.theme" value="simple"/>
    
    0 讨论(0)
提交回复
热议问题