为什么我不能在 GAE 中换行?
它不起作用。
代码:Timer.class:
public String list() throws InvalidProtocolBufferException{
String newLine = System.getProperty("line.separator");
String adat = new String();
for (RequestStatProto sList : lists){
adat+="start_timestamp_milliseconds: \r\n"+sList.getStartTimestampMilliseconds()+newLine;
adat+="http_method: "+sList.getHttpStatus()+newLine;
adat+="duration_milliseconds"+sList.getDurationMilliseconds()+newLine;
adat+=newLine;
}
return adat;
}
测试.jsp:
<%
Timer timer=new Timer();
timer.setMem();
pageContext.setAttribute("timer",timer.list());
%>
<p>
<b>Memcache Statisztikák:</b>
${fn:escapeXml(timer)}
</p>
我怎样才能做到这一点?
感谢您的帮助!