»ùÓÚJSPµÄÎïÁ÷¹ÜÀíƽ̨
Ñ¡ÌâÒÀ¾Ý¼°Ñо¿ÒâÒå
ÏÖ´úÎïÁ÷£¬ÊÇÖ¸²úÆ·´ÓÉú²úµØµ½Ïû·ÑµØÖ®¼äµÄÕû¸ö¹©Ó¦Á´£¬ÔËÓÃÏȽøµÄ×éÖ¯·½Ê½ºÍ¹ÜÀí¼¼Êõ£¬½øÐиßЧÂʼƻ®¡¢¹ÜÀí¡¢ÅäËÍÁ´£¬ÎªÓû§Ìṩ¶à¹¦ÄÜ¡¢Ò»Ì廯µÄ×ÛºÏÐÔ·þÎñ£¬´Ó¶ø´ïµ½½µµÍÁ÷ͨ³É±¾¡¢Ìá¸ßÉú²úЧÂÊ¡¢Ôö¼ÓÆóÒµÀûÈó¡£µÄÐÂÐÍ·þÎñÒµ¡£Ëüͨ¹ý¶ÔÔËÊä¡¢²Ö´¢¡¢×°Ð¶¡¢¼Ó¹¤¡¢ÕûÀí¡¢ÅäËÍÓëÐÅÏ¢µÈ·½ÃæÓлú½áºÏ£¬ÐγÉÍêÕûµÄ¹©Ó¦
Ñ¡ÌâµÄÑо¿ÏÖ×´
Ëæ×ÅÈ«Çò¾¼ÃÒ»Ì廯ºÍÐÅÏ¢¼¼ÊõµÄ·ÉËÙ·¢Õ¹£¬ÆóÒµ»ñÈ¡Éú²ú×ÊÁϵÄ;¾¶Óë²úÆ·ÓªÏúµÄ·¶Î§ÈÕÇ÷À©´ó£¬Í¬Ê±£¬ÏÖ´úÆóÒµ¾ºÕùµÄ½á¹ûʹÉú²úÆóÒµºÍÉÌÒµÆóÒµ¶¼½øÈëÁËÒ»¸ö΢Àûʱ´ú£¬²úÆ·µÄ³É±¾ºÍÀûÈó±äµÃ·Ç³£Í¸Ã÷¡£¶øµç×ÓÉÌÎñµÄÍƹ㣬¼Ó¿ìÁËÊÀ½ç¾¼ÃµÄÒ»Ì廯£¬ÔÚÍøÉÏʵÏÖÉÌÁ÷»î¶¯ºó£¬ÐèÒªÒ»¸öÓÐЧµÄÏÖ´úÎïÁ÷¶ÔʵÎïÌṩµÍ³É±¾¡¢¸ßЧÂÊ¡¢ÊÊʱ¡¢ÊÊÁ¿µÄתÒÆ·þÎñ£¬ÕâʹÏÖ´úÎïÁ÷ÔÚÕû¸öÉÌÎñ»î¶¯ÖÐÕ¼ÓоÙ×ãÇáÖصĵØλ¡£µç×ÓÉÌÎñ´øÀ´¶ÔÎïÁ÷µÄ¾Þ´óÐèÇ󣬶øÎïÁ÷¶Ôµç×ÓÉÌÎñ·¢Õ¹µÄÖÆԼƿ¾±Ò²ÈÕÒæÍ»³ö¡£ÕâÆÈÇÐÐèÒªÒ»ÖÖеÄģʽÀ´±ä¸ïÉç»áÉú²ú¡¢Îï×ÊÁ÷ͨ¡¢ÉÌÆ·½»Ò×¼°Æä¹ÜÀí·½Ê½¡£ÏÖ´úÎïÁ÷ºÍµç×ÓÉÌÎñµÄÐͬ·¢Õ¹ÕýºÃ˳ӦÁËÕâÒ»ÒªÇó¡£Òò´Ë£¬Ñо¿µç×ÓÉÌÎñÓëÏÖ´úÎïÁ÷µÄÐͬ·¢Õ¹ÏÔµÃÓÈΪÆÈÇкÍÖØÒª£¬È»¶øÔÚ¾ßÌåʵʩ·½Ã棬·¢ÏÖÐí¶àÎÊÌ⣺Ðͬ·¢Õ¹µÄÔË×÷ģʽ»¹´¦ÓÚ̽Ë÷¡¢ÊÔÑéºÍ·¢Õ¹ÖУ¬ÓÉ´ËÒý·¢µÄһϵÁÐÎÊÌâÓдýÑо¿¡¢Ðµ÷ºÍ½â¾ö¡£¶ø¶ÔÕâЩÎÊÌâ½øÐÐÑо¿£¬ÎÞÂÛÔÚÀíÂÛÉÏ»¹ÊÇÔÚʵ¼ùÉ϶¼ÓкÜÖØÒªµÄÒâÒå¡£
ÍøÂçƾ½èÆä׿ԽµÄ»¥¶¯ÐÔÓë±ã½ÝµÄ½»Á÷ÊÖ¶ÎÕý³ÉΪ×îÓз¢Õ¹Ç±Á¦Óëǰ;µÄÐÂÐËýÌ壬³ÉΪÖÚÉ̼ұ¶Îª¹Ø×¢µÄÐû´«Èȵ㡣Ðí¶àÐÐÒµµÄÏÈ·æÆóÒµ¶¼ÒѾ²ÉÓû¥ÁªÍø¼¼Êõ£¬Îª¿Í»§¡¢ºÏ×÷»ï°éÔÚÍøÉÏÌṩÐÅÏ¢·þÎñ£¬²¢ÇÒ½èÖú»¥ÁªÍø£¬ÃôÈñµÄ²¶×½ÉÌ»ú¡£
×÷Ϊרҵ´ÓÊÂÎïÁ÷ÐÐÒµµÄ´óÐÍÆóÒµ£¬ÌìÏÂͨáéÎïÁ÷¹«Ë¾¸üÐèÒª½¨ÉèºÃÍøÕ¾£¬½«Æä×÷Ϊ¶ÔÍâÐû´«¡¢·þÎñºÍ½»Á÷µÄÔØÌ壬À´ÅäºÏ¹«Ë¾µÄѸËÙ·¢Õ¹£¬Ê¹ÍøÕ¾¾ßÓÐÏÊÃ÷µÄÐÐÒµÌØÉ«£¬Ê¹¸ü¶àµÄÆóҵͨ¹ýÍøÂçÀ´½áÃËÌìÏÂͨáéÎïÁ÷¹«Ë¾£¬Ê¹¸ü¶àµÄ¿Í»§Í¨¹ýÍøÂçÀ´Á˽âÌìÏÂͨáéÎïÁ÷¹«Ë¾¡£
Ïà¹ØÎĵµ£º
<%@ page info="Random Image Show"
pageEncoding="UTF-8" contentType="image/jpg"
autoFlush="true" buffer="16kb" session="false" import="java.io.FileInputStream"
%>< ......
1 javascript £¬ÉèÖÃÒ»¸ö±äÁ¿£¬Ö»ÔÊÐíÌá½»Ò»´Î¡£
2 »¹ÊÇjavascript£¬½«Ìá½»°´Å¥»òÕßimageÖÃΪdisable
onsubmit="getElById('submitInput').disabled = true; return true;">
3 ÀûÓÃstrutsµÄͬ²½ÁîÅÆ»úÖÆ
......
JSPÒ³ÃæÖÐÒ»°ãÓÐÁ½Àà×¢ÊÍ
1.html×¢ÊÍ
ÐÎÈç<!--...................-->
Ëü»áͬhtml±ê¼Çһͬ·¢µ½¿Í»§¶Ë
2.jsp×¢ÊÍ£¨3ÖÖ£©
ÐÎÈç<%--.............................--%>
Ëü²»»á±»·¢Ë͵½¿Í»§¶Ë£¬Ö»ÓÃÀ´×¢ÊÍ·þÎñÆ÷¶ËµÄjspÎļþ£¬Á¬jspÉú³ÉµÄservletҲûÓÐ×¢ÊͽøÈ¥£¬ÕâÒ²ÊǴ󲿷ÖÈËʹÓõÄ×¢ÊÍ
ÐÎÈç<%//...... ......
JSPÒ³ÃæµÄÈýÀà»ù±¾ÔªËØ
1.ÉùÃ÷
ÐÎÈç
<%!
int a;
int add(int a,int b)
{
return a+b;
......
½«Ò»¸öJSPÒ³ÃæÖеÄ<%@ page contentType="text/html; charset=GBK" language="java" %>Ì滻Ϊ
<%@ page contentType="application/vnd.ms-Excel;charset=GBK" language="java"%> //Excel
»ò
<%@ page contentType="application/vnd.ms-word;charset=GBK" language="java"%> //Word
ÔÚÒ³Ã濪ʼÊä³öÊý¾ ......