JavaÖ®Servlet¿ª·¢
±¾ÎİüÀ¨:
A: servletÔ´ÂëʵÀý
B: servlet²¿Êð
C: ¿Í»§¶ËÔ¶³Ìµ÷ÓÃ
D: servlet¿ª·¢µ÷Óù¤¾ß
A: servletÔ´ÂëʵÀý
package com.viewlinecn.userlogin.www.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.viewlinecn.userlogin.util.OrganizeXML;
/**
* ÓÎÏ·¸öÐÔ»¯µÇ¼ÈÏÖ¤·þÎñ
* @author cairenxi * @version 1.0
*/
public class LoginGameServlet extends HttpServlet {
private final static long serialVersionUID = -200904271326L;
private static Log log = LogFactory.getLog(LoginGameServlet.class);
public void init() throws ServletException {
//no code
} public
void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
// Ìí¼Ó´úÂë
} public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
// Ìí¼Ó´úÂë
}
}
B: servlet²¿Êð
com.viewlinecn.userlogin.www.servlet.LoginGameServlet ;
/servlets/login.html
C: ¿Í»§¶ËÔ¶³Ìµ÷ÓÃ
URL: http://host:port/context/servlets/login.html
D: servlet¿ª·¢µ÷Óù¤¾ß
package com.viewlinecn.common.http.util;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import javax.servlet.http.HttpServletRequ
Ïà¹ØÎĵµ£º
ÔÚÍøÉÏÕÒÁ˵ã»ù´¡ÌâÄ¿,×Ô¼º×öÁË×ö,ÏÂÃæÊÇÌâÄ¿:
1.JavaÓÐÄÇЩ»ù±¾Êý¾ÝÀàÐÍ£¬StringÊDz»ÊÇ»ù±¾Êý¾ÝÀàÐÍ£¬ËûÃÇÓкÎÇø±ð¡£
2.×Ö·û´®µÄ²Ù×÷£º
дһ¸ö·½·¨£¬ÊµÏÖ×Ö·û´®µÄ·´×ª£¬È磺ÊäÈëabc£¬Êä³öcba
дһ¸ö·½·¨£¬ÊµÏÖ×Ö·û´®µÄÌæ»»£¬È磺ÊäÈëbbbwlirbbb£¬Êä³öbbbhhtc ......
ÕâÆªÎÄÕ¶ԳéÏóÀàºÍ½Ó¿Ú˵µÄºÜÏêϸ£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú.
¡¡¡¡abstract classºÍinterfaceÊÇJavaÓïÑÔÖжÔÓÚ³éÏóÀඨÒå½øÐÐÖ§³ÖµÄÁ½ÖÖ»úÖÆ£¬ÕýÊÇÓÉÓÚÕâÁ½ÖÖ»úÖÆµÄ´æÔÚ£¬²Å¸³ÓèÁËJavaÇ¿´óµÄÃæÏò¶ÔÏóÄÜÁ¦¡£abstract classºÍinterfaceÖ®¼äÔÚ¶ÔÓÚ³éÏóÀඨÒåµÄÖ§³Ö·½Ãæ¾ßÓкܴóµÄÏàËÆÐÔ£¬ÉõÖÁ¿ÉÒÔÏà»¥Ìæ»»£¬Òò´ËºÜ¶à¿ª·¢ÕßÔÚ½øÐг ......
Ó°ÏìÄ£¿éÉè¼ÆºÃÓ뻵µÄÒ»¸öÖØÒªÒòËØ¾ÍÊÇÕâ¸öÄ£¿éÊÇ·ñÒþ²ØËüµÄÄÚ²¿Êý¾ÝºÍÆäËûһЩʵÏÖϸ½Ú¡£ ÐÅÏ¢Òþ²ØµÄºÃ´¦£º·½±ã¶ÀÁ¢¿ª·¢£¬²âÊÔ£¬ÓÅ»¯£¬Ê¹Óã¬Àí½âºÍÐ޸ġ£Äܹ»Ìá¸ßϵͳ¿ª·¢ËÙ£¨ÒòΪ¸÷Ä£¿é¿ÉÒÔ²¢Ðпª·¢£©£¬Ò²ÄÜÒ×ÓÚά»¤ºÍµ÷ÊÔ£¬Ò²ÄܼõÉÙϵͳ¹¹½¨µÄ·çÏÕ¡£ ......
ÔÒòÓкܶàÖÖ£¬±ÈÈ磺
1.Êý¾ÝÁ¿¹ýÓÚÅÓ´ó£»ËÀÑ»· £»¾²Ì¬±äÁ¿ºÍ¾²Ì¬·½·¨¹ý¶à£»µÝ¹é£»ÎÞ·¨È·¶¨ÊÇ·ñ±»ÒýÓõĶÔÏó£»
2.ÐéÄâ»ú²»»ØÊÕÄڴ棨ÄÚ´æÐ¹Â©£©£»
˵°×Á˾ÍÊdzÌÐòÔËÐÐÒªÓõ½µÄÄÚ´æ´óÓÚÐéÄâ»úÄÜÌṩµÄ×î´óÄÚ´æ¾Í·¢ÉúÄÚ´æÒç³öÁË¡£ ÄÚ´æÒç³öµÄÎÊÌâÒª¿´ÒµÎñºÍϵͳ´óС¶ø¶¨£¬¶ÔÓÚijЩϵͳ¿ÉÄÜÄÚ´æ ......