checkoutaction.java
来自「一个netstore的完整代码,他使用了j2ee和webservice技术,并使」· Java 代码 · 共 32 行
JAVA
32 行
package netstore.order;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import netstore.framework.exceptions.BaseException;
import netstore.framework.util.IConstants;
import netstore.framework.NetstoreBaseAction;
/**
* An action that signs the user off of the system.
*/
public class CheckoutAction extends NetstoreBaseAction {
public ActionForward execute( ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
throws Exception {
// Check to make sure the user is logged in
if(!isLoggedIn(request)) {
// Remember the path of where the user was going so they can be
// taken straight there after login is successful
String path = mapping.findForward(IConstants.SUCCESS_KEY).getPath();
//setLoginToken(request.getSession(), path);
// Forward the user to the signon page
return mapping.findForward(IConstants.SIGNON_KEY);
}
// User is already logged in
return mapping.findForward( IConstants.SUCCESS_KEY );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?