锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
]]>
鏈夌潃涓鑷寸殑鐩爣錛氬湪鏃㈠畾鏃惰景鍐呭畬鎴愬鎴鋒弧鎰忕殑宸ヤ綔浜у嚭
闃呰鍏ㄦ枃
]]>
]]>
]]>
]]>
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server 4.1). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQL41 --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQL41
#
#
# Guildlines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
port=3306
[mysql]
default-character-set=gbk
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/DB/mysql/"
#Path to the database root
datadir="D:/DB/mysql/Data/"
# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=gbk
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=100
# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0
# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256
# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=5M
# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before. This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8
#*** MyISAM Specific options
# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G
# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_max_extra_sort_file_size=100G
# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=8M
# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=8M
# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K
# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=212K
#*** INNODB Specific options ***
# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb
# Additional memory pool that is used by InnoDB to store metadata
# information. If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS. As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=2M
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1
# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=1M
# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system. Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=8M
# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=10M
# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=8
銆銆鎺ヨ繛鐪嬪埌鍑犵瘒鏂囩珷璋坈ocoon錛屽洜鍏朵腑鐗墊壇鏈澶錛岀湅鍚庝竴澶撮浘姘達(dá)紝閬傝搗瀛︿範(fàn)涔嬪績銆?/P>
銆銆緗戜笂鎵懼埌寰堝璋坈ocoon鐨勶紝IBM : developerWorks 涓浗緗戠珯 鐨勫湪綰挎暀紼嬪啓寰楁渶媯掋備笅闈㈠氨鏄涔?fàn)绗旇畮图岃寰楁湁鎰忔濆氨欏烘墜璁頒笅鏉ヤ簡銆?/P>
銆銆浠ヤ笅涓夎鏄彇婧愮爜鐨勫懡浠ゃ?BR>銆銆cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
銆銆cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -z3 checkout -r cocoon_20_branch xml-cocoon2
銆銆cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic logout
銆銆
銆銆綆¢亾鐢變竴浜涜緭鍏ユ暟鎹互鍙?qiáng)闅忓悗瀵瑰畠杩涜鐨勪竴浜涘鐞嗘楠ゆ瀯鎴愩傛瘡涓鐞嗘楠ゆ帴鍙楀墠涓姝ョ殑杈撳嚭浣滀負(fù)杈撳叆錛屼竴鐩村埌杈劇閬撶殑鏈騫朵駭鐢熸渶緇堣緭鍑恒?/P>
銆銆Cocoon 鍖呭惈璁稿甯歌綆¢亾緇勪歡錛屾牴鎹湪綆¢亾涓壆婕旂殑瑙掕壊錛屽畠浠垎緇勬垚鍑犵瀹屽叏涓嶅悓鐨勭被鍨嬨?/P>
銆銆綆¢亾杈撳叆 鈥?鐢熸垚鍣?濡侳ileGenerator,HTMLGenerator,DirectoryGenerator)鍜岄槄璇誨櫒(甯哥敤鏉ヨ闈欐佹枃浠?
銆銆澶勭悊姝ラ 鈥?杞崲鍣?濡俋SLT 杞崲鍣?鍜屾搷浣?
銆銆綆¢亾杈撳嚭 鈥?搴忓垪鍖栧櫒(濡俋ML,HTML,SVG,PDF搴忓垪鍖栧櫒 )
銆銆鏉′歡鐨勫鐞?鈥?鍖歸厤鍣ㄥ拰閫夋嫨鍣?
銆銆Cocoon 綆¢亾閫氬父鑷沖皯鐢辯敓鎴愬櫒鍜屽簭鍒楀寲鍣ㄧ粍鎴愶紝浣嗗彲鑳藉惈鏈変換鎰忔暟閲忕殑澶勭悊姝ラ銆傚皢鏁版嵁浣滀負(fù) SAX 浜嬩歡閫氳繃 Cocoon 綆¢亾浼犻掋?
銆銆瀵規(guī)帴鏀惰姹傚拰涓哄搷搴旀彁渚涙湇鍔$殑閫昏緫鍛ㄦ湡濡備笅錛?BR>銆銆1銆佷粠鐢ㄦ埛鎺ュ彈璇鋒眰銆?
銆銆2銆佺‘瀹氱敤鏉ヨВ閲婅璇鋒眰騫剁敓鎴愬搷搴旂殑閫傚綋綆¢亾錛堜嬌鐢ㄥ尮閰嶅櫒錛夈?
銆銆3銆佷粠鍙敤鐨勯閰嶇疆鐨勭粍浠舵瀯閫犵閬撱?
銆銆4銆佹寚紺虹閬撲負(fù)璇鋒眰鏈嶅姟銆?
銆銆5銆佸皢鐢辯閬撶敓鎴愮殑鍝嶅簲榪斿洖鐢ㄦ埛錛屽彲鑳藉緇撴灉榪涜楂橀熺紦瀛樹互渚夸互鍚庝嬌鐢ㄣ?
銆銆緗戠珯鍦板浘錛坰itemap錛変袱涓姛鑳斤細(xì)
銆銆1銆佸0鏄庣粍浠訛紱
銆銆2銆佸畾涔夌閬撱?
銆銆XML Server Pages錛圶SP錛夌紪璇戣繃紼嬪涓嬪浘錛?BR>銆銆
銆銆XSP璇硶錛?BR>銆銆1銆亁sp:page 鍏冪礌鏄瘡涓?XSP 鏂囨。鐨勬牴鍏冪礌銆傚畠蹇呴』鏈変竴涓爣璇嗚欏甸潰鍖呭惈鐨勭紪紼嬭璦 鈥?鍏蜂綋璇村氨鏄渏ava鈥濃?鐨勮璦灞炴с?BR>銆銆璇ラ〉闈㈠厓绱犲彲鑳藉寘鍚細(xì)
銆銆銆浠繪剰鏁扮洰鐨?xsp:structure 鍏冪礌
銆銆銆浠繪剰鏁扮洰鐨?xsp:logic 鍏冪礌
銆銆銆鍗曚釜鐢ㄦ埛鍏冪礌
銆銆榪欐渶鍚庝竴涓檺鍒墮潪甯擱噸瑕併傗滅敤鎴峰厓绱犫濊〃紺轟笉鍦?XSP 鍚嶇О絀洪棿涓殑浠諱綍鍏冪礌錛屽寘鎷棤鍚嶇О絀洪棿鐨勫厓绱犮備箣鎵浠ユ湁榪欎釜闄愬埗鏄洜涓虹敤鎴峰厓绱犳垚涓虹敱 XSP 欏甸潰鍒涘緩鐨?XML 鏂囨。鐨勬牴鍏冪礌錛岃?XML 鏂囨。鍙兘鏈夊崟涓牴鍏冪礌銆?/P>
銆銆2銆亁sp:structure 鍜?xsp:include 鍏冪礌鐢ㄤ簬鍚戜唬鐮佺敓鎴愯繃紼嬫彁渚涜繖浜涢檮鍔犳彁紺恒傝繖涓や釜鍏冪礌鏄竴鍓嶄竴鍚庝嬌鐢ㄧ殑錛寈sp:structure 鍏冪礌灝嗚澶?xsp:include 鍏冪礌緇勫悎鍦ㄤ竴璧楓傛瘡涓?xsp:include 瀹氫箟涓涓瀵煎叆鐨勯檮鍔?Java 鍖呮垨綾匯?/P>
銆銆3銆亁sp:logic 鍏冪礌鐢ㄤ簬灝?Java 浠g爜鍧楁坊鍔犲埌 XSP銆?BR>銆銆鍦ㄨ繖浜涘厓绱犱綔涓?xsp:page 鍏冪礌鐨勭洿鎺ュ瓙鍏冪礌鍑虹幇鐨勪換浣曞湴鏂癸紙涔熷氨鏄紝鍗曚釜鐢ㄦ埛鍏冪礌浠ュ錛夛紝榪欎釜浠g爜鍧楅兘搴斿寘鍚柟娉曞畾涔夊拰錛忔垨鎴愬憳鍙橀噺銆備箣鎵浠ュ瓨鍦ㄨ繖涓鐐規(guī)槸鍥犱負(fù)鍑虹幇鍦ㄧ敤鎴峰厓绱犱互澶栫殑浠g爜涓嶅寘鍚湪鐢熸垚鍣ㄧ殑 generate() 鏂規(guī)硶鍐呫傚父瑙勭殑 Java 璇硶瑙勫垯鎰忓懗鐫榪欎釜浠g爜蹇呴』鏄垚鍛樻垨綾伙紙涔熷氨鏄紝闈欐侊級鍙橀噺鎴栨柟娉曘?BR>銆銆xsp:logic 鍏冪礌涔熷彲浠ヤ嬌鐢ㄥ湪 XSP 欏甸潰鐨勫叾瀹冨湴鏂廣傚湪榪欑鎯呭喌涓嬶紝瀹冧滑搴旇鍖呭惈灝嗚娣誨姞鍒板凡緙栬瘧鐨勭敓鎴愬櫒涓殑 generate() 鏂規(guī)硶鐨?Java 璇彞銆傝繖浣?xsp:logic 鍏冪礌綾諱技浜?JSP 欏甸潰涓嬌鐢ㄧ殑 <% ... %>scriptlet 璇硶銆?/P>
銆銆4銆丆DATA 鑺傦紝瀹冨悜 XML 瑙f瀽鍣ㄥ彂鍑轟俊鍙蜂互瀵逛簬閭h妭鍐呭涓嶉噰鐢ㄨ壇濂芥牸寮忚鍒?BR>銆銆<![CDATA[...]]>
銆銆5銆亁sp:expr 鍏冪礌鐢ㄤ簬灝佽涓涓〃杈懼紡錛岃琛ㄨ揪寮忕殑鍊煎皢鐩存帴娣誨姞鍒拌緭鍑烘枃妗c備笌姝ょ浉鍙嶏紝xsp:logic 鍏冪礌鍖呭惈鐢熸垚鍣ㄧ殑浠g爜銆傚洜姝わ紝xsp:expr 鍏冪礌絳変環(huán)浜庡湪 JSP 涓疄鐜扮被浼艱鑹茬殑 <%= ... %> 琛ㄨ揪寮忚娉曘備緥濡傦細(xì)
<elements>
<xsp:logic>
for (int i=1; i<11; i++)
{
<element><xsp:expr>i</xsp:expr></element>
}
</xsp:logic>
</elements>
銆銆6銆侀氳繃浣跨敤 xsp:element 鐢熸垚鍔ㄦ佸厓绱犮傚錛?BR><xsp:element prefix="my" uri="http://www.examples.org">
<xsp:param name="name"><xsp:expr>"myElementName"</xsp:expr></xsp:param>
Element content
</xsp:element>
榪欎釜紺轟緥鐢熸垚浜嗕互涓?nbsp;XML 杈撳嚭錛?BR><my:myElementName xmlns:my="http://www.examples.org">Element content</my:myElementName>
銆銆7銆侀氳繃浣跨敤 xsp:attribute 鐢熸垚鍔ㄦ佸睘鎬?BR><xsp:element>
<xsp:param name="name"><xsp:expr>"myElementName"</xsp:expr></xsp:param>
<xsp:attribute name="myAttribute">myAttributeValue</xsp:attribute>
Element content
</xsp:element>
鍜岋紙涓や釜渚嬬▼娌″叧緋伙級
<image>
<xsp:attribute name="href"><xsp:expr>calculateImageURL()</xsp:expr></xsp:attribute>
</image>
銆銆8銆亁sp:comment 鍜?xsp:pi 鍏冪礌鐢ㄤ簬鍒涘緩娉ㄩ噴鍜屽鐞嗘寚浠ゃ?BR><xsp:comment>This is a comment</xsp:comment>
鐒跺悗榪欎釜娉ㄩ噴鍙樻垚錛?BR><!-- This is a comment -->
璇鋒敞鎰忥細(xì)灝界浠諱綍鏂囨湰灝嗚娣誨姞鍒版敞閲婏紝浣嗕換浣曞祵濂楁爣璁伴兘琚拷鐣ヤ簡銆?/P>
鍒涘緩澶勭悊鎸囦護(hù)綾諱技浜庡垱寤哄姩鎬佸厓绱犳垨灞炴с倄sp:pi 鍏冪礌搴旇鏈変竴涓爣璇嗗鐞嗘寚浠ょ洰鏍囩殑宓屽鍙傛暟銆傜収渚嬪 xsp:pi 鍏冪礌鐨勫墿浣欏唴瀹規(guī)眰鍊箋傝繖閲屾槸涓涓畝鍗曠ず渚嬶細(xì)
<xsp:pi target="myApplication">
<xsp:expr>"param1=value, param2=value, generatorTimestamp=" +
System.currentTimeMillis()</xsp:expr>
</xsp:pi>
杈撳嚭濡備笅錛?BR><?myApplication param1=value, param2=value, generatorTimestamp=1017407796870?>
銆銆閫昏緫鍗曟槸鍙互琚坊鍔犲埌 XSP 欏甸潰鐨勫畾鍒跺厓绱犲簱錛屾槸閫氳繃浣跨敤 XSLT 杞崲瀹炵幇鐨勩傝繖浜涜漿鎹㈠皢闄勫姞鐨勪唬鐮佸潡鍜岋紡鎴?XSP 鏍囪寮曞叆鍒?XSP 鏂囨。錛岃繖鏍鋒墿灞曚簡浜х敓 Generator 綾葷殑鑳藉姏銆?BR>銆銆姣忎釜閫昏緫鍗曢兘涓庝竴涓壒孌婄殑鍚嶇О絀洪棿鍏寵仈銆備嬌鐢ㄩ昏緫鍗曚粎浠呮秹鍙?qiáng)鍦?XSP 鏂囨。涓0鏄庣浉搴旂殑鍚嶇О絀洪棿錛岀劧鍚庡湪闇瑕佺殑鏃跺欐坊鍔犳潵鑷偅涓悕縐扮┖闂寸殑鍏冪礌銆傚
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0">
<clock>
<day><util:time format="EE"/></day>
<month><util:time format="MMMM"/></month>
<year><util:time format="yyyy"/></year>
<time><util:time format="HH:mm:ss 'on' dd/MM/yyyy"/></time>
</clock>
</xsp:page>
璇鋒敞鎰忚欏甸潰澹版槑浜嗗疄鐢ㄧ▼搴忕殑鍚嶇О絀洪棿 http://apache.org/xsp/util/2.0錛屽茍浣跨敤涓涓檮鍔犵殑鍏冪礌錛岃屾病鏈夋彃鍏ヤ換浣曢檮鍔?nbsp;Java 浠g爜銆傚綋瀵瑰畠姹傚兼椂錛岃繖涓〉闈駭鐢燂細(xì)
<clock>
<day>Fri</day>
<month>March</month>
<year>2002</year>
<time>15:14:27 on 29/03/2002</time>
</clock>
銆銆Cocoon 2 鎻愪緵浜嗚澶氶鍏堝畾涔夌殑閫昏緫鍗曪紝瀹冧滑鎻愪緵澶ч噺鏈夌敤鍔熻兘錛岃屼笉蹇呯紪鍐?Java 浠g爜銆傛牴鎹繖浜涢鍏堝畾涔夌殑鐨勯昏緫鍗曟彁渚涚殑鍔熻兘綾誨瀷錛屽彲浠ュ瀹冧滑榪涜鏉炬暎鍒嗙被錛?BR>銆銆1銆佺幆澧冿紙Environmental錛夐昏緫鍗?鈥?鎻愪緵浜嗗 Cocoon 澶勭悊鐜鐨勮闂紙渚嬪錛岃姹傚拰鍝嶅簲錛?,鏈変互涓嬪洓涓細(xì)
銆銆1錛夎姹傦紙request錛夐昏緫鍗曟彁渚涗簡瀵硅姹傚睘鎬х殑璁塊棶錛屽寘鎷璇鋒眰鍙傛暟銆佽姹傛柟娉曪紙渚嬪錛孏ET銆丳OST 絳夌瓑錛変互鍙?qiáng)璇锋眰鏍囬鐨勮畨K棶銆傚綋璇鋒眰鍙傛暟鐨勬煇浜涙柟闈㈢敤浜庢敼鍙樿緭鍑烘枃妗g殑鐢熸垚鏃訛紝榪欎釜閫昏緫鍗曞氨鏍煎鏈夌敤銆?BR>銆銆2錛夊搷搴旓紙response錛夐昏緫鍗曟彁渚涘涓庡綋鍓嶈姹傚叧鑱旂殑 HTTP 鍝嶅簲鐨勯檺鍒惰闂紱瀹冨彧鎻愪緵瀵硅姹傛爣棰樼殑璁塊棶銆俋SP 鏂囨。涓嶈兘鐢ㄤ笌 Java Servlet 鎴?JSP 欏甸潰鐩稿悓鐨勬柟娉曟墽琛屽寘鍚垨杞彂錛屽洜涓哄垎紱婚棶棰樻槸 Cocoon 2 浣撶郴緇撴瀯鐨勬牳蹇冮儴鍒嗐傝繖涓姛鑳芥弿榪板湪緗戠珯鍦板浘涓紱XSP 欏甸潰鐢熸垚 XML 鍐呭鑰屼笉鎸囧澶勭悊銆?BR>銆銆3錛変細(xì)璇濓紙session錛夐昏緫鍗曟彁渚涗簡瀵?HTTP 浼?xì)璇濅俊鎭殑璁块棶锛屽寘鎷垱寰忓拰鍒犻櫎浼?xì)璇濅互鍙?qiáng)娣诲姞鍜岄櫎鍘讳細(xì)璇濆睘鎬х殑鑳藉姏銆傚緢鏄庢樉錛岃繖涓姛鑳藉湪蹇呴』涓轟笂涓嬫枃緇存姢鐢ㄦ埛浼?xì)璇濈?Web 搴旂敤紼嬪簭涓槸鏈鏈夌敤鐨勩侰ocoon 2 涓殑浼?xì)璇澖帯鐞嗘濂浇{変環(huán)浜庡畠鐨?JSP 瀵規(guī)墜銆?BR>銆銆4錛塩ookie 閫昏緫鍗曟彁渚涗簡 cookie 緇存姢鍔熻兘錛岃濡傛坊鍔犲拰闄ゅ幓 cookie銆佸厑璁鎬紭鍏堝瓨鍌ㄥ埌鐢ㄦ埛鐨勬祻瑙堝櫒涓?/P>
銆銆2銆佸疄鐢ㄧ▼搴忛昏緫鍗?鈥?澶氱敤閫斿疄鐢ㄧ▼搴忎唬鐮侊紙渚嬪錛屾枃浠跺寘鍚佹棩蹇楄褰曘佸彂閫侀偖浠剁瓑絳夛級
銆銆鏈変笁涓昏緫鍗曪紝姣忎釜閫昏緫鍗曢兘鎻愪緵浜嗕竴浜涚畝鍗曠殑瀹炵敤紼嬪簭鍔熻兘銆?BR>銆銆1錛夋棩鏈熷拰鏃墮棿
銆銆2錛夋棩蹇楋紙log錛夐昏緫鍗曞鐞嗙敤鎴瘋姹傛椂錛屽畠鍏佽浠?nbsp;XSP 鐢熸垚鍣ㄤ笂鍐欏叆鏃ュ織娑堟伅銆傚錛?BR><log:debug>This is a debug message from an XSP generator</log:debug>
榪樻湁闄勫姞鐨?nbsp;info銆亀arn銆乪rror 鍜?nbsp;fatal-error 鍏冪礌鐢ㄤ簬鍐欏叾瀹冨悇縐嶆棩蹇楄鍙ャ?/P>
銆銆3錛夊彂閫侀偖浠訛紙sendmail錛?nbsp;閫昏緫鍗曞寘鍚簡涓涓彁渚涗粠 XSP 欏甸潰瀵?nbsp;JavaMail API 璁塊棶鐨勬湁鐢ㄥ厓绱?濡傦細(xì)
<sendmail:send-mail from="myemail@email.com" to="user@user.com" smtphost="smtphost@email.com">
<xsp:param name="subject"><xsp:expr>"The subject of this email..."</xsp:expr></xsp:param>
<xsp:param name="body"><xsp:expr>"The body of this email..."</xsp:expr></xsp:param>
</sendmail:send-mail>
銆銆3銆佹暟鎹搷浣?鈥?鎻愪緵浜嗗鏁版嵁楠岃瘉鍜屼笌鏁版嵁搴撳叧鑱旂殑鍔熻兘鐨勮闂?
鏈変袱涓昏緫鍗曞睘浜庤綾誨埆錛屽叾涓殑涓涓彁渚涗簡姣斿彟涓涓槑鏄炬洿澶氱殑鍔熻兘銆?/P>
銆銆琛ㄥ崟楠岃瘉鍣紙form validator錛夐昏緫鍗曚粠鏈湡姝e崟鐙嬌鐢ㄣ傚畠鍚?Cocoon 琛ㄥ崟楠岃瘉鍣ㄨ涓猴紙Cocoon Form Validator Action錛夋彁渚涗竴涓暣榻愮殑鐣岄潰銆傝繖涓涓鴻兘澶熷浠?HTML 琛ㄥ崟鍙戦佸埌 Cocoon 搴旂敤紼嬪簭鐨勬暟鎹墽琛屽熀鏈獙璇佹搷浣滐紝鍖呮嫭媯鏌ユ暣鏁扮殑鏈灝忓拰鏈澶у箋佹鏌ュ瓧絎︿覆鐨勫ぇ灝忎互鍙?qiáng)妫鏌ユ彁渚涚殑鏌愪簺鍙傛暟銆備竴涓憲鍚嶅姛鑳芥槸鑳藉嫻嬭瘯浼犻掔殑鍙橀噺鏄惁鍖歸厤緇欏畾鐨勬鍒欒〃杈懼紡銆?/P>
銆銆楠岃瘉鐨勭粨鏋滃瓨鍌ㄥ湪璇鋒眰鍙傛暟涓傞獙璇佸櫒錛坴alidator錛夐昏緫鍗曟彁渚涗簡瑙i噴鏉ヨ嚜 XSP 欏甸潰鍐呯殑榪欎簺緇撴灉鐨勬柟娉曘傝繖鏍峰厑璁鎬負(fù)鐢ㄦ埛鍔ㄦ佺敓鎴愰敊璇秷鎭?/P>
銆銆鍦ㄦ暟鎹紜涓烘湁鏁堜箣鍚庯紝涓嬩竴姝ユ槸灝嗛偅涓暟鎹瓨鍌ㄥ埌鏁版嵁搴撲腑銆俥sql 閫昏緫鍗曟彁渚涗簡鎵ц榪欎竴姝ョ殑鏂規(guī)硶錛屽茍鎻愪緵浜嗘洿澶氱殑鍔熻兘錛屽寘鎷夋嫨銆佸垹闄ゅ拰鏇存柊鏁版嵁搴撱傛湰璐ㄤ笂錛宔sql 閫昏緫鍗曟彁渚涗簡灝?SQL 璇彞鐩存帴宓屽叆鍒?XSP 鏂囨。鐨勬柟娉曘傜劧鍚庤繖涓昏緫鍗曠敓鎴愮浉搴旂殑 JDBC 浠g爜鏉ュ疄鐜?SQL 鎿嶄綔錛岃繖鏍烽氳繃浣跨敤 Cocoon 2 綆鍖栦簡瀵規(guī)暟鎹簱鏁版嵁鐨勬搷浣滃拰媯绱€?BR>
http://hedong.3322.org/1stblog/archives.html