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

jsp ÖÐÎÄÂÒÂë½â¾ö´óÈ«

Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë
¶þ¡¢±íµ¥Ìá½»ÖÐÎÄʱ³öÏÖÂÒÂë
Èý¡¢Êý¾Ý¿âÁ¬½Ó
´ó¼ÒÔÚJSPµÄ¿ª·¢¹ý³ÌÖУ¬¾­³£³öÏÖÖÐÎÄÂÒÂëµÄÎÊÌ⣬¿ÉÄÜÒ»ÖÁÀ§ÈÅ×ÅÄú£¬ÎÒÏÖÔÚ°ÑÎÒÔÚJSP¿ª·¢ÖÐÓöµ½
µÄÖÐÎÄÂÒÂëµÄÎÊÌâ¼°½â¾ö°ì·¨Ð´³öÀ´¹©´ó¼Ò²Î¿¼¡£
Ò»¡¢JSPÒ³ÃæÏÔʾÂÒÂë
ÏÂÃæµÄÏÔʾҳÃæ(display.jsp)¾Í³öÏÖÂÒÂ룺
<html>
<head>
<title>JSPµÄÖÐÎÄ´¦Àí</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
out.print("JSPµÄÖÐÎÄ´¦Àí");
%>
</body>
</html>
¶Ô²»Í¬µÄWEB·þÎñÆ÷ºÍ²»Í¬µÄJDK°æ±¾£¬´¦Àí½á¹û¾Í²»Ò»Ñù¡£Ô­Òò£º·þÎñÆ÷ʹÓõıàÂ뷽ʽ²»Í¬ºÍä¯ÀÀÆ÷
¶Ô²»Í¬µÄ×Ö·ûÏÔʾ½á¹û²»Í¬¶øµ¼Öµġ£½â¾ö°ì·¨£ºÔÚJSPÒ³ÃæÖÐÖ¸¶¨±àÂ뷽ʽ(gb2312),¼´ÔÚÒ³ÃæµÄµÚÒ»
ÐмÓÉÏ£º<%@ page contentType="text/html; charset=gb2312"%>£¬¾Í¿ÉÒÔÏû³ýÂÒÂëÁË¡£ÍêÕûÒ³ÃæÈçÏÂ
£º
<%@ page contentType="text/html; charset=gb2312"%>
<html>
<head>
<title>JSPµÄÖÐÎÄ´¦Àí</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
out.print("JSPµÄÖÐÎÄ´¦Àí");
%>
</body>
</html>
¶þ¡¢±íµ¥Ìá½»ÖÐÎÄʱ³öÏÖÂÒÂë
ÏÂÃæÊÇÒ»¸öÌá½»Ò³Ãæ(submit.jsp)£¬´úÂëÈçÏ£º
<html>
<head>
<title>JSPµÄÖÐÎÄ´¦Àí</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form name="form1" method="post" action="process.jsp">
<div align="center">
<input type="text" name="name">
<input type="submit" name="Submit" value="Submit">
</div>
</form>
</body>
</html>
ÏÂÃæÊÇ´¦ÀíÒ³Ãæ(process.jsp)´úÂ룺
<%@ page contentType="text/html; charset=gb2312"%>
<html>
<head>
<title>JSPµÄÖÐÎÄ´¦Àí</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%=request.getParameter("name")%>
</body>
</html>
Èç¹ûsubmit.jspÌá½»Ó¢ÎÄ×Ö·ûÄÜÕýÈ·ÏÔʾ£¬Èç¹ûÌá½»ÖÐÎÄʱ¾Í»á³öÏÖÂÒÂ


Ïà¹ØÎĵµ£º

css+jsp tagʵÏÖÊ÷ÐͲ˵¥

ÎÒÃǵĿª·¢·½Ê½ÊÇÓÉdemoÈËÔ±Íê³ÉϵͳµÄ¾²Ì¬Ò³Ã棬²¢Í¨¹ýcss½øÐÐÃÀ»¯¡£
Ϊ×î´ó¿ÉÄÜÀûÓÃÃÀ¹¤Íê³ÉµÄ¾²Ì¬Ò³Ã棬ÎÒÃÇÐèÒª¾¡Á¿¼õÉÙ¶ÔÔ­htmlµÄ³å»÷£¬Òò´ËÎÒÊ×ÏÈÏëµ½µÄFreemarker¡£
µ«ÊÇFreemarker×îÖÕÈÃÎÒ¿Õϲһ³¡£¬×îÖÕ×Ô¶¨ÒåÁËÒ»¸ö¿ÉÒԵݹéǶÌ×µÄjsp tagÀ´´ïµ½Õâ¸öÄ¿µÄ¡£
ÏÂÃæÊǽâ¾öÕâ¸öÎÊÌâµÄ¹ý³Ì£º
 
ÓÃcssÄ£°æsdmen ......

jsp,ASP,PHPµÄ±È½Ï

      ºÜ¶àSOHOER¶¼Ï£ÍûÓиö×Ô¼ºµÄÍøÕ¾,¶ø¶ÔÍøÕ¾½¨ÉèÒ»ÎÞËùÖª,»òÕßÒ»Öª°ë½â.½ñÌìÎÒÏȽ²³ÌÐò·½ÃæµÄÇø±ð,ÏàÐźܶàÈËÅöµ½ÁËÓÐЩ¹«Ë¾Ëµphp±ÈAsp,Asp.Net¶¼ÒªºÃ,»òÕßAsp±ÈÆäËûÓïÑÔ¶¼ÒªºÃ¡£Æäʵ,³ÌÐòµÄÓÅÂÔÓëÍøÕ¾¿ª·¢ÈËÔ±µÄ¾­Ñé\¼¼ÊõˮƽÏà¹Ø£¬¶øÓïÑÔ±¾Éí²¢Ã»ÓÐʲôÓÅÂÔÖ®·Ö.¾­Ñé¶àµÄ³ÌÐòÔ±,²»¹ÜʹÓõÄÄ ......

jsp½¨Õ¾Àú³Ì

      Á½ÄêÇ°£¬ÔøÓÐһλǰ±²¶ÔÎÒ˵¹ý£º¿ª·¢Ò»¸öÊôÓÚÄã×Ô¼ºµÄÍøÕ¾£¬È»ºóÿÌ컨һµã¿ÕÏеÄʱ¼äÈ¥¾­ÓªÒ»Ï£¬ÖÕÓÐÒ»Ì죬Äã»á·¢¾õËüÊǷdz£ÓÐÓõġ£¸Õ¿ªÊ¼µÄʱºò£¬ÎÒûÓаÑÕâЩ»°·ÅÔÚÐÄÉÏ£¬ÂýÂýµØ£¬ÎҲŷ¢¾õÕâλǰ±²ËµµÄ»°ÊǺÜÓеÀÀíµÄ¡£¼ÙÉèÁ½ÄêÇ°¿ªÊ¼¾­ÓªÒ»¸öÍøÕ¾£¬Í¨¹ýÕâÁ½ÄêµÄÍƹãºÍÔËÓª£¬Ëµ²»¶¨µ½Ï ......

ÈçºÎÏòÒ»¸öjsp´«µÝÁ½¸öÒÔÉϵIJÎÊý

ÓÐÁ½ÖÖ´«²Î·½Ê½
Ò»¡¢get·½Ê½£º
        ÕâÖÖ·½Ê½½«²ÎÊýдÔÚurlÖУ¬¾ÙÀýÀ´Ëµ£¬Èç¹ûÄ¿±ê´«²ÎÒ³ÃæÊÇtarget.jsp,ÄÇôÔÚurlÀï¿ÉÒÔÕâôд£º
        http://..../target.jsp? <Param1> = <value1> & <Param2> = <value2> &...
    &n ......

JspÉú³É¾²Ì¬Ò³Ãæ

ΪÁ˼õÇá·þÎñÆ÷ѹÁ¦£¬½«Ô­À´µÄÎÄÕ¹ÜÀíϵͳÓÉJSPÎļþµÄ´ÓÊý¾Ý¿âÖÐÈ¡Êý¾ÝÏÔʾ¸ÄΪÓÉjspÉú³É¾²Ì¬htmlÎļþºóÖ±½Ó·ÃÎÊhtmlÎļþ¡£Ê×ÏÈÓ¦´´½¨Ò»¸öÄ£°åÎļþ£¬ÎļþÃûºÍÎļþºó׺¿ÉÒÔËæÒ⣬µ«ÎÒÒ»°ã³£ÓõĻ¹ÊÇ *.template £¬Òò´Ë£¬ÕâÀï¾ÍÒÔ template.template ΪÀý( ½«Ä£°åÎļþ·ÅÈë /WEB-INF/templates/ Îļþ¼ÐÏ )£ºÏÂÃæÊÇÒ»¸ö¼òµ¥µÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ