hi i am displaying last 100 lines of log file on jsp in textarea and after every 10 second jsp will be refresh and data of text area will be changed i have done this things now i have to add two button on jsp one for display old 100 line before current text area and my code is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<%@ page language="java" contentType="te xt/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html>
<head>
<meta http-equiv="refresh" content="10">
<title>Log</title>
<script type="text/javascript">
function message() {
document.getEle mentById("Maste r").scrollTop=d ocument.getElem entById("Master ").scrollHe ight
}
function display() {
document.write( "<TEXTAREA name="Master" ROWS="30" COLS="90" READONLY SCROLL="bottom" > <%=session.getA ttribute("logMe ssage1")%></TEXTAREA>");
document.getEle mentById("Maste r").scrollTop=d ocument.getElem entById("Master ").scrollHe ight
}
</script>
</head>
<%
System.out.prin tln ("\n ENTERING :=> Log JSP");
%>
<!--<body bgcolor="white" topmargin="0"> added on 25/02/06
<INPUT TYPE=HIDDEN NAME=TEXTAREA VALUE="Master" >-->
<BODY bgcolor="white" TOPMARGIN=0 LEFTMARGIN=1 MARGINHEIGHT=0 MARGINWIDTH=0 onChange="messa ge()">
<form name="Log">
</form>
<CENTER>
<% String logMessage = (String)session .getAttribute(" logMessage");
if(logMessage == null)
logMessage = "";
%>
<TEXTAREA name="Master" ROWS="30" COLS="90" READONLY SCROLL="bottom" >
<%=logMessage %>
</TEXTAREA>
</CENTER>
<center>
<BUTTON TYPE=BUTTON FONT COLOR=BLUE onClick="this.d isabled=1,displ ay1()"><B>Previ ous</B></BUTTON>
<BUTTON TYPE=BUTTON FONT COLOR=BLUE ><B>Next</B></BUTTON>
</center>
<% System.out.prin tln ("\n EXITING :=> Log JSP"); %>
</body>
</html>
and i m getting error object expected
plz help me
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<%@ page language="java" contentType="te xt/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html>
<head>
<meta http-equiv="refresh" content="10">
<title>Log</title>
<script type="text/javascript">
function message() {
document.getEle mentById("Maste r").scrollTop=d ocument.getElem entById("Master ").scrollHe ight
}
function display() {
document.write( "<TEXTAREA name="Master" ROWS="30" COLS="90" READONLY SCROLL="bottom" > <%=session.getA ttribute("logMe ssage1")%></TEXTAREA>");
document.getEle mentById("Maste r").scrollTop=d ocument.getElem entById("Master ").scrollHe ight
}
</script>
</head>
<%
System.out.prin tln ("\n ENTERING :=> Log JSP");
%>
<!--<body bgcolor="white" topmargin="0"> added on 25/02/06
<INPUT TYPE=HIDDEN NAME=TEXTAREA VALUE="Master" >-->
<BODY bgcolor="white" TOPMARGIN=0 LEFTMARGIN=1 MARGINHEIGHT=0 MARGINWIDTH=0 onChange="messa ge()">
<form name="Log">
</form>
<CENTER>
<% String logMessage = (String)session .getAttribute(" logMessage");
if(logMessage == null)
logMessage = "";
%>
<TEXTAREA name="Master" ROWS="30" COLS="90" READONLY SCROLL="bottom" >
<%=logMessage %>
</TEXTAREA>
</CENTER>
<center>
<BUTTON TYPE=BUTTON FONT COLOR=BLUE onClick="this.d isabled=1,displ ay1()"><B>Previ ous</B></BUTTON>
<BUTTON TYPE=BUTTON FONT COLOR=BLUE ><B>Next</B></BUTTON>
</center>
<% System.out.prin tln ("\n EXITING :=> Log JSP"); %>
</body>
</html>
and i m getting error object expected
plz help me
Comment