资源简介
JSP+mysql开发的类似淘宝的购物网站
代码片段和文件信息
package com.parknshop.action;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.parknshop.service.CustomerService;
public class AjaxAction extends ActionSupport{
private String id;
private String username;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
private String email;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
private CustomerService customerService;
public CustomerService getCustomerService() {
return customerService;
}
public void setCustomerService(CustomerService customerService) {
this.customerService = customerService;
}
public String testUserNameExist() throws Exception {
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(“text/xml;charset=UTF-8“);
response.setHeader(“Cache-Control“ “no-cache“);
String xml = “l version=\“1.0\“ encoding=\“UTF-8\“?>“;
if(getUsername().length()<2){
xml += “The username is too short “;
}else if(getUsername().length()>20){
xml += “The username is too long “;
}else {
if (getCustomerService().getCustomerInfo(getUsername())!=null) {
xml += “This username already exists “;
} else {
xml += “OK “;
}
}
response.getWriter().write(xml);
return null;
}
public String testEmailExist() throws Exception{
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(“text/xml;charset=UTF-8“);
response.setHeader(“Cache-Control“ “no-cache“);
String xml1 = “l version=\“1.0\“ encoding=\“UTF-8\“?>“;
if(getCustomerService().getInfoByEmail(getEmail())!=null){
xml1 += “The mailbox has been registered! “;
} else {
xml1 += “OK “;
}
response.getWriter().write(xml1);
return null;
}
public String findEmail(){
if(getCustomerService().getInfoByEmail(getEmail())!=null){
ActionContext cxt = ActionContext.getContext();
cxt.put(“findInfo“ “Success!You can get new password from the Email!“);
}else {
ActionContext cxt = ActionContext.getContext();
cxt.put(“findInfo“ “Error !The email is not exist!“);
}
return “success“;
}
public String selectCountry(){
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType(“text/xml;charset=UTF-8“);
response.setHeader(“Cache-Control“ “no-cache“);
String xml_start= “l version=\“1.0\“ encoding=\“UTF-8\“?>“;
xml_start += ““;
St
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 6789 2014-04-16 10:46 ParkNShop_DEMO3\.classpath
....... 545 2014-04-15 14:20 ParkNShop_DEMO3\.myhibernatedata
....... 318 2014-04-20 19:27 ParkNShop_DEMO3\.myme
....... 240 2014-04-15 14:20 ParkNShop_DEMO3\.mystrutsdata
....... 2251 2014-04-16 10:46 ParkNShop_DEMO3\.project
....... 500 2014-04-15 14:20 ParkNShop_DEMO3\.settings\.jsdtscope
....... 395 2014-04-16 10:46 ParkNShop_DEMO3\.settings\org.eclipse.jdt.core.prefs
....... 483 2014-04-16 10:46 ParkNShop_DEMO3\.settings\org.eclipse.wst.common.component
....... 252 2014-04-16 10:46 ParkNShop_DEMO3\.settings\org.eclipse.wst.common.project.facet.core.xm
....... 49 2014-04-16 10:46 ParkNShop_DEMO3\.settings\org.eclipse.wst.jsdt.ui.superType.container
....... 6 2014-04-16 10:46 ParkNShop_DEMO3\.settings\org.eclipse.wst.jsdt.ui.superType.name
....... 474 2014-04-15 14:20 ParkNShop_DEMO3\.springBeans
....... 5169 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\AjaxAction.java
....... 1087 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\ApplyAdAction.java
....... 203 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\BackGroundAction.java
....... 1437 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CommentAction.java
....... 8649 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CountProfitAction.java
....... 3272 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CountProfitTableAction.java
....... 746 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateIncomeAction.java
....... 1785 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateProductModifyAction.java
....... 1295 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateProductRegisterAction.java
....... 806 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateShopGoodsAction.java
....... 2402 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateShopModifyAction.java
....... 1566 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateShopOwnerModifyPageAction.java
....... 649 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CreateShopRegisterAction.java
....... 845 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CustomerHomepageAction.java
....... 3889 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\CustomerUpdateAction.java
....... 1336 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\DeleteProductAction.java
....... 596 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\DeleteShopAction.java
....... 818 2014-04-15 14:20 ParkNShop_DEMO3\src\com\parknshop\action\DetailAction.java
............此处省略1020个文件信息
相关资源
- 购物商城jsp源码myeclipse+mysql开发Esho
- 电子商务类网站 前台,后台两部份,
- 5个J2EE课程设计源代码
- JSP应用开发详解》原版 (PDF)
- SpringMVC简易员工管理演示系统J2EE版
- 322JSP旅游网站.rar
- 库存管理系统JAVA+MYSQL
- 288JSP实验室设备管理系统.rar
- jsp+servlet+javabean小区物业管理系统
- 个人博客jsp,邮箱登录+图片上传+评论
- 基于java swing与mysql的销售管理系统源
- javajsp网上商城购物毕业设计购物网站
- Java+MySQL在线考试系统源码
- JSP的旅游管理系统
- 运动会管理系统java mysql完整能运行版
- 基于oracle和jsp的景区管理系统
- 基于JSP的学生选课系统
- 基于JSp的实验室设备管理系统的设计
- 021基于JAVA的医院门诊信息管理系统的
- 基于安卓Android的校园APP系统设计(
- 宠物商城+ssm框架+jsp页面+mysql数据库
- ssh+mysql 完整项目
- JSP+SQL在线教学网站(毕业设计)
- 298JSP药品管理系统.rar
- java mysql+struts 2 + hibernate 3 图书管理系
- java web+mysql自行车租赁管理系统包含数
- JSP+MYSQL设备管理系统-毕业设计
- 基于WEB的简历系统JSP+Servlet(含数据库
- JSP基于SSH2的网络在线问答系统
- 医院挂号预约系统(ssmbootstrapjspmysq
评论
共有 条评论