public String getStockMarketInfo() throws Exception { StockMarketRequestInfo stockMarketRequestInfo = new StockMarketRequestInfo(); StockMarketResponseInfo stockMarketResponseInfo = new StockMarketResponseInfo(); List<StockMarket> listOfAllStockMarket = new ArrayList<StockMarket>(); stockMarketResponseInfo = stockDelegate.getStockMarketInfo(stockMarketRequestInfo); listOfAllStockMarket = stockMarketResponseInfo.getAllStokcMarketInfos(); // System.out.println(listOfAllStockMarket.size()); if (ActionContext.getContext().getSession().get("listOfAllStockMarket")!=null){ ActionContext.getContext().getSession().remove("listOfAllStockMarket"); } if (listOfAllStockMarket.size() <= 0) return ERROR; // System.out.println(listOfAllStockMarket.size()); // Iterator<StockMarket> it=listOfAllStockMarket.iterator(); // while(it.hasNext()) // {System.out.println(it.next().getStockname());}
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%> <%@ taglib prefix="s" uri="/struts-tags"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>My JSP 'stockmarketinfo.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <link rel="stylesheet" type="text/css" href="css/common.css" mce_href="css/common.css"> </head>