首页>代码>java ssh框架搭建开源博客网站系统源代码下载>/JavaPrj_4/src/com/sanqing/action/EditBlogInfo.java
package com.sanqing.action;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.sanqing.po.BlogInfo;
import com.sanqing.service.BlogInfoService;

public class EditBlogInfo extends ActionSupport {
	private String blogtitle;
	private String idiograph;
	private BlogInfoService blogInfoService;

	public BlogInfoService getBlogInfoService() {
		return blogInfoService;
	}

	public void setBlogInfoService(BlogInfoService blogInfoService) {
		this.blogInfoService = blogInfoService;
	}

	public String getBlogtitle() {
		return blogtitle;
	}

	public void setBlogtitle(String blogtitle) {
		this.blogtitle = blogtitle;
	}

	public String getIdiograph() {
		return idiograph;
	}

	public void setIdiograph(String idiograph) {
		this.idiograph = idiograph;
	}

	public String execute() throws Exception {
//		//获得request
//		HttpServletRequest request = ServletActionContext.getRequest();
//		//获得session
//		HttpSession session =request.getSession();
//		//获得username
//		String username = (String) session.getAttribute("username");
		
		Map session = ActionContext.getContext().getSession();
		String username = (String) session.get("username");
		
		BlogInfo blogInfo = new BlogInfo();
		//设置用户名
		blogInfo.setUsername(username);
		//设置博客标题
		blogInfo.setBlogtitle(blogtitle);
		//设置个性签名
		blogInfo.setIdiograph(idiograph);
		//调用业务逻辑组件来完成设置
		blogInfoService.setBlogInfo(blogInfo);
		
		return this.SUCCESS;
	}

}
最近下载更多
huhansan  LV10 2023年11月5日
陆程江  LV2 2023年5月23日
Violetya  LV1 2023年5月19日
123123asdsada  LV1 2022年5月25日
wanglinddad  LV54 2022年4月13日
and123456  LV11 2022年2月7日
2136237322  LV1 2021年12月15日
cloisonne  LV2 2021年12月11日
1287704475  LV2 2021年12月8日
李晓珂  LV2 2021年12月4日
最近浏览更多
huhansan  LV10 2023年11月5日
yemmmm666  LV1 2023年6月12日
陆程江  LV2 2023年5月23日
Violetya  LV1 2023年5月19日
刘先生-OL  LV13 2023年3月9日
luobu2000 2023年2月9日
暂无贡献等级
getset  LV8 2022年12月4日
zxc131313  LV12 2022年11月21日
240601335  LV1 2022年10月23日
zhaoyangwfd  LV17 2022年10月8日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友