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

jspÔËÐÐʱ¾­³£Óöµ½µÄ¼¸¸öÎÊÌâ

1¡¢ÈçºÎÏÔʾĿ¼ÁÐ±í£º
ÎÒÃÇÔÚ±¾»ú²âÊÔ³ÌÐòʱ£¬Ò»°ã¶¼Ï°¹ßÔÚä¯ÀÀÆ÷ÖоÍÄܱéÀúµ½Ä³¸öĿ¼Ï¶¼ÓÐÄÄЩÎļþ£¬Õâ¾ÍÐèÒªweb·þÎñÆ÷Ö§³ÖĿ¼ÁÐ±í£º
´ò¿ªÎļþconf/web.xml£¬ÕÒµ½ÒÔÏ´úÂ룺
<param-name>listings</param-name>
<param-value>false</param-value>
½«ÆäÖеÄfalse¸Ä³Étrue
2¡¢ÅäÖÃerror-page£º£¨Ö¸¶¨´¦Àí´íÎóµÄÒ³Ã棩
´ò¿ªÎļþD:\demo\WEB-INF\web.xml£º
ÔÚ<web-app>…</web-app>Öмä¼ÓÈ룺
<error-page>
<error-code>404</error-code>
<location>/NotFound.jsp</location>
</error-page>
£¨´íÎó´úÂëΪ404µÄ´íÎóµ¼Ïòµ½NotFound.jsp£©
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
£¨µ±ÏµÍ³·¢Éú500´íÎó¼´·þÎñÆ÷ÄÚ²¿´íÎóʱ£¬Ìøתµ½´íÎó´¦ÀíÒ³Ãæerror.jsp£©
<error-page>
<exception-type>java.lang.NullException</exception-type>
<location>/error.jsp</location>
</error-page>
£¨µ±ÏµÍ³·¢Éújava.lang.NullException£¨¼´¿ÕÖ¸ÕëÒì³££©Ê±£¬Ìøתµ½´íÎó´¦ÀíÒ³Ãæerror.jsp£©
ÌáÐÑ£º
ÒÔÉÏÒ³Ã涼ÐèÒª×ö´óÒ»µã£¨>=2kB£©£¬·ñÔò²»Æð×÷Óá£
Ô­Òò£ºtomcat°ÑÕâÑùµÄÒ³Ãæ×Ö½ÚÏÞÖÆÔÚ²»ÉÙÓÚ¶àÉÙ×Ö½Ú¡£
3¡¢jspÒ³Ãæ³öÏÖÂÒÂëÈçºÎ½â¾ö£¿
ÔÚҳͷ¼ÓÉÏ£º
<%@ page contentType=“text/html; charset=gb2312″%>


Ïà¹ØÎĵµ£º

jspÖÐÔõôÁ¬½ÓexcelÊý¾Ý¿â

1.н¨Ò»¸öexcelÎļþ  Ãû×ÖËæ±ã  À©Õ¹Ãû .xls
2.µÚÒ»ÐÐÊDZíÍ·   дÉÏÁÐÃû  Èç id   pwd
ÏÂÃæ¾ÍÊÇдÊý¾ÝµÄµØ·½
Ñ¡ÖÐÒ»¶ÎÇøÓò   Èçͼ

²Ëµ¥   ²åÈë--Ãû³Æ--¶¨Òå
È¡¸öÃû×Ö   µãÌí¼Ó   Õâ¸öÃû×Ö¾ÍÊDZíÃû

3.ÉèÖÃÊý¾ÝÔ´
ϵͳDSN--Ìí¼Ó-- ......

Java/JspÅäÖÃ

JAVAÅäÖãº
1£º JAVA_HOME £º  C:\Program Files\Java\jdk1.6.0_12
2£ºCLASSPATH £º    .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
3£ºPATH £º              %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
TomcatÅäÖ ......

MyEclipseÐÞ¸ÄÒ³ÃæÄ£°å£¨JSPºÍHTMLµÈ£©

 
MyEclipse:ÐÞ¸ÄMyEclipse¿ª·¢¹¤¾ßÖеÄÒ³ÃæÄ£°å£¨JSPºÍHTMLµÈ£©
1.ÓÃMyEclipse¹¤¾ß¿ª·¢WebÏîÄ¿£¬ÓÐÒ»¸öºÜÆÕ±éµÄÎÊÌ⣬¾ÍÊÇÔÚн¨Ò»¸öÒ³ÃæÎļþʱ£¬ÐèÒªÐÞ¸ÄpageEncodingÖµ£¬Ò³ÃæÖÐĬÈϵÄpageEncodingÖµÒ»°ãÊÇISO-8859-1¡£
2.Èç¹ûWebÏîÄ¿ÐèÒªÖ§³ÖÖÐÎÄ£¬ÄǾͱØÐë°ÑÄǸöISO-8859-1¸ø¸Äµô£¬»»³ÉÒÔϼ¸ÖÖ£ºUTF-8¡¢GB2312 ......

jsp ÂÒÂëÎÊÌâ

a.jspÒ³ÃæÄÚÈÝ£º
%26lt;%@ page language£½"java" import£½"java.util." pageEncoding£½"GB2312"%%26gt;%26lt;form action£½"b.jsp"%26gt; name£º%26lt;input type£½text name£½name%26gt; %26lt;input type£½submit%26gt;%26lt;/form%26gt;
b.jspÒ³ÃæÄÚÈÝ£º
%26lt;%@ page language£½"java" import£½"java.util." pageE ......

С±à¸ÅÊöJSP¼¼Êõ

 
°´Õսű¾ÓïÑÔÊÇ·þÎñÓÚijһ¸ö×ÓϵͳµÄÓïÑÔÕâÖÖÂÛÊö£¬ JSPÓ¦µ±±»¿´×÷ÊÇÒ»Öֽű¾ÓïÑÔ£¬È»¶ø£¬×÷ΪһÖֽű¾ÓïÑÔ£¬ JSPÓÖÏԵùýÓÚÇ¿´óÁË£¬ÔÚJSPÖм¸ºõ¿ÉÒÔʹÓÃÈ«²¿µÄJavaÀà¡£
×÷ΪһÖÖ»ùÓÚÎı¾µÄ¡¢ÒÔÏÔʾΪÖÐÐĵĿª·¢¼¼Êõ£¬JSPÌṩÁËJava Servlet µÄËùÓкô¦£¬²¢ÇÒ£¬µ±ÓëÒ»¸öJavaBeans Àà½áºÏÔÚÒ»Æðʱ£¬ÌṩÁËÒ»ÖÖʹÄÚÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ