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

webʵÑ鱨¸æ——±íµ¥ÓëJSPÄÚÖöÔÏó

Ò»¡¢ÊµÑéÄ¿µÄ
1¡¢ ÕÆÎÕ±íµ¥µÄʹÓ÷½·¨£¬ÒÔ¼°·þÎñÆ÷¶Ë´¦Àí±íµ¥ÇëÇóµÄ·½·¨£»
2¡¢ Àí½âForwardµÄ×÷Óã»
3¡¢ ÊìÁ·ÔËÓÃJSPµÄµäÐÍÄÚÖöÔÏó
 
¶þ¡¢ÊµÑéÄÚÈݼ°²½Öè
1¡¢±íµ¥µÄʹÓü°ÆäµÝ½»¡¢´¦Àí¹ý³Ì
ÔÚÔ­´´½ÌÎñϵͳÖУ¬ÏµÍ³»á¸ù¾ÝÓû§ÀàÐÍ(½Ìʦ/ѧÉú)ÏÔʾ²»Í¬µÄÒ³Ã档ΪģÄâ¸Ã¹¦ÄÜ£¬ÐèÒª¶¨ÒåÉè¼ÆÈçÏÂÒ³Ã棺
-Login.html£º°üÀ¨Óû§ÀàÐÍÃû£¨Ä¬ÈÏΪѧÉúÀàÐÍ£©¡¢Óû§Ãû¡¢Óû§ÃÜÂë
Ô´´úÂ룺
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
    <title>Login.html</title>
   
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=gbk">
   
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
 
 </head>
 
 <body>
 <form name="Login" action="Forward.jsp" method="post">
 <table>
 <tr>
       <td>Óû§ÀàÐÍ</td>
       <td>
          <select name ="User">
          <option value="Student">ѧÉú</option>
          <option value="Teacher">ÀÏʦ</option>
          </select>
       </td>
  </tr>
  <tr>
  <td>Óû§Ãû</td>
  <td>
       <input name="Username" type="text" size="20">
  </td>
  </tr>
  <tr>
       <td>Óû§ÃÜÂë</td>
&nb


Ïà¹ØÎĵµ£º

JSP¿ª·¢Öеij£Óü¼ÇÉ

ÔÚJSPÖй²ÏíÊý¾Ý£¬´óÌå·ÖΪ2ÖÐÇé¿ö¡£Ò»ÊÇÔÚͬһ¸öÓû§µÄ²»Í¬Ò³ÃæÖ®¼ä¹²ÏíÊý¾Ý£¬¶þÊÇÔÚ²»Í¬µÄÓû§Ö®¼ä¹²ÏíÊý¾Ý.
¶ÔÓÚͬһ¸öÓû§µÄ»á»°£¬ÒªÏëÔÚ²»Í¬µÄÒ³ÃæÖ®¼ä¹²ÏíÊý¾Ý£¬¿ÉÓÐÒÔϼ¸ÖÖÑ¡Ôñ
¡ñ°ÑÊý¾Ý±£´æÔÚSessionÖУ¨ÕâÊǷdz£³£¼ûµÄ·½Ê½£©¡£
¡ñͨ¹ýCookie.
¡ñͨ¹ýÒþº¬µÄ±íµ¥°ÑÊý¾Ý´«µ½ÏÂÒ»¸öÒ³Ãæ¡£
¡ñͨ¹ýServletContext¶ ......

java³ÌÐòÖе÷ÓÃÉãÏñͷʵÏÖjsp³ÌÐòÉãÏñÍ·Êý¾Ý²É¼¯

½üÆÚµÄÒ»¸öÏîÄ¿ÐèҪʵÏÖÉãÏñͷͼÏñ²É¼¯£¬¾­¹ýһϵÁеÄÕÛÌÚÒÔºó£¬ÖÕÓÚʵÏÖÁËÕâ¸ö¹¦ÄÜ£¬ÏÖÕûÀíһϡ£
±¾Éí¾Íjava¼¼ÊõÀ´Ëµ£¬ÒªÊµÏÖÉãÏñÍ·¶þ´Î¿ª·¢£¬²É¼¯ÉãÏñͷͼƬ£¬ÐèҪʹÓõ½JMF£¬JMFÊʺÏʹÓÃÔÚj2se³ÌÐòµ±ÖУ¬ÎÒÐèÒªÔÚweb³ÌÐòÖе÷ÓÃÉãÏñÍ·£¬ºÜÃ÷ÏÔJMFÊǸ㲻¶¨ÁË£¬Ïë¹ýдһ¸öapplet³ÌÐò£¬Ö»ÊÇÄǶ«Î÷ÒªÇó¿Í»§¶Ë±ØÐëÒªÓÐjre»·¾ ......

JSPµÄ¾Å¸öÄÚÖöÔÏó½éÉܼ°Ó÷¨

1.request¶ÔÏó
¿Í»§¶ËµÄÇëÇóÐÅÏ¢±»·â×°ÔÚrequest¶ÔÏóÖУ¬Í¨¹ýËü²ÅÄÜÁ˽⵽¿Í»§µÄÐèÇó£¬È»ºó×ö³öÏìÓ¦¡£ËüÊÇHttpServletRequestÀàµÄʵÀý¡£
ÐòºÅ ·½ ·¨ ˵ Ã÷
1 object getAttribute(String name) ·µ»ØÖ¸¶¨ÊôÐÔµÄÊôÐÔÖµ
2 Enumeration getAttributeNames() ·µ»ØËùÓпÉÓÃÊôÐÔÃûµÄö¾Ù
3 String getCharacterEncoding( ......

JSPÖеÄCookieʹÓÃ

Cookie¸ÅÄî:
    CookieµÄ¸ñʽʵ¼ÊÉÏÊÇÒ»¶Î´¿Îı¾ÐÅÏ¢, ÓÉ·þÎñÆ÷Ëæ×ÅÍøÒ³Ò»Æð·¢Ë͵½¿Í»§¶Ë, ²¢±£´æÔÚ¿Í»§¶ËÓ²ÅÌÖÐÖ¸¶¨µÄĿ¼µÄ. ´ó¼Ò¶¼´«ËµCookie»áÔì³ÉÑÏÖصݲȫÍþвʲôµÄ, Æäʵ²»ÊÇÕâô»ØÊÂÇé. ·þÎñÆ÷¶ÁÈ¡CookieµÄʱºò, Ö»Äܹ»¶ÁÈ¡µ½Õâ¸ö·þÎñÆ÷Ïà¹ØµÄÐÅÏ¢. ¶ø ......

weblogicÓëwebsphereµÄ²îÒì Ö® jspÖеÄ×¢ÊÍÎÊÌâ

    ½ñÌì²âÊÔÈËÔ±¸øÎÒÌáÁËÒ»¸öbug£¬ËµÎÒ¿ª·¢µÄÄ£¿é±¨¿ò¼ÜµÄjs´íÎ󣬵±Ê±Ò»Ìý¾ÍãÂÁË£¬ÎÒ±¾µØ²âÊÔÍêȫûÎÊÌ⣬ÔõôÉÏÁË·þÎñÆ÷»á³öÏÖÕâ¸öÎÊÌâÄØ£¿
    ÓÚÊÇÎÒÈ¥·þÎñÆ÷ÉϲâÁËÒ»ÏÂ×Ô¼ºÐ´µÄÄǸöÄ£¿é£¬½á¹û±¨µÄ´íÎ󻹺ͲâÊÔÈËÔ±Ìá¸øÎҵĴíÎó²»Ò»Ö£¬ÔÓ»ØÊ£¿ÓÚÊÇÎÒÓÖÕÒµ½Ò»ÃûͬÊ£¬ÈÃËû°ïÎÒ²âһϣ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ