struts 2はifタグで文字列が含むと判断し、
action:
jsp:
黒い髪:http://heisetoufa.iteye.com
String testStr = " ";
jsp:
<s:property value="testStr"/>
<s:if test="testStr.contains(' ')" >
</s:if>
<s:else>
</s:else>
黒い髪:http://heisetoufa.iteye.com