package com.stomatology.action.user;import javax.servlet.http.HttpSession;import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.stomatology.bean.Users;
import com.stomatology.service.UserService;public class LoginAction extends ActionSupport {
private Users users;
private UserService service; public Users getUsers() {
return users;
} public void setUsers(Users users) {
this.users = users;
} public UserService getService() {
return service;
} public void setService(UserService service) {
this.service = service;
} @Override
public String execute() throws Exception {


if (this.service.findUserByName(users)>0)
{
HttpSession session= ServletActionContext.getRequest().getSession();

session.setAttribute("name", users.getName());

return SUCCESS;
}else {

return INPUT;

}
}
}JSP 里:<s:hidden name="article.author" value=<%=session.getAttribute("name")%>></s:hidden><s:form action="saveArticle" theme="simple">
 <table width="827" height="452">
 <s:hidden name="article.author" value=<%=session.getAttribute("name")%>></s:hidden>
<s:hidden name="article.status" value="Y"></s:hidden>
<s:hidden name="article.issuedate" value="2010-1-1"></s:hidden>
<tr><td width="47" height="38">类型</td><td class="ax" ><s:combobox list="#{'A':'新闻专题', 'B':'科普乐园', 'C': '爱牙专题','D': '医家风采','E': '口腔整形','F': '拔牙过程','G': '考瓷常识','H': '义齿原理','I': '修复过程','J': '牙齿种植 ','K': '正畸认识'}" name="article.type" headerKey="0" headerValue="--请选择--" readonly="true"> </s:combobox></td></tr>
 <tr>
   <td height="30">标题</td>
   <td width="768" class="ax"><s:textfield name="article.title"></s:textfield>
   <s:submit value="提交"></s:submit></td></tr>
 <tr>
   <td colspan="2" style="margin:left">
     <FCK:editor instanceName="article.content" height="400px">
</FCK:editor></td>
 </tr>
 </table>
  </s:form>
系统报错 <s:textfield>不支持表达式! 请 问 我应该如何把session的值传给<s:textfield>