<%@ page language="java" import="java.util.*,org.springframework.web.context.support.WebApplicationContextUtils,org.springframework.web.context.WebApplicationContext,cn.ccwonline.jcms.service.*,cn.ccwonline.jcms.pojo.*,cn.ccwonline.jcms.pojo.Article" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <%@ include file="inc/base-file-new.inc" %> AsiaInfo Linkage <% String reg = (String)session.getAttribute("reg"); if("success".equals(reg)){ %> <% session.removeAttribute("reg"); } %>
<%@ include file="header.jsp" %>
<% WebApplicationContext wa = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletConfig().getServletContext()); ChangeAboutUserManager m = (ChangeAboutUserManager) wa.getBean("changeAboutUserManager"); String hql = "from Article where status='1' and column_id='2' order by id desc"; List list = m.getList(hql); Article a01 = new Article(); Article a02 = new Article(); String content01 = ""; String content02 = ""; if(!list.isEmpty()){ a01 = (Article)list.get(0); content01 = a01.getContent(); if(content01.length()>100){ content01 = content01.substring(0,100)+"..."; } if(list.size()>1){ a02 = (Article)list.get(1); content02 = a02.getContent(); if(content02.length()>100){ content02 = content02.substring(0,100)+"..."; } } } %>