dictionary.java

来自「JAVA邮件系统」· Java 代码 · 共 59 行

JAVA
59
字号
/* 
 *
*字典
 */

import java.io.*;
import java.text.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 * 
 *Dictionary.java
 * @author zhu jian min
 * 2000.8.4
 */

public class Dictionary extends HttpServlet {


    public void doPost(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
    {
		doGet(request,response);
	}
	public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
    {
		HtmlOut htmlOut = new HtmlOut (response);	
		String eword;//得到输入的英语单词
		eword=request.getParameter("eword");
		
		Person p=new Person();
		p.setName (CommonMethods.GetUserName(request));
		String pass = CommonMethods.GetUserPass (request);
		if( p.getName ()==null || (!p.checkPassword(pass)) )
		{
	    	htmlOut.setErrorID (htmlOut.SHOW_SIMPLE_MESSAGE ,"",
								"请先登录!","Login?action=reLog");
			htmlOut.outHtml();
			return;
		}
		
		DictionaryChannel dChannel=new DictionaryChannel();
		TemplateList templist=CommonMethods.getShowDictionaryTemplate();
		dChannel.makeDictionary( templist, eword,htmlOut);
		htmlOut.outHtml();
		
	    
    }
}



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?