对于date类型的页面显示,不要用s:property value="user.end_date" 来显示,截取的长度不受控,应该用s:date标签
<s:date name="user.end_date" format="yyyy-MM-dd">
对于拼装出的字符串类型的数据,用<s:property value="url">表示的时候,url中含有特殊字符&的时候,比如:acquisition/createacquisition.action?templateCode=f&ridflg=116260 则jsp页面会自动转化为acquisition/createacquisition.action?templateCode=f&ridflg=116260 如果想要避免这种情况,需要在s:property 标签中把escape属性写成false,即
<s:property value="url" escape="false"/>
在jsp中取session中的Map:operator里面的的key为loginName的值,最简单的做法如下,注意此处#是必须的
<s:property value="#session.operator.loginName"/>
我的错误做法(可以实现,但不提倡jsp加代码块):
<%
LoginSessionObject log=(LoginSessionObject)request.getSession().getAttribute("operator");
String loginName=log.getLoginName();
%>
<body οnlοad="link('<%=loginName %>')">