Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
EditAccountFormAction.java
Upload User: jiancairen
Upload Date: 2007-08-27
Package Size: 26458k
Code Size: 1k
Category:
Java Develop
Development Platform:
Java
- package org.springframework.samples.jpetstore.web.struts;
- import java.util.List;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionForward;
- import org.apache.struts.action.ActionMapping;
- import org.springframework.samples.jpetstore.domain.Account;
- public class EditAccountFormAction extends SecureBaseAction {
- protected ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
- AccountActionForm workingAcctForm = (AccountActionForm) form;
- AccountActionForm acctForm = (AccountActionForm) request.getSession().getAttribute("accountForm");
- String username = acctForm.getAccount().getUsername();
- if (workingAcctForm.getAccount() == null) {
- Account account = getPetStore().getAccount(username);
- workingAcctForm.setAccount(account);
- }
- if (workingAcctForm.getCategories() == null) {
- List categories = getPetStore().getCategoryList();
- workingAcctForm.setCategories(categories);
- }
- return mapping.findForward("success");
- }
- }