Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʯ¼ÒׯÍøÕ¾Éè¼Æ£ºjspÍøÕ¾µÄ¾²Ì¬Ò³ÃæÉú³É·½°¸

ʯ¼ÒׯÌáÉýÍøÕ¾ÐÔÄܵķ½Ê½Óкܶ࣬ÀýÈçÓÐЧµÄʹÓûº´æ£¬Éú³É¾²Ì¬Ò³ÃæµÈµÈ¡£½ñÌìҪ˵µÄ¾Í
ÊÇÉú³É¾²Ì¬Ò³ÃæµÄ·½Ê½¡£
ʲô½ÐÉú³É¾²Ì¬Ò³ÃæÄØ£¿ºÜ¼òµ¥£¬ÀýÈçÎÒÃÇÈç¹û·ÃÎÊÒ»¸öÁ´½Ó http://xyz.com/index.do£¬
ÄÇô·þÎñÆ÷¾Í»á½âÎöÕâ¸öÇëÇó£¬ÈÃÌض¨µÄAction È¥´¦Àí¡£ÕâÆäÖеÄȱµãÊÇÏÔ¶øÒ×¼ûµÄ£ºÈç¹û
·ÃÎʵÄÈË£¬ÄÇô¾Í»á¼ÓÖØÓ¦Ó÷þÎñÆ÷µÄѹÁ¦£¬×î¶ñÁӵĺó¹û¾ÍÊÇÓ¦Ó÷þÎñÆ÷down µôÁË¡£ÄÇ
ôÈçºÎÈ¥±ÜÃâÄØ£¿Èç¹ûÎÒÃÇ°Ñ¶Ô index.do ÇëÇóºóµÄ½á¹û±£´æ³ÉÒ»¸ö html Îļþ£¬È»ºóÿ´Î
Óû§¶¼È¥·ÃÎÊ http://xyz.com/index.html £¬ÕâÑùÓ¦Ó÷þÎñÆ÷µÄѹÁ¦²»¾Í¼õÉÙÁË£¿
ºÃ°É£¬ÎÒÒѾ­Ñ§»áÈçºÎÉú³É¾²Ì¬Ò³ÃæÁË¡£´ò¿ªÎÒµÄä¯ÀÀÆ÷£¬ÊäÈë http://xyz.com/index.do£¬
È»ºóÔÙʹÓÓÁí´æΪ”¹¦Äܱ£´æÒ»¸öhtml Îļþ£¬È»ºóÉÏ´«µ½·þÎñÆ÷£¬ÕâÑù¾Íok ÁË£¡
ÎÒ²»ÄÜ˵Õâ²»Êǽâ¾ö·½°¸£¬µ«ÊÇÎÒ¿ÉÒÔ˵Õâ²»ÊǺõĽâ¾ö·½°¸¡£ÎÒÃÇÐèÒªµÄÊÇ×Ô¶¯µÄÉú
³É¾²Ì¬Ò³Ã棬µ±Óû§·ÃÎÊ http://xyz.com/index.do£¬»á×Ô¶¯Éú³É index.html £¬È»ºóÏÔʾ¸ø
Óû§¡£
1¡¢ »ù´¡—URL Rewrite
ʲôÊÇ URL Rewrite ÄØ£¿Çë google it ☺ ¡£²»¹ýÕâÀï¼òµ¥µÄ啰àÂһϡ£´Ó×ÖÃæ
ÉÏÎÒÃǾͿÉÒÔÀí½âËüµÄÒâ˼£ºURL ÖØд¡£ÓÃÒ»¸ö¼òµ¥µÄÀý×ÓÀ´ËµÃ÷ÎÊÌ⣺ÊäÈëÍøÖ· copyright dedecms
http://www.xyz.com/index.do £¬ µ«ÊÇʵ¼ÊÉÏ·ÃÎʵÄÈ´ÊÇ
http://www.xyz.com/index.action£¬ÄÇÎÒÃǾͿÉÒÔ˵URL ±»ÖØдÁË¡£ÕâÏî¼¼ÊõÓ¦ÓÃ
¹ã·º£¬ÓÐÐí¶à¿ªÔ´µÄ¹¤¾ß¿ÉÒÔʵÏÖÕâ¸ö¹¦ÄÜ¡£
2¡¢ »ù´¡—Servlet web.xml
Èç¹ûÄ㻹²»ÖªµÀweb.xml ÖÐÒ»¸öÇëÇóºÍÒ»¸öservlet ÊÇÈçºÎÆ¥Åäµ½Ò»ÆðµÄ£¬ÄÇô
ÇëËÑË÷һϠservlet µÄÎĵµ¡£Õâ¿É²»ÊÇÂÒ˵ѽ£¬ÓкܶàÈ˾ÍÈÏΪ /xyz/*.do ÕâÑùµÄÆ¥
Å䷽ʽÄÜÓÐЧ¡£
Èç¹ûÄ㻹²»ÖªµÀÔõô±àдһ¸ö servlet £¬ÄÇôÇëËÑË÷Ò»ÏÂÈçºÎ±àдservlet¡£Õâ¿É
²»ÊÇ˵Цѽ£¬ÔÚ¸÷ÖÖ¼¯³É¹¤¾ßÂþÌì·ÉÎèµÄ½ñÌ죬ºÜ¶àÈ˶¼²»»áÈ¥´ÓÁã±àдһ¸öservlet
ÁË¡£
3¡¢ ̸̸·½·¨
ºÃÁË£¬ÏÖÔÚ²½ÈëÕýÌ⡣̸̸Éú³É¾²Ì¬Ò³ÃæµÄ·½·¨(»¹ÊDz»ÒªËµ³É“Ô­À픣¬¸øÈËÒ»ÖÖ
ºÜ¸ßÉîµÄ¸Ð¾õ)¡£·½·¨¾ÍÊÇÕâÑù£º
·½·¨1
ÆäÖУ¬¶ÔÓÚURL Rewriter µÄ²¿·Ö£¬¿ÉÒÔʹÓÃÊÕ·Ñ»òÕß¿ªÔ´µÄ¹¤¾ßÀ´ÊµÏÖ£¬Èç¹û url
²»ÊÇÌرðµÄ¸´ÔÓ£¬¿ÉÒÔ¿¼ÂÇÔÚ servlet ÖÐʵÏÖ£¬ÄÇô¾ÍÊÇÏÂÃæÕâ¸öÑù×Ó£º
´¦Àí .action µÄservlet
ÇëÇó index
URL
Rewriter
ÇëÇó index.action
Èç¹û¾²Ì¬Ò³Ãæ
´æÔÚ
ÏÔʾ¾²Ì¬Ò³Ãæ
Éú³É¾²Ì¬Ò³Ãæ
ÏÔʾ¾²Ì¬Ò³Ãæ
ÄÚÈÝÀ´×


Ïà¹ØÎĵµ£º

jspÖж¯Ì¬Ìá½»actionÓ뵯³öÈ·È϶Ի°¿ò

jspÒ³ÃæÖиù¾ÝÒ»¸öcheckedÊÇ·ñ±»Ñ¡ÖÐÀ´µ¯³ö²»Í¬µÄÈ·È϶Ի°¿ò¡£
<script type="text/javascript">
    function modifyDetail() {
        var v = document.getElementById("isDelete");   
       ......

jspÎļþÉÏ´«ä¯ÀÀ£¬Ö§³Öie 6£¬7£¬8

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< ......

JSPÂÒÂëÎÊÌâÏà¹Ø

JSPÖгöÏÖÂÒÂ룬Ê×Ïȼì²éÒ»ÏÂpageEncodingºÍcontentTypeÁ½¸öÊôÐÔ£¬Á½¸öÊôÐÔµÄĬÈÏÖµ¶¼ÊÇISO-8859-1
pageEncodingÉèÖõÄÊDZàÒëJSPʱËùÓõıàÂ룬Èç¹ûÓÃĬÈϵıàÂë±àÒëÖÐÎÄ£¬ÄÇôÔÚJSP±àÒë½×¶ÎÒѾ­ÊÇÂÒÂëÁË¡£
contentTypeÉèÖõÄÊÇ·þÎñ¶Ë·¶Î§¸øä¯ÀÀÆ÷µÄÏÔʾ±àÂ룬ºÍÒ³ÃæÉÏÉèÖñàÂëÊÇÒ»ÑùµÄЧ¹û¡£ ......

JSPµÄÅäÖÃ

¿ª·¢»·¾³ÅäÖÃ
¡¡¡¡
¡¡¡¡Ò»¡¢¿ª·¢»·¾³ÅäÖÃ
¡¡¡¡
¡¡¡¡µÚÒ»²½£ºÏÂÔØj2sdkºÍtomcat£ºµ½sun¹Ù·½Õ¾£¨http://java.sun.com/j2se/1.5.0/download.jsp£©ÏÂÔØj2sdk£¬×¢ÒâÏÂÔذ汾ΪWindows Offline InstallationµÄSDK£¬Í¬Ê±×îºÃÏÂÔØJ2SE 1.5.0 Documentation£¬È»ºóµ½tomcat¹Ù·½Õ¾µã£¨http://jakarta.apache.org/site/downloads/do ......

jspºÍservletµÄÇø±ð

  ÔªÎÊÌâÀ´×ÔJSPÓëServletµÄ±È½Ï¡£
      ÎÒÃÇÖªµÀServletÄܹ»Ê¹µÃJAVA´úÂë²»ÓÃÏñAppletÄÇÑùÔÚ¿Í»§ä¯ÀÀÆ÷ÖÐÔËÐУ¬Ëü»áÔÚÄã¿ØÖƵÄÒ»¸öÓ¦Ó÷þÎñÆ÷ÉÏÔËÐС£ÔÚûÓÐʲô±³¾°ÖªÊ¶µÄÇ°ÌáÏÂÎÒĬÈÏÕâÊÇÒ»ÖÖ¹æÔò£¬¼´Servlet¾ÍÊÇÕâÑù·¢Õ¹ÆðÀ´µÄ¡£ÔÚʵ¼ÊÓ¦ÓÃÖе±ÎÒÃÇÇëÇóÒ»¸öJSPÒ³ÃæµÄʱºò£¬JSPÊ×Ïȱ»×ª ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ