게시판을 이용해 주셔서 감사합니다.
다음양식에 맞게 입력해주세요.
* 고객시스템명 :
* GAUCE 버전 :
* WAS 종류(WebLogic 등등) :
* DB 종류 :
* 문의 유형(질문/요청/참조) :
* 내용 :
iterator를 for문으로 대체후 계속 진행을 하였는데
list 형태로 반환된 값을
처리를 해야 하는데 제대로 되지 않아서 데이터가 나오지 않고 있는것 같습니다
<-- 체크 되어 있는부분을 어떻게 해야 하는지 궁금합니다
아래의 메시지는 해당 jsp파일을 처음 읽어들였을 때의 메시지입니다
하단에는 소스 파일입니다
start.................
java.lang.ClassCastException: java.util.ArrayList
at org.apache.jsp.sample_jsp._jspService(sample_jsp.java:77)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.gauce.filter.GauceFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
-----------------------------------------------소스 내용---------------------
<%@ page contentType="text/html;charset=euc-kr" %>
<%@ page import="com.gauce.*,com.gauce.io.*,com.gauce.http.*,java.util.*"%>
<%@ page import="test.DataManager" %>
<%@ page import=" test.testBean"%>
<%
String ye1 = request.getParameter("ye1");
if(ye1 == null){ ye1 = "1961"; }
String ye2 = request.getParameter("ye2");
if(ye2 == null){ ye2 = "2006"; }
int a = Integer.parseInt(ye1);
int b = Integer.parseInt(ye2);
DataManager dm = DataManager.instance();
List dataTestList = dm.findTestList(ye1, ye2);
request.setAttribute("dataTestList", dataTestList);
List testList = (List)request.getAttribute("dataTestList");
GauceInputStream gis = null;
GauceOutputStream gos = null;
System.out.println("start.................");
try{
gis = ((HttpGauceRequest) request).getGauceInputStream(); <---------------------------------------------
gos = ((HttpGauceResponse) response).getGauceOutputStream(); <-------------------------------------------
//GauceConnection conn = (GauceConnection)request.getAttribute("dataTestList");
//HttpGauceRequest hreq = conn.getHttpGauceRequest();
//HttpGauceResponse hres = conn.getHttpGauceResponse();
//gis = hreq.getGauceInputStream();
//gos = hres.getGauceOutputStream();
System.out.println(".........1........");
GauceDataSet dSet = gis.read("output");
System.out.println(".........2........");
gos.fragment(dSet);
for(int i=0;i<testList.size();i++){
testBean test = (testBean)testList.get(i);
dSet.put("YEARS", test.getYEARS(),4,GauceDataColumn.TB_KEY);
dSet.put("JAN", test.getJAN(),6);
dSet.put("FEB", test.getFEB(),6);
dSet.put("MAR", test.getMAR(),6);
dSet.put("APR", test.getAPR(),6);
dSet.put("MAY", test.getMAY(),6);
dSet.put("JUN", test.getJUN(),6);
dSet.put("JUL", test.getJUL(),6);
dSet.put("AUG", test.getAUG(),6);
dSet.put("SEP", test.getSEP(),6);
dSet.put("OCT", test.getOCT(),6);
dSet.put("NOV", test.getNOV(),6);
dSet.put("DEC", test.getDEC(),6);
dSet.heap();
}
if (dSet.getDataColCnt() == 0) {
dSet.addDataColumn(new GauceDataColumn("YEARS", GauceDataColumn.TB_STRING,4,GauceDataColumn.TB_KEY));
dSet.addDataColumn(new GauceDataColumn("JAN", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("FEB", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("MAR", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("APR", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("MAY", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("JUN", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("JUL", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("AUG", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("SEP", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("OCT", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("NOV", GauceDataColumn.TB_STRING, 6));
dSet.addDataColumn(new GauceDataColumn("DEC", GauceDataColumn.TB_STRING, 6));
}
((HttpGauceResponse) response).addMessage("success");
//Client로 전송
gos.write(dSet);
gos.close();
}catch(Exception e){
e.printStackTrace();
}
%>
<html>
<head>
<title> Gauce Sample </title>
<!--Script function-->
<script>
function fn_search1()
{
tb_TR1.Action="sample.jsp?ye1="+y1.value+"&ye2="+y2.value;
tb_TR1.post();
}
</script>
<SCRIPT language="JavaScript" src="embedControl.js"></SCRIPT>
<script language=JavaScript>
function OnLoad()
{
Tb_Grid.DefaultColor("TextColor") = "black";
Tb_Grid.DefaultColor("BgColor") = "white";
}
</script>
<!--DataSet Component-->
<comment id="__NSID__"><object id="Tb_DataSet"
classid="clsid:2506B38B-0FF7-4249-BA3E-8BC1DC399FBB">
<Param Name="DataID" >
</object></comment><SCRIPT>__WS__(__NSID__);</SCRIPT>
<!-- tr Component -->
<comment id="__NSID__"><object classid=CLSID:78E24950-4295-43D8-9B1A-1F41CD7130E5 id=tb_TR1>
<!--<param name=Action value="/wa_sample">-->
<param name=KeyName value="toinb_dataid1">
<param name=KeyValue value="JSP(O:output=Tb_DataSet)">
</object></comment><SCRIPT>__WS__(__NSID__);</SCRIPT>
</head>
<body onload="fn_search1(),OnLoad();">
<table>
<tr>
<td>
<select name="y1">
<%for( int k = 1961 ; k <= 2006 ; k++ ){%>
<option value="<%=k%>" <%if(a == k){%>selected<%}%>><%=k%></option>
<%}%>
</select>년~
<select name="y2">
<option value="2006" selected>2006</option>
<%for( int l = 1961 ; l <= 2006 ; l++ ){%>
<option value="<%=l%>" <%if(b == l){%>selected<%}%>><%=l%></option>
<%}%>
</select>년
<input type="button" id=btn_1 value="조회" onclick="fn_search1();">
</td></tr>
</table>
<!--Grid Component-->
<comment id="__NSID__"><object id="Tb_Grid"
classid="clsid:EA8B6EE6-3DD8-4534-B4BB-27148CF0042B"
style="position:absolute;left:10px;top:90px;
width:695px;height:450px;">
<Param Name="DataID" value="Tb_DataSet">
<Param Name="MultiRowSelect" value=True>
<param name=Editable value="true">
<Param Name="MultiRowSelect" value=True>
<Param Name="AddSelectRows" value=True>
<Param Name="ColSizing" Value=True>
<param name="AutoResizing" value='true'>
<Param Name="BorderStyle" value="0">
<Param Name="ColSelect" value=true>
<param name="DisableNoHScroll" value=true>
<param name="DisableNoVScroll" value=true>
<param name=FillArea value="True">
<param name=SortView value="Left">
<Param name="SelectionColor" value="
<SC>Type='FocusEditCol', BgColor='Black', TextColor='White'</SC>
<SC>Type='EditCol', BgColor='Black', TextColor='White'</SC>
<SC>Type='FocusEditRow', BgColor='Yellow', TextColor='purple'</SC>
<SC>Type='EditRow', BgColor='Yellow', TextColor='purple'</SC>
<SC>Type='FocusCurCol', BgColor='Black', TextColor='White'</SC>
<SC>Type='CurCol', BgColor='Navy', TextColor='White'</SC>
<SC>Type='FocusCurRow', BgColor='Yellow', TextColor='purple'</SC>
<SC>Type='CurRow', BgColor='Yellow', TextColor='purple'</SC>
<SC>Type='FocusSelRow', BgColor='Brown', TextColor='maroon'</SC>
<SC>Type='SelRow', BgColor='Green', TextColor='mistyrose'</SC>">
<Param Name="Format" value='
<Fc> id=YEARS name="연도" width=60 align=center sort=true FontStyle="bold" BgColor="#E3E3FF" Headbgcolor="#E0E0DD" sort=true</Fc>
<c> id=JAN name="1월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=FEB name="2월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=MAR name="3월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=APR name="4월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=MAY name="5월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=JUN name="6월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=JUL name="7월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=AUG name="8월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=SEP name="9월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=OCT name="10월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=NOV name="11월" width=60 align=center Headbgcolor="#E0E0DD"</c>
<c> id=DEC name="12월" width=60 align=center Headbgcolor="#E0E0DD"</c>
'>
</object></comment><SCRIPT>__WS__(__NSID__);</SCRIPT>
</body>
</html>