ÎÒµÄJSPѧϰ±Ê¼Ç JSPÒ³ÃæÖеÄÈýÀà»ù±¾ÔªËØ
JSPÒ³ÃæµÄÈýÀà»ù±¾ÔªËØ
1.ÉùÃ÷
ÐÎÈç
<%!
int a;
int add(int a,int b)
{
return a+b;
}
%>
ÉùÃ÷ÔªËØ<%!.....%>¿ÉÔÚjspÒ³ÃæÖжà´Î³öÏÖ£¬µ«²»Ç¶Ì×£¬ÀïÃæÀ´ÉùÃ÷Ò³Ãæ±äÁ¿ºÍÒ³Ã溯Êý£¬À´ÎªÕû¸öÒ³ÃæʹÓã¬ÈçͬjavaÀàÀïÃæµÄÀà±äÁ¿ºÍÀà·½·¨
2.´úÂë
ÐÎÈç
<%
int a;
%>
ÀïÃæÊÇjspµÄ´úÂ룬Èçͬº¯ÊýÄÚ²¿£¬Ëù¶¨ÒåµÄ±äÁ¿£¬ËäÈ»¿ÉÒÔдÈë¶à¸ö<%..%>£¬µ«ÊDz»ÄÜǶÌ×£¬²¢ÇÒÒ»µ©´úÂëÀﶨÒå±äÁ¿£¬ÄÇô¸Ã´úÂëÒÔϵĴúÂ벿·Ö¶¼ÄÜ·ÃÎÊ£¨ÓÐЧ£©£¬²»¹ÜÊDz»ÊÇÔÚͬһ¸ö<%.........%>ÄÚ²¿
3.±í´ïʽ
ÐÎÈç<%=a%>
ÆäÖÐaÊDZäÁ¿»òÕß³£Á¿£¬´ËÓï¾ä½«Ïò¿Í»§¶ËÍøÒ³ÖÐÊä³öaµÄÖµ
Ïà¹ØÎĵµ£º
ÍøÕ¾×öÍêºó£¬²¢²»ÊÇÖ±½Ó·Åµ½·þÎñÆ÷£¨Tomcat£©ÖÐÈ¥ÔËÐУ¬¶øÊÇÏȽ«Æä´ò°ü³ÉWarÎļþ£¬ÔÙ°ÑWarÎļþ·Åµ½·þÎñÆ÷ÖÐÈ¥ÔËÐУ¬ÄÇÑù¸ü·½±ã
ÄÇôÔõÑù½«Ò»¸öJspÍøÕ¾´ò°üÄØ£¿£¿£¿
Ò».·½·¨Ò»
½øÈëcmdµ½dosÃüÁîÐÐÏ£¬½øÈëJspWeb(×¢ÒâÒª½øÈëJspWebĿ¼£¬¼´½øÈëÄãÒª´ò°üµÄÍøÕ¾µÄ¸ùĿ¼)
ÔÙÏÂÒ»²½
......
ÔÚJava web¿ª·¢Öг£»áʹÓõ½¹¦ÄÜÇ¿´óµÄ¹ýÂËÆ÷£¬Ëû±Ï¾¹ÄܸøÎÒÃÇ´øÀ´ºÜ´óµÄ·½±ã£¬µ«ÊÇÕë¶Ô¹ýÂ˵Ä×ÊÔ´ÎÒÃÇÐèÒªÏêϸµÄÁ˽âËûÃÇÔÚweb.xmlÖеÄÅäÖÃÐÅÏ¢¡£Õâ¸ö¸ù¾Ý¼¸ÖÖ³£ÓõIJ»Í¬Çé¿ö½øÐÐÁË×ܽ᣺
1.Èç¹ûÒªÓ³Éä¹ýÂËÓ¦ÓóÌÐòÖÐËùÓÐ×ÊÔ´£º
<filter>
<filter-name>loggerfilter</filter-name> ......
//ת×Ôhttp://blog.csdn.net/zqhf8/archive/2007/07/09/1683938.aspx
1¡£ÔÀí¼ò½é
dtreeÊÇÒ»¸öÃâ·ÑµÄjavascript½Å±¾£¬Ö»Ð趨ÒåÓÐÏ޵ļ¸¸ö²ÎÊý£¬¾Í¿ÉÒÔ×ö³öƯÁÁµÄÊ÷ÐͲ˵¥¡£ÏÂÔØĿ¼£ºhttp://www.destroydrop.com/javascripts/tree/
ÒÔÏÂÊÇdtreeµÄÓ÷¨Ê¾Àý£º
1£©³õʼ»¯²Ëµ¥
<script t ......
À´Ô´ÓÚ¡¶Java¡¢javaEEÈí¼þ¹¤³Ìʦ¾ÍÒµÇóÖ°Êֲᡷ
1 HttpServletRequestÀàµÄrequest¶ÔÏ󣺴ú±íÇëÇó¶ÔÏó£¬Ö÷ÒªÓÃÓÚ½ÓÊÜ¿Í»§¶Ëͨ¹ýHTTPÐÒéÁ¬½Ó´«Êäµ½·þÎñÆ÷µÄÊý¾Ý¡£
2 HttpServletResponseÀàµÄresponse£º´ú±íÏìÓ¦¶ÔÏó£¬Ö÷ÒªÓÃÓÚÏò¿Í»§¶Ë·¢ËÍÊý¾Ý¡£
3 JspWriterÀàµÄout¶ÔÏó:Ö÷ÒªÓÃÓÚÏò¿Í»§¶ËÊä³öÊý¾Ý£¬OutµÄ»ùÀàÊÇJspWriter¡ ......
1 javascript £¬ÉèÖÃÒ»¸ö±äÁ¿£¬Ö»ÔÊÐíÌá½»Ò»´Î¡£
2 »¹ÊÇjavascript£¬½«Ìá½»°´Å¥»òÕßimageÖÃΪdisable
onsubmit="getElById('submitInput').disabled = true; return true;">
3 ÀûÓÃstrutsµÄͬ²½ÁîÅÆ»úÖÆ
......