请教一道关于JSP页面上展示信息无法换行的问题
请问Json中存放的如下形式数据为什么不能再Jsp页面换行显示:
后台Action代码样例:
StringBuffer buffer = new StringBuffer();buffer.append("This is a test");buffer.append(System.getProperty("line.separator"));buffer.append("This is another test");MyObject obj = new MyObject();obj.setSuccessRow(20);obj.setMsg(buffer.toString());JsonArray array = JsonArray.fromObject(obj);JsonObject json = new JsonObject();json .put("list",array);XXX.write(json.toString());buffer.append("This is a test");buffer.append(System.getProperty("line.separator"));buffer.append("This is another test");改成:buffer.append("This is a test");buffer.append("<br/>");buffer.append("This is another test");