__rollnews.java
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:6k
- /* compiled from JSP: /news/rollnews.jsp
- *
- * This code was automatically generated at 21:23:48 on 2004-4-16
- * by weblogic.servlet.jsp.Jsp2Java -- do not edit.
- */
- package jsp_servlet._news;
- import java.io.*;
- import java.util.*;
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import javax.servlet.jsp.tagext.*;
- // User imports
- import java.io.*; //[ /news/rollnews.jsp; Line: 2]
- // built-in init parameters:
- // boolean _verbose -- wants debugging
- // Well-known variables:
- // JspWriter out -- to write to the browser
- // HttpServletRequest request -- the request object.
- // HttpServletResponse response -- the response object.
- // PageContext pageContext -- the page context for this JSP
- // HttpSession session -- the session object for the client (if any)
- // ServletContext application -- The servlet (application) context
- // ServletConfig config -- The ServletConfig for this JSP
- // Object page -- the instance of this page's implementation class (i.e., 'this')
- /**
- * This code was automatically generated at 21:23:48 on 2004-4-16
- * by weblogic.servlet.jsp.Jsp2Java -- do not edit.
- *
- * Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
- */
- public final class __rollnews
- extends
- weblogic.servlet.jsp.JspBase
- implements weblogic.servlet.jsp.StaleIndicator
- {
-
- // StaleIndicator interface
public boolean _isStale() {
weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext());
java.io.File f = null;
long lastModWhenBuilt = 0L;
if (sci.isResourceStale("/news/rollnews.jsp", 1081088148000L, "WebLogic Server 7.0 Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;
return false;
}
public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {
java.io.File f = null;
long lastModWhenBuilt = 0L;
if (sci.isResourceStale("/news/rollnews.jsp", 1081088148000L, "WebLogic Server 7.0 Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;
return false;
}
-
- public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
- {
-
- // declare and set well-known variables:
- javax.servlet.ServletConfig config = getServletConfig();
- javax.servlet.ServletContext application = config.getServletContext();
- javax.servlet.jsp.tagext.Tag _activeTag = null;
- // variables for Tag extension protocol
- Object page = this;
- javax.servlet.jsp.JspWriter out;
- javax.servlet.jsp.PageContext pageContext =
javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
- response.setHeader("Content-Type", "text/html; charset=GBK");
out = pageContext.getOut();
JspWriter _originalOut = out;
- javax.servlet.http.HttpSession session = request.getSession(true);
-
-
- try { // error page try block
response.setContentType("text/html; charset=GBK");
out.print("rn");
out.print("rn");
//[ /news/rollnews.jsp; Line: 3]
try{ //[ /news/rollnews.jsp; Line: 4]
//取得当前目录路径 //[ /news/rollnews.jsp; Line: 5]
String strPath = request.getRealPath(""); //[ /news/rollnews.jsp; Line: 6]
//建立FileReader对象 //[ /news/rollnews.jsp; Line: 7]
FileReader fr = new FileReader(strPath + "\scroll.txt"); //[ /news/rollnews.jsp; Line: 8]
//建立BufferedReader对象 //[ /news/rollnews.jsp; Line: 9]
BufferedReader br = new BufferedReader(fr); //[ /news/rollnews.jsp; Line: 10]
//从文件读取一行字符串 //[ /news/rollnews.jsp; Line: 11]
String Line = br.readLine(); //[ /news/rollnews.jsp; Line: 12]
//[ /news/rollnews.jsp; Line: 13]
//判断读取到的字符串是否不为空 //[ /news/rollnews.jsp; Line: 14]
String strNews = ""; //[ /news/rollnews.jsp; Line: 15]
while(Line != null){ //[ /news/rollnews.jsp; Line: 16]
strNews += Line + "<br>"; //[ /news/rollnews.jsp; Line: 17]
Line = br.readLine(); //[ /news/rollnews.jsp; Line: 18]
} //[ /news/rollnews.jsp; Line: 19]
br.close(); //[ /news/rollnews.jsp; Line: 20]
fr.close(); //[ /news/rollnews.jsp; Line: 21]
out.print("rn<html>rn<head>rn<title>rn读取滚动新闻rn</title>rn</head>rn<body bgcolor="#ffffff">rn<marquee style="color:#000000;font-size:12px;line-height:20px;" direction="up" height="70" scrollamount="1" scrolldelay="100" onMouseOver="this.scrollDelay=500" onMouseOut="this.scrollDelay=1">rn");
out.print(String.valueOf(strNews)); //[ /news/rollnews.jsp; Line: 31]
out.print("rn</marquee>rn</body>rn</html>rn");
//[ /news/rollnews.jsp; Line: 35]
}catch(Exception e){ //[ /news/rollnews.jsp; Line: 36]
e.printStackTrace(); //[ /news/rollnews.jsp; Line: 37]
} //[ /news/rollnews.jsp; Line: 38]
} catch (Throwable __ee) {
while (out != null && out != _originalOut) out = pageContext.popBody();
((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);
}
- //before final close brace...
- }
-
-
- }