ASPÓëJSP ¹ØÓÚÒ³ÃæµÄÊäÈëºÍÊä³öµÄÎÊÌâ
Ò³ÃæµÄÊäÈëºÍÊä³öÉæ¼°µ½ÁËRequestºÍResponse,ÓÉÓÚËûÃǺÍJspÖеÄÏàËÆ,
ÏÂÃæÎÒÃǽøÐÐÏêϸµÄ½â¶Á£º
JSPÖУº
ÔÚ¶¯Ì¬ÍøÒ³¿ª·¢ÖУ¬HTML±íµ¥ÊÇÓëÓû§½»»¥ÐÅÏ¢µÄÖ÷ÒªÊֶΡ£
ʹÓÃJSP´¦Àí±íµ¥ÇëÇóʱ£¬Ò»°ã×ñÑÕâÑùÒ»ÖÖģʽ£¬Ê×ÏÈ£¬Óû§Í¨¹ý±íµ¥¿Ø¼þÊäÈë²¢Ìá½»ÐÅÏ¢;½Ó×Å£¬JSPÒ³Ãæ»ñµÃ±íµ¥Êý¾Ý£¬½øÐÐÂß¼´¦Àí;×îºó£¬JSPÒ³Ãæ¸ù¾Ý´¦Àí½á¹û£¬×ªÏò²»Í¬µÄ½á¹ûÒ³Ãæ¡£
ËùνÄÚÖöÔÏó¾ÍÊÇÓÉWebÈÝÆ÷¼ÓÔصÄÒ»×éÀàµÄʵÀý£¬Ëü²»ÏñÒ»°ãµÄJavaÄÇÑùÓÓnew”È¥»ñȡʵÀý£¬¶øÊÇ¿ÉÒÔÖ±½ÓÔÚJSPÒ³ÃæʹÓõĶÔÏó¡£JSPÄÚÖöÔÏóµÄÃû³ÆÊÇJSPµÄ±£Áô×Ö¡£
out¶ÔÏóÓÃÓÚÏòÒ¶ÃæÊä³öÊý¾Ý¡£
request¶ÔÏóÓÃÓÚÏò¿Í»§¶ËÊä³öÊý¾Ý¡£
String getPartameter(String name) ¸ù¾ÝÒ³Ãæ±íµ¥×é¼þÃû³Æ»ñÈ¡Ò³ÃæÌá½»Êý¾Ý
String[] getParameterValues(String name) »ñÈ¡Ò»¸öÒ³Ãæ±íµ¥×齨¶ÔÓ¦¶à¸öµÄÓû§µÄÇëÇóÊý¾Ý
void setCharacterEncoding(String name) Ö¸¶¨Ã¿¸öÇëÇóµÄ±àÂ룬ÔÚµ÷ÓÃrequest.getParameter() ·½·¨Ö®Ç°½øÐÐÉ趨£¬¿ÉÒÔÓÃÓÚ½â¾öÖÐÎÄÂÒÂëÎÊÌâ¡£
request.getRequestDispatcher(String path) ·µ»ØÒ»¸öjavax.servlet.RequestDispatcher¶ÔÏ󣬸öÔÏóforward·½·¨ÓÃÓÚת·¢ÇëÇó
request¶ÔÏóµÄ¼¸¸ö³£Ó÷½·¨£º
response¶ÔÏó±È½Ï³£Óõķ½·¨ÊÇsendRedirect(String location),Õâ¸ö·½·¨½«ÇëÇóÖض¨Ïòµ½ÁíÒ»¸ö²»Í¬´óµÄ£Õ£Ò£Ì
response¶ÔÏóÓërequest¶ÔÏóÏà¶ÔÓ¦£¬ËüÓÃÓÚÏìÓ¦¿Í»§ÇëÇó²¢Ïò¿Í»§¶ËÊä³öÐÅÏ¢
ASP ÖÐRequest³£ÓõÄÊôÐÔ
QuryString¼¯ºÏÖ÷ÒªÓÃÓÚÊÕ¼¯HTTPÐÒéÖеÄGetÇëÇó·¢Ë͵ÄÊý¾Ý£¬Èç¹ûÒ»¸öÇëÇóʼþÖб»ÇëÇóµÄ³ÌÐòURLÖгöÏÖ“£¿”ºÅºóµÄÊý¾Ý£¬Ôò±íʾ´Ë´ÎÇëÇóÊý¾Ý·½Ê½ÎªGet£¬×î³£¼ûµÄΪ³¬Á´½Ó¡£
Form ¼¯ºÏÓëQueryStringÀàËÆ£¬µ«ËüÓÃÓÚÊÕ¼¯Post·½·¨·¢Ë͵ÄÇëÇóÊý¾Ý£¨get Ò»°ãÖ»ÄÜ´«µÝ256KBµÄÊý¾Ý£¬Post·½·¨¿ÉÒÔ´ïµ½2MB£©
ServerVariable(»·¾³±äÁ¿)¼¯ºÏÖаüº¬ÁË·þÎñÆ÷ºÍ¿Í»§¶ËµÄϵͳÐÅÏ¢¡£
Params¼¯ºÏÊÇÒÔÉÏÈýÖÖ·½Ê½µÄ¼¯ºÏ£¬Ëü²»Çø·ÖÊÇÓÉÄÇÖÖ·½Ê½´«µÝµÄ²ÎÊý£¬¸Ã·½·¨ÐèÒªÔÚ´ó·¶Î§ÄÚÑ°ÕÒÆ¥ÅäËùÒÔЧÂʽϵ͡£
Response ¶ÔÏó³£Óõķţº
Write()·½·¨¿ÉÒÔÊä³öÖ¸¶¨µÄÎı¾ÄÚ
End()·½·¨¿ÉÒÔʹWeb·þÎñÆ÷Í£Ö¹µ±Ç°µÄ³ÌÐò²¢·µ»Ø½á¹û
Redirect()·½·¨¿ÉÒÔ½«Ò³ÃæÖض¨Ïòµ½ÁíÍâÒ»¸öÒ³Ãæ
Ïà¹ØÎĵµ£º
±¾½ÚÖеÄÖ÷ÌâÃèÊöÈçºÎʹÓà Visual Web Developer ¹¤¾ßÏäµÄ“HTML”Ñ¡ÏÉ쵀 ASP.NET Web ·þÎñÆ÷¿Ø¼þ¡£
ĬÈÏÇé¿öÏ£¬·þÎñÆ÷ÎÞ·¨Ê¹Óà ASP.NET ÍøÒ³É쵀 HTML ÔªËØ£»ÕâЩԪËر»ÊÓΪ´«µÝ¸øä¯ÀÀÆ÷µÄ²»Í¸Ã÷Îı¾¡£µ«ÊÇ£¬Í¨¹ý½« HTML ÔªËØת»»³É HTML ·þÎñÆ÷¿Ø¼þ£¬¿ÉÒÔ½«ËüÃǹ«¿ªÎª ......
ÎÊÌâÈçÏ£º
֮ǰ,д¹ýÒ»¸öDownload.jspÎļþ,¿ÉÒÔ½â¾öÏÂÔØÎļþÂÒÂëÎÊÌâ(ÖîÈç:DOC,XSLÎļþµÈµÈ).
ºóÀ´·¢ÏÖ,Óöµ½ÖÐÎÄÃûµÄÎļþµÄʱºò,ÎļþÏÂÔؽ«»á±¨´í~~~~
½ñÌì,ͨ¹ý¸ÄдÔDownload.jspÎļþÒѾ³¹µ×½â¾öÁËÕâ¸öÎÊÌâ~
ÏÖÔÚ,°ÑÒ»ÕûÌ×µÄÎļþÉÏ´«ÏÂÔصķ½·¨¸øÌù³öÀ´~~~ÒÔ±ã´ó¼Ò½è¼ø!~!~!~!~!
×÷Õß:¹Å°£¼°·¨ÀÏ
download ......
²úÉú״̬ÏìÓ¦Âë
100¡«199£º±íʾ·þÎñ¶Ë³É¹¦½ÓÊÕÇëÇ󣬵«ÒªÇó¿Í»§¶Ë¼ÌÐøÌá½»ÏÂÒ»´ÎÇëÇó²ÅÄÜÍê³ÉÈ«²¿´¦Àí¹ý³Ì¡£
200¡«299£º±íʾ·þÎñ¶ËÒѾ³É¹¦½ÓÊÕÇëÇ󣬲¢Íê³ÉÁËÈ«²¿´¦Àí¹ý³Ì¡£
300¡«399£º±íʾ¿Í»§¶ËÇëÇóµÄ×ÊÔ´ÒѾÒƵ½Á˱ðµÄλÖ㬲¢Ïò¿Í»§¶ËÌṩһ¸öеĵØÖ·£¬Ò»°ãÕâ¸öеØÖ·ÓÉHTTPÏìÓ¦ÏûϢͷµÄLocation×Ö¶ÎÖ¸¶¨¡£
400¡ ......
ASPÍøÕ¾³ÌÐòÔÚ¹úÄÚÔËÓúܹã,µ«ÊÇÀàËÆÓÚ im286.asp?id=20050307213811ÕâÑùµÄURLÓе㲻ÀûÓÚËÑË÷ÒýÇæµÄÊÕ¼,Ò²¾ÍÊÇ˵²»·ûºÏÓѺÃURL(URLs- Friendly)µÄ±ê×¼,ÄÇôÎÒÃÇÓÃISAPI_Rewrite´òÔìÒ»¸öClean URL,
1.ÏÂÔØISAPI_Rewrite.ISAPI_Rewrite ·Ö¾«¼ò(Lite)ºÍÍêÈ«(Full)°æ.¾«¼ò°æ²»Ö§³Ö¶Ôÿ¸öÐéÄâÖ÷»úÕ¾µã½øÐÐÖØд,Ö»ÄܽøÐÐÈ«¾Ö´¦À ......
½ñÌìÒ»¸öASPÏîÄ¿·¢ÏÖ »¯¾³ÉÏ´«×é¼þÉÏ´«BMPͼƬ²»³É¹¦£¬Ìáʾ²»ÔÊÐí²Ù×÷£¬¾²éÒòΪͼƬ̫´ó£¬ÒÔϽâ¾ö·½·¨£º
ÔÚ·þÎñÀï¹Ø±Õiis admin service·þÎñ
ÕÒµ½windows\system32\inesrv\ϵÄmetabase.xml,
´ò¿ª£¬ÕÒµ½ASPMaxRequestEntityAllowed &n ......