去掉struts2标签的样式

本文详细介绍了如何在Struts2中配置模版文件,包括修改struts.properties或struts.xml文件来设置主题、模板目录和后缀名,解决了标签自动换行问题。

struts2中包含了一些默认的模版文件($ {struts-core-2.06.jar}/template),其中有ajax/simple/xhtml等.

       方法一:
        查看struts.properties或$ {struts-core-2.06.jar}/org/apache/struts2/default.properties文件,其中有如下配置:
struts.ui.theme=xhtml
struts.ui.templateDir=template
struts.ui.templateSuffix=ftl

       这一段就是关于struts2模版的配置信息,我们可以修改struts.properties文件,将其改成
struts.ui.theme=simple
struts.ui.templateDir=template
struts.ui.templateSuffix=ftl

      方法二:

如果没有struts.properties文件,可以修改struts.xml文件,在其中加入如下行

<constant name="struts.ui.theme" value="simple" />
<constant name="struts.ui.templateDir" value="template" />
<constant name="struts.ui.templateSuffix" value="ftl" />

struts.ui.theme=simple可以解决struts2标签自动换行问题,即不再自动被添加进table标签中

转载于:https://www.cnblogs.com/zhangleblog/archive/2013/03/26/2982435.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值