我有一个jsp文件,可以从Spring MVC控制器接收数据
D
这将成功地在文本框中显示数据。我想将数据显示为没有文本框的普通文本。我尝试将其打印为
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<link rel="canonical" href="final.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-selector" src="https://cdn.ampproject.org/v0/amp-selector-0.1.js"></script>
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
<style amp-custom>
.megamenu-item .dropdpwn-links{
display:none;
}
.megamenu-item.show .dropdpwn-links{
display:block;
}
</style>
</head>
<body>
<ul>
<li [class]="item1 ? 'show' : 'megamenu-item'" class="megamenu-item">
<a href="#" tabindex="0" role="button" on="tap:AMP.setState({item1: !item1,item2:megamenu-item,item3:megamenu-item})">open dropdown</a>
<div class="dropdpwn-links">
<div>item1</div>
<div>item2</div>
<div>item3</div>
<div>item4</div>
</div>
</li>
<li [class]="item2 ? 'show' : 'megamenu-item'" class="megamenu-item">
<a href="#" tabindex="0" role="button" on="tap:AMP.setState({item2: !item2,item1:megamenu-item,item3:megamenu-item})">open dropdown</a>
<div class="dropdpwn-links">
<div>item1</div>
<div>item2</div>
<div>item3</div>
<div>item4</div>
</div>
</li>
<li [class]="item3 ? 'show' : 'megamenu-item'" class="megamenu-item">
<a href="#" tabindex="0" role="button" on="tap:AMP.setState({item3: !item3,item2:megamenu-item,item1:megamenu-item})">open dropdown</a>
<div class="dropdpwn-links">
<div>item1</div>
<div>item2</div>
<div>item3</div>
<div>item4</div>
</div>
</li>
</ul>
</body>
</html>
但不起作用。如何在没有文本框的情况下打印值?
答案 0 :(得分:1)
因为有一个commandName="someDetail"
,所以我认为模型中有一个名为someDetail
的对象。
如果是这样,只需写${someDetail.address}
即可在生成的html中打印地址。