FreeBSD 7.0 °²×°ÅäÖÃJSP»·¾³apache+apache
ÎÒÏÈ˵Ã÷Ò»ÏÂÅäÖû·¾³µÄ´ó¸ÅÇé¿ö£º
* FreeBSD 7.0-RELEASE
* apache-2.2.9
* mod_jk-ap2-1.2.26
* diablo-jdk-1.6.0.07.02
* tomcat-6.0.16
¾ßÌåµÄ°æ±¾ÐÅÏ¢ÏÔʾÈçÏ£º
freebsd# pkg_info
apache-2.2.9_5 Version 2.2.x of Apache web server with prefork MPM.
apache-tomcat-6.0.16 Open-source Java web server by Apache, 6.x branch
diablo-jdk-1.6.0.07.02 Java Development Kit 1.6.0_07.02
mod_jk-ap2-1.2.26 Apache2 JK module for connecting to Tomcat using AJP1X
ºÃ£¬À´¿´¿´¾ßÌåµÄ×ö·¨°É£¡
µÚÒ»²½£º°²×°FreeBSD£¬²ÉÈ¡×îС»¯°²×°µÄ²½Ö裬Ëæ±ã°Ñports¸ø×°ÉÏ°É£¬·½±ãÖ±½Ó°²×°±ØÒªµÄports¡£
ÕâÀïûÓÐʲôÌرðµÄµØ·½£¬Ö»ÊÇÌáÐÑһϣ¬°²×°Íê³Éºó×¢ÒâÒª¸üе½×îеÄports tree £¡
ÓÉÓÚÊÇ×îС»¯°²×°£¬ËùÒÔÐèҪͨ¹ýports°²×°ÏÂÃ漸¸öpackage£º
* csup(cvsupµÄ°æ±¾)
* portupgrade
Íê³É°²×°ºó£¬¸üÐÂports tree£¬ÎÒʹÓÃÁËcvsup.FreeBSDChina.org ×÷Ϊ¾µÏñ£¡
µÚ¶þ²½£º°²×° JDK £FreeBSD ·¢²¼µÄ JDK 1.6 Èí¼þ°ü
´ÓportsÀ´±àÒëJDK£¡
2.1 ½ø /usr/ports/java/diablo-jdk16 £¬make£¬ÌáʾÏÂÔØjdkÎļþ£¨diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2£©µ½ /usr/ports/distfiles Ï£¬
ͨ¹ýbrower µ½ http://www.FreeBSDFoundation.org/cgi...07-b02.tar.bz2
ÏÂÔØ£¬ÐèÒªagree¡£
×¢£º Ò²¿ÉÒÔÏÂÔØdiablo-jdk-freebsd7.i386.1.6.0.07.02.tbzÎļþµ½/usr/ports/distfilesĿ¼ÏÂÈ»ºó pkg_add ¼´¿É
°²×°Ê±£¬ÐèÒª°²×°javavmwrapper-2.3.2.tbz¡£ÏÂÔØÖ®ºó·Åµ½/usr/ports/distfilesĿ¼Ï£¬°²×°diablo-jdk-freebsd7.i386.1.6.0.07.02.tbzʱ£¬»á×Ô¶¯°²×°¡£
2.2 make all install clean
2.3 ¼ì²é°²×°
freebsd# /usr/local/diablo-jdk1.6.0/bin/java -version
java version “1.6.0_07″
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) Client VM (build
Ïà¹ØÎĵµ£º
ÀÊÎÖ½ÌÓý³É¶¼¼ÆËã»úÅàѵ-JSPƪ
J2EE(Java 2 Enterprise Edition)¼¼ÊõÒѹ㷺ӦÓÃÔÚWebÓ¦Óÿª·¢ÖУ¬ÆäÖеÄJavaBean¡¢Servlet¼¼ÊõΪ¿ª·¢ÕßÌṩÁ˸üΪÇåÎúµÄ¿ª·¢»·¾³£¬Ê¹ÓÃJSP¼¼Êõ±íÏÖÒ³Ã棬ʹÓÃServlet¼¼ÊõÍê³É´óÁ¿µÄÒµÎñ´¦Àí£¬Ê¹ÓÃBeanÀ´´æ´¢Êý¾Ý¼°Ò»Ð©ÒµÎñ´¦Àí¡£ÔÚWEBÓ¦ÓÃÖУ¬ÒµÎñÊý¾Ý´æ´¢µ½Êý¾Ý¿âÖеĴ¦Àí¹¤×÷¾³£ºÜ·±ÖØ£¬ ......
Jsp±àÂë¹æ·¶
1.1 Îļþºó׺(File Suffixes)
ÎļþÀà±ð ¡¡¡¡ ¡¡¡¡¡¡¡¡¡¡Îļþºó׺
--------------------------------------
JavaÔ´Îļþ¡¡¡¡¡¡¡¡¡¡¡¡¡¡.java
Java×Ö½ÚÂëÎļþ¡¡¡¡¡¡¡¡¡¡.class
¶¯Ì¬Ò³Ãæ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.jsp
¾²Ì¬Ò³Ãæ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.html
½Å±¾Îļþ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡.js
1.2 ³£ÓÃÎļþÃû(Common ......
jspÖеÚÒ»¾ä£º
<%@ page language="java" import="java.sql.*,java.util.*," contentType="text/HTML;charset=gb2312" pageEncoding="gb2312"%>
htmlÖмÓÉÏ
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
ͨ³£ÕâÑù¾ÍûÓÐÎÊÌâÁË¡£ .
ÔÙÕߣº µ¼ÈëjsʱºòÉ ......
1.No getter method for property name problem(struts)
ÓÐÒ»ÖÖ¿ÉÄÜÊÇBeanûÓÐдÏàÓ¦µÄget·½·¨£¬ÀýÈç±äÁ¿userNameµÄget·½·¨ÊÇgetUserName£»
»¹ÓоÍÊÇÕâ¸öBeanΪ¿Õ£»
2.
MyEclipseµÄ×Ô¶¯Ìí¼ÓstrutsºÍhibernate¹¦Äܲ»ÄÜ·µ»Ø£¬Çë×¢Ò⣡
ËùÒÔÎÒÏÈʹÓÃMyEclipseµ¼ÈëstrutsºÍhibernate£¬È»ºó½«ËüÃǵÄjarµ¼Èëµ½ÁíÍâÒ»¸öн¨µÄ ......
JSPÖеÄCOOKIE²Ù×÷
Cookie¸ÅÄî:
CookieµÄ¸ñʽʵ¼ÊÉÏÊÇÒ»¶Î´¿Îı¾ÐÅÏ¢, ÓÉ·þÎñÆ÷Ëæ×ÅÍøÒ³Ò»Æð·¢Ë͵½¿Í»§¶Ë, ²¢±£´æÔÚ¿Í»§¶ËÓ²ÅÌÖÐÖ¸¶¨µÄĿ¼µÄ. ´ó¼Ò¶¼´«ËµCookie»áÔì³ÉÑÏÖصݲȫÍþвʲôµÄ, Æäʵ²»ÊÇÕâô»ØÊÂÇé. ·þÎñÆ÷¶ÁÈ¡CookieµÄʱºò, Ö»Äܹ»¶ÁÈ¡µ½Õâ¸ö·þÎñ ......