<% String str = "<a href='#'>这是链接</a>Lkfd<font color=/"red/"><h1>字体是红色</hr></font>"; request.setAttribute("str",str); %> <bean:write name="str" filter="true"/><br> <bean:write name="str" filter="false"/>