<%
String filePath="cims67_NT_CPU";
int id=1;
if(request.getParameter("class")!=null){
  filePath=request.getParameter("class");
  id=Integer.parseInt(request.getParameter("id"));
drawchart draw=new drawchart(filePath,id);

解决方案 »

  1.   

    <%
    String filePath="cims67_NT_CPU";
    int id=1;
    if(request.getParameter("class")!=null){
      filePath=request.getParameter("class");
      id=Integer.parseInt(request.getParameter("id"));
      drawchart draw=new drawchart(filePath,id);
    }...if(request.getParameter("class")==null)
    {
    out.println("<IMG src='"+"demo.jpg"+"' align=absMiddle>");

    }
    else {%>
    <IMG src="chart.jpg" align="absMiddle">
    <%
    }%>
      

  2.   

    页面的刷新下面代码实现
    <tr > 
       <td width="2" bgcolor="#C0C0C0"> </td>
              
       <td width="100"height="25"class="highlight1">    <a onmouseover=ShowMenu(cpu,70) href="indexoforacle.jsp?class=cims108_ORACLE_USERS&id=1" onclick="javascript:location.replace(this.href);" ><div align="center">
      ORACLE当前状态</a></div></td>
              <td width="1" bgcolor="#C0C0C0"> </td>
              <td width="100"height="25"class="highlight1"> 
      <a onmouseover=ShowMenu(user,70) href="indexoforacle.jsp?class=cims108_ORACLE_USERS&id=2" onclick="javascript:location.replace(this.href);" ><div align="center">
      ORACLE当前用户</a></div></td>
              <td width="1" bgcolor="#C0C0C0"> </td>
                <td width="100"height="25"class="highlight1"> 
      <a onmouseover=ShowMenu(network,70) href="indexoforacle.jsp?class=cims108_ORACLE_USERS&id=3" onclick="javascript:location.replace(this.href);" ><div align="center">
      ORACLE网络状态</a></div></td>
              <td width="1" bgcolor="#C0C0C0"> </td>
              <td width="0.5" > </td>
    </tr>