本人在自学struts2 ,在分页的时候遇见了麻烦。我试图做一个分页,其中一个类是用来输出“上一页,下一页”等的超链接字符串,如"<a href=""></a>",但是我在一个类WritePages中组合好字符串后(String str = <a href=\"" + this.getAction() + "?sp.currentPage=1\>;首页</a>" +
"<a href=\"" + this.getAction() + "?sp.currentPage=" + (this.getCurrent() - 1) + "\">上一页</a>" +
"<a href=\"" + this.getAction() + "?sp.currentPage=" + (this.getCurrent() + 1) + "\">下一页</a>" +
"<a href=\"" + this.getAction() + "?sp.currentPage=" + this.getPages() + "\">尾页</a>";this.setWritePages(str);), writePages是该类的一个属性,当我用s:property输出该字符串时源文件中输出的是将"<"输出成了"<" , ">"输出成了">",从而以html文件查看时不能正确显示超链接! 哪位高手帮忙啊,小弟感激不尽!
"<a href=\"" + this.getAction() + "?sp.currentPage=" + (this.getCurrent() - 1) + "\">上一页</a>" +
"<a href=\"" + this.getAction() + "?sp.currentPage=" + (this.getCurrent() + 1) + "\">下一页</a>" +
"<a href=\"" + this.getAction() + "?sp.currentPage=" + this.getPages() + "\">尾页</a>";this.setWritePages(str);), writePages是该类的一个属性,当我用s:property输出该字符串时源文件中输出的是将"<"输出成了"<" , ">"输出成了">",从而以html文件查看时不能正确显示超链接! 哪位高手帮忙啊,小弟感激不尽!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货