<%String username =(String) request.getParameter("username");%>
<s:if test="#username == null">
<script>
if(confirm("请先登录!"))
window.location.href='<%=request.getContextPath()%>/Login.jsp';</script>
</s:if>
<div align="center">
<p>
欢迎用户:${sessionScope.username}
</p>
</div>
从网上看到的代码,为啥用Java判断之后还可以用<script>来调用JavaScript呢?我试了不行啊,什么写法这是