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

½¨Á¢JSP開發環¾³

 1.  JRE °²裝 (¿É從 http://java.sun.com/ÏÂ載)
       Java SE Runtime Environment (JRE)   JRE 6 Update 17
 2.  JDK°²裝   (¿É從 http://java.sun.com/ÏÂ載)
      Java SE Development Kit (JDK)    JDK 6 Update 17
 3.JDK  Enviroment Variables 設ÖÃ
       JAVA_HOME      C:\Java\jdk1.6.0_04
       CALLSSPATH     .;
       Path                  %JAVA_HOME%\bin
 4. 測試ÊÇ·ñ設¶¨³É¹¦
       cmd->運ÐÐ javac  or 運ÐÐ java -version
 5.tomcat 6.20  (¿É從  http://www.apache.org/ ÏÂ載)
      6.0.20 -> Binary Distributions ->Windows Server Installer  ÏÂÔغó°²×°
      browser : http://localhost:8080  µ¯³öTomcat Ò³Ãæ¡£¼´°²×°³É¹¦¡£
     ÐéÄâĿ¼ÅäÖãº
      create folder  "F:JavaWebApp"
      È»ºó½¨Á¢web.xml Îļþ ¿É´ÓF:\Tomcat 6.0\webapps\ROOT\WEB-INF\Web.xml¸´ÖÆÕ³Ìù£¬
      °Ñ½Úµã</web-app>ÀïÃæÄÚÈÝɾ³ý¡£
      F:\Tomcat 6.0\conf\server.xml ÎļþÖÐ </host>Ç°ÅäÖÃÐéÄâĿ¼·¾¶ <Context path="/test" docBase="F:\JavaWebApp"/>
      È»ºóÔÙÐéÄâĿ¼Öн¨helloWorld.jspÒ³Ã棬browser ²âÊÔ http://localhost:8080/test/helloWorld.jsp .
 6.Eclipse (¿É從 http://www.eclipse.org ÏÂ載)
    ´Ë為×ÀÃæ開發¹¤¾ß
 7.myEclipse (¿É從 ÏÂ載)
    JSP開發¹¤¾ß  &


Ïà¹ØÎĵµ£º

JSP»ñÈ¡ÕæʵIPµØÖ·




 
ÔÚJSPÀ»ñÈ¡¿Í»§¶ËµÄIPµØÖ·µÄ·½·¨ÊÇ£ºrequest.getRemoteAddr£¨£©£¬ÕâÖÖ·½·¨Ôڴ󲿷ÖÇé¿ö϶¼ÊÇÓÐЧµÄ¡£µ«ÊÇÔÚͨ¹ýÁË
Apache£¬SquidµÈ·´Ïò´úÀíÈí¼þ¾Í²»ÄÜ»ñÈ¡µ½¿Í»§¶ËµÄÕæʵIPµØÖ·ÁË¡£Èç¹ûʹÓÃÁË·´Ïò´úÀíÈí¼þ£¬ÓÃ
request.getRemoteAddr£¨£©·½·¨»ñÈ¡µÄIPµØÖ·ÊÇ£º127.0.0.1»ò
192.168.1.110£¬¶ø²¢²»ÊÇ¿ ......

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

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

JSP/ServletÖбàÂëÎÊÌâ½â¾ö·½°¸

Ê×ÏÈ£¬ËµËµJSP/ServletÖеļ¸¸ö±àÂëµÄ×÷Óá£
 
ÔÚJSP/ServletÖÐÖ÷ÒªÓÐÒÔϼ¸¸öµØ·½¿ÉÒÔÉèÖñàÂ룬pageEncoding="UTF-8"¡¢contentType="text/html;charset=UTF-8"¡¢request.setCharacterEncoding("UTF-8")ºÍresponse.setCharacterEncoding("UTF-8")£¬ÆäÖÐÇ°Á½¸öÖ»ÄÜÓÃÓÚJSPÖУ¬¶øºóÁ½¸ö¿ÉÒÔÓÃÓÚJSPºÍServletÖС£
1¡ ......

FCKeditor 2.5 jsp struts2

Ò».ÏÂÔØfckeditor-java-demo-2.5.war
           ÏÂÔصØÖ·£ºhttp://java.fckeditor.net/demo.html£¬²¿Êðµ½tomcatÏ£¬Æô¶¯ºó¾Í¿ÉÒÔ·ÃÎÊ´Ëdemo.
¶þ.jsp¼¯³É
           1. copy "fckeditor"Îļþ¼Ðµ½ÍøվĿ¼&n ......

¹ØÓÚJSPÖÐrequest.getRealPath()

ÔÚΪ·þÎñÆ÷¶Ë×é¼þ±à³Ìʱ£¬ÄãºÜ¿ÉÄÜÒª´ÓÏà¶ÔÓÚweb¸ùµÄ·¾¶À´È¡µÃij¸öÎļþµÄÕæʵ·¾¶£¬µ«´ËÎļþʵ¼ÊÉÏÔÚÕ¾µãµÄÒ»¸öÐéÄâ·¾¶ÉÏ¡£
ʲôÊÇÐéÄâ·¾¶£¿
ÔÚÒ»¸öweb·þÎñÆ÷ÉÏ£¬ÐéÄâ·¾¶½«ÎïÀíÉÏ·ÖÀëµÄ¸÷Îļþ×éºÏÔÚÒ»Æ𣬷ÅÔÚͬһ¸öÕ¾µã·¾¶ÉÏ£¬ÔÚÓ¦Ó÷þÎñÆ÷ÉÏ£¬Ã¿¸öÓ¦Óö¨Î»ÓÚÆä×Ô¼ºµÄÐéÄâ·¾¶ÉÏ£¬Êµ¼ÊÉÏÏ໥֮¼äÓÐ×ÅÍêÃÀµØ·ÖÀë¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ