The problem is: Inside my action class, i have one variable:
private String commentAdd = "yes";
And the action class goes to reslut.jsp, inside reslut.jsp i have:
<s:set name="allowAddComment" value="commentAdd"/>
<s:if test="%{#allowAddComment=='yes'}">
<script type="text/javascript">
window.close();
</script>
</s:if>
but it doesn't work, can some expert give me some suggestion? Thanks.
A few things.
Are you sure this is really what you want? This will close the window as soon as that JavaScript is rendered. If that's okay, fine--although if that's the case, why bother rendering the window at all?