📄 shownewsjrzx.java
字号:
/*
*
*/
import java.io.*;
import java.text.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
/**
*/
public class ShowNewsJrzx extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
HtmlOut htmlOut = new HtmlOut (response);
// 得到名字和口令
TemplateList tempList=CommonMethods.getShowJrzxTemplate ();
SingleTemplate st;
st = tempList.searchTemplate ("ROOT");
if(st==null)
{
htmlOut.setErrorID (htmlOut.SINGLE_TEMPLATE_NOTFIND ,"",
"无法找到模板","DateShowDay");
htmlOut.outHtml();
return ;
}
news News = new news();
//替换模板文件
int nKey = st.getKeyNum ();
MyCalendar calendar= new MyCalendar();
String sKey= new String ();
for(int i=0;i<nKey;i++){
htmlOut.addString (st.getStringAt (i));
sKey = st.getKeyAt (i);
if( sKey.compareTo("cgi-path")==0 )
htmlOut.addString (CommonMethods.sHostNameCGI);
if (sKey.compareTo ("证券热点")==0)
//htmlOut.addStringPlain (News.showNewsTitle("02020900",4));
htmlOut.addString(News.showJrzxTitle ("02020900",5));
if (sKey.compareTo ("经济新闻")==0)
htmlOut.addString(News.showJrzxTitle ("02010100",5));
if (sKey.compareTo ("证券新闻")==0)
htmlOut.addString(News.showJrzxTitle ("02020100",5));
if (sKey.compareTo ("行业动态")==0)
htmlOut.addString(News.showJrzxTitle ("02010300",5));
if (sKey.compareTo ("新股速递")==0)
htmlOut.addString(News.showJrzxTitle ("02020200",5));
if (sKey.compareTo ("新股透视")==0)
htmlOut.addString(News.showJrzxTitle ("02020300",5));
if (sKey.compareTo ("今日提示")==0)
htmlOut.addString(News.showJrzxTitle ("02020500",5));
if (sKey.compareTo ("沪深公告")==0)
htmlOut.addString(News.showJrzxTitle ("02020400",5));
if (sKey.compareTo ("公司动态")==0)
htmlOut.addString(News.showJrzxTitle ("02021300",5));
if (sKey.compareTo ("实时看盘")==0)
htmlOut.addString(News.showJrzxTitle ("02020700",5));
if (sKey.compareTo ("大盘分析")==0)
htmlOut.addString(News.showJrzxTitle ("02021100",5));
if (sKey.compareTo ("股市评论")==0)
htmlOut.addString(News.showJrzxTitle ("02020600",5));
if (sKey.compareTo ("荐股台")==0)
htmlOut.addString(News.showJrzxTitle ("02020800",5));
if (sKey.compareTo ("汇市新闻")==0)
htmlOut.addString(News.showJrzxTitle ("02021700",5));
if (sKey.compareTo ("外汇日历")==0)
htmlOut.addString(News.showJrzxTitle ("09021900",5));
if (sKey.compareTo ("汇市评论")==0)
htmlOut.addString(News.showJrzxTitle ("02021800",5));
if (sKey.compareTo ("债市速递")==0)
htmlOut.addString(News.showJrzxTitle ("02022100",5));
if (sKey.compareTo ("期市动态")==0)
htmlOut.addString(News.showJrzxTitle ("02022200",5));
if (sKey.compareTo ("一周备忘")==0)
htmlOut.addString(News.showJrzxTitle ("02022300",5));
}
htmlOut.addString (st.getEndString());
//out.println (st.getEndString());
htmlOut.outHtml();
return;
}
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
doGet(request,response);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -