我有下面的代码,但它有编译错误。它从struts1迁移到struts2。我试图在网上搜索但没有用,例如" resetToken struts2"或" getLocalAddr请求" ... 请帮忙!!!
HttpServletRequest request = ServletActionContext.getRequest();
String serverNumber = request.getLocalAddr().substring(request.getLocalAddr().length()-1);
// *it said The method getLocalAddr() is undefined for the type HttpServletRequest* ...
resetToken(request);
//*The method resetToken(HttpServletRequest) is undefined for the type CardAction*