易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp visit spring


<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="ccp.suddenattack.service.news.*"%>
<%@page import="com.netstar8.util.page.*"%>
<%@page import="net.sf.json.*"%>
<%
ApplicationContext context=WebApplicationContextUtils.getWebApplicationContext(application);
NewsService newsService = (NewsService)context.getBean("newsService");
PaginationSupport ps = newsService.findAllNews(10,0);
//out.println(ps.getTotalCount());

JSONObject jsonObject = JSONObject.fromObject(ps);
String jsonStr = "json503="+jsonObject.toString();
out.println(jsonStr);

%>


相关文档:

用JFreeChart增强JSP报表的用户体验

  
   
      JFreeChart是一组功能强大、灵活易用的Java绘图API,使用它可以生成多种通用性的报表,包括柱状图、饼图、曲线图、甘特图等。它能够用在Swing和Web等中制作自定义的图表或报表,并且得到广泛的应用。本文将通过引领读者学习在JFreeChart中饼图、柱状图 ......

jsp乱码解决大全(转自csdn一高手)

jsp中文显示乱码解决方案
一、JSP页面显示乱码
二、表单提交中文时出现乱码
三、数据库连接
大家在JSP的开发过程中,经常出现中文乱码的问题,可能一至困扰着您,我现在把我在JSP开发中遇到
的中文乱码的问题及解决办法写出来供大家参考。
一、JSP页面显示乱码
下面的显示页面(display.jsp)就出现乱码:
< ......

jsp/get/set/struts.xml存取

get
jsp         url          ${param.serialID}
action    jsp          String commentId = ServletActionContext.getRequest().getParameter("commentId");
-- ......

将jsp页面中table导出到doc

<SCRIPT LANGUAGE="javascript">
       //指定页面区域内容导入Word
       function AllAreaWord() {
       var oWD = new ActiveXObject("Word.Application");
       var oDC = ......

组拼jsp方法2

<html:html>
<HEAD>
<tiles:insert attribute="header" />
</HEAD>
<body>
<tiles:insert attribute="top" />
<table width="100%" height="400" border="0" align="center"
 cellpadding="0" cellspacing="0">
 <tr>
  <td width="178" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号