Strust2 JSP向Action传参数

JSP页面

location.href="http://localhost:8080/../xx.action?key=value"


Action

ActionContext ctx = ActionContext.getContext();
HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST);
String str = request.getParameter("key"));


你可能感兴趣的:(java,jsp)