【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了BlogInfoHigh.java提供大家参考,希望对大家有所帮助!
package com.opensource.blog.web.action;
import javax.servlet.http.*;
import java.util.*;
import org.apache.struts.action.*;
import com.opensource.blog.comm.*;
import com.opensource.blog.service.*;
import com.opensource.blog.
web.servlet.*;
public class BlogInfoHigh
extends BaseAction {
private LinksService linksService;
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) {
ActionMessages errors = new ActionMessages();
UserSession us = this.getUserSession(servletRequest);
List textlist = this.getLinksService().findLinksByBlogID_Type(us.getBlog().getId().longValue(),
Constant.LINK_TEXT);
List piclist = this.getLinksService().findLinksByBlogID_Type(us.getBlog().getId().longValue(),
Constant.LINK_LOGO);
servletRequest.setAttribute("textlist", textlist);
servletRequest.setAttribute("piclist", piclist);
String logourl = "";
if (us.getBlog().getLogourl() != null) {
logourl = us.getBlog().getLogourl();
}
servletRequest.setAttribute("logourl", logourl);
int[] logosize = BlogUtil.getLogoSize(us.getBlog().getLogosize());
servletRequest.setAttribute("wide", new Integer(logosize[0]));
servletRequest.setAttribute("high", new Integer(logosize[1]));
return actionMapping.findForward("bloginfohigh");
}
public LinksService getLinksService() {
return linksService;
}
public void setLinksService(LinksService linksService) {
this.linksService = linksService;
}
}