私は、.jspxファイルに送信されたJava StringにnewLineを置くことに問題があります。 私はテーブルがあり、セル内にコントローラから受信した文字列の内容を表示します。タグテーブル(Spring MVC)で新しい行を作る方法は?
| ------- |
| |
| bbb |
| ------- |
代わりに、私はこれを得ます:
| ----------- |
| aaa bbb |
| ----------- |
String a = "aaa";
String b = "bbb";
String cell= a +"<br/>"+ b;
model.addAttribute("cell",cell);
I:で
はAAAとBBBとの間にBRタグを書いた
Javaのコントローラのコードがある(私は他のこのサイトは、私の例..に改行を行いますので、ここでそれを記述する必要があります)
<table:table>
<table:column id="firstCellId" property="cell">
...
<table:column id="secondCellId" property="another column">//others tr cell of no importance..
<table:column id="secondCellId" property="another column">//others tr cell of no importance..
</table:table>
:私が得たが.jspxに成功
なし "の\ n" "の\ r \ n" と "はSystem.getProperty(" line.separator ")"(代わりにBRタグの)も試してみました
はCSSを使わずにセルを変更する方法はありますか?
タグテーブル内htmlEscape = "false" を
:
残念ながら、ブラウザでは
と表示されません – user2298581