首页>代码>ssh框架开发的java个人博客系统-BFblogDemo07>/BFblogDemo07/src/com/ibeifeng/action/EditBlogInfo.java
package com.ibeifeng.action;

import java.util.Map;

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

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;
	}

}
最近下载更多
aaaaaaa3333  LV1 2022年5月18日
SOLEIL.  LV3 2021年6月19日
yyyyyyuuuuuu  LV1 2021年2月14日
无情先生3333  LV2 2020年12月29日
skook7  LV2 2020年7月26日
lwp011  LV27 2020年7月7日
1515355665  LV7 2020年7月2日
王步庆  LV9 2020年5月14日
小陆啊  LV2 2020年3月8日
12432423  LV2 2019年12月18日
最近浏览更多
t_heyao 11月18日
暂无贡献等级
6418368  LV10 8月16日
1140717565  LV2 7月18日
f22m1a2b2  LV17 2月5日
571818771  LV3 2024年12月16日
Peny_ZH  LV5 2024年9月22日
quartz  LV8 2024年7月1日
微信网友_7030143019094016  LV1 2024年6月9日
mc152921 2024年5月29日
暂无贡献等级
xiaopengzep  LV1 2024年3月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友