jsp ÍøÂç
ÔÚtomcatÏÂÕÒµ½tomcat -> conf -> server.xml ÔÚÕâÒ»¾äÖÐÌí¼ÓºìÉ«²¿·Ö
<Connector connectionTimeout="20000" port="9090" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true"
/> <!--URLEncoding=""--> ±íʾÓÃÄãÒ³ÃæµÄ±àÂ뷽ʽ×÷Ϊurl±àÂ뷽ʽ£¬postºÍget¶¼ÊʺÏ
Ïà¹ØÎĵµ£º
MVCÊÇÓÉÄ£ÐͲ㣬ÊÓͼ²ã£¬¿ØÖƲã×é³É£¬MVCÌá¸ßÁË¿ª·¢Ð§ÂÊ£¬±ãÓÚά»¤
·ÖÒ³ÊÇWeb¿ª·¢ÖеÄÒ»¸öÖØÒªµÄ¹¦ÄÜ£¬ÄÇÔõÑùʵÏÖ·ÖÒ³ÄØ£¿£¿£¿
¼Ù·ÖÒ³ÊÇÖ¸²éѯ³öËùÓеÄÊý¾Ý£¬Ö»ÏÔʾÐèÒªµÄÊý¾Ý£¬ËüÍêÈ«ÓɳÌÐòʵÏÖ£¬¿ª·¢Ð§Âʲ»¸ß£¬µ«ÈÝÒ×ʵÏÖ
´úÂëÈçÏÂ:
Ò».Ä£ÐͲã
UserInfo(JavaBeanµÄʵÏÖ£¬´«µÝÊý¾Ý£©
package com.feng.test;
......
1 forward ºÍredirectµÄÇø±ð
Ò»¾ä»°£¬×ª·¢ÊÇ·þÎñÆ÷ÐÐΪ£¬Öض¨ÏòÊÇ¿Í»§¶ËÐÐΪ¡£ÎªÊ²Ã´ÕâÑù˵ÄØ£¬Õâ¾ÍÒª¿´Á½¸ö¶¯×÷µÄ¹¤×÷Á÷³Ì£º
ת·¢¹ý³Ì£º¿Í»§ä¯ÀÀÆ÷·¢ËÍhttpÇëÇó----¡·web·þÎñÆ÷½ÓÊÜ´ËÇëÇó--¡·µ÷ÓÃÄÚ²¿µÄÒ»¸ö·½·¨ÔÚÈÝÆ÷ÄÚ²¿Íê³ÉÇëÇó´¦ÀíºÍת·¢¶¯×÷----¡·½«Ä¿±ê×ÊÔ´·¢Ë͸ø¿Í»§£»ÔÚÕâÀï£ ......
document.getElementById("flag")ÔÚieÖУ¬jspÖеÄÔªËØûÓÐidÖµ£¬ÓÐnameֵʱ£¬Ò²Äܲé³öÀ´£¬°´ÕÕnameÖµ²é¡£
µ«ÊÇÔÚfirefoxÖУ¬Èç¹ûûÓÐidÖµ£¬Ôò²é²»³öÀ´¡£ËùÒÔieÖУ¬nameºÍidÓÐʱͨÓ㻵«ÊÇfirefoxÖУ¬ÊÇÓÐÕâÑϸñÇø±ðµÄ¡£ ......
ºÜ¾ÃûÓÐÓÃMysqlÁË£¬·¢ÏÖССµÄʱ¼äÎÊÌâÒ²Óöµ½²»ÉÙÂé·³£¬ºÇºÇ
ËùÒÔ×ܽáһϣº
µÚÒ»ÖÖ:
Date time= new java.sql.Date(new java.util.Date().getTime());
µÚ¶þÖÖ:
java ÓÃPreparedStatementÀ´setDate,ÓÃÎʺŵÄÐÎʽ¸øÈÕÆÚÎʺŸ³Öµ
pstmt.setTimestamp(8, new Timestamp(System.currentTimeMillis()));
pst ......
404´íÎóÊÇʲôʱºò²úÉúµÄÄØ£¿µ±ÎÒÃÇͨ¹ýä¯ÀÀÆ÷ÇëÇó·þÎñÆ÷ÉϵÄij¸ö×ÊÔ´µÄʱºò£¬¿ÉÄÜÊÇJSP£¬Ò²¿ÉÄÜÊÇServlet£¬Èç¹ûÒª·ÃÎʵÄ×ÊÔ´²»´æÔÚ£¬¾Í»á²úÉú404´íÎó£¬404´íÎó¿ÉÄÜÊÇÓ¦Óñ¾ÉíµÄÎÊÌ⣬ÀýÈçûÓÐÕý³£²¿Êð¡¢Ãû×Öд´íÁË£¬Ò²¿ÉÄÜÊÇÎļþµÄÎÊÌ⣬JSPÎļþ²»´æÔÚ¡¢Ãû×Ö´íÎ󣬻òÕßServleûÓÐÅäÖá£
¸ù¾ÝÕâЩÇé¿ö£¬404´íÎóµÄ½â¾ ......