# $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
### START SNIPPET: complete_file
### Struts default properties
###(can be overridden by a struts.properties file in the root of the classpath)
### Struts的默認屬性
###(可以通過在classpath根目錄下新建一個struts.properties文件來重載此文件中的屬性)
###
### Specifies the Configuration used to configure Struts
### one could extend org.apache.struts2.config.Configuration
### to build one's customize way of getting the configurations parameters into Struts
### 指定用于struts的配置類
### 一個繼承于 org.apache.struts2.config.Configuration 的類
### 建立一個自定義的方式獲得Struts的配置參數
# struts.configuration=org.apache.struts2.config.DefaultConfiguration
### This can be used to set your default locale and encoding scheme
### 這可以用來設置您的默認區域設置和編碼方案
# struts.locale=en_US
struts.i18n.encoding=UTF-8
### if specified, the default object factory can be overridden here
### Note: short-hand notation is supported in some cases, such as "spring"
### Alternatively, you can provide a com.opensymphony.xwork2.ObjectFactory subclass name here
### 如果指定的話,在這里默認對象的工廠類可以被重載
### Note: 在某些情況下可以支持縮寫, 例如 "spring"
### 另外,您也可以在這里提供一個com.opensymphony.xwork2.objectfactory的子類名
# struts.objectFactory = spring
### specifies the autoWiring logic when using the SpringObjectFactory.
### valid values are: name, type, auto, and constructor (name is the default)
### 指定自動裝配的方式,當使用springobjectfactory 。
### 有效值有: name, type, auto, and constructor (name 是默認值)
struts.objectFactory.spring.autoWire = name
### indicates to the struts-spring integration if Class instances should be cached
### this should, until a future Spring release makes it possible, be left as true
### unless you know exactly what you are doing!
### valid values are: true, false (true is the default)
### spring是否使用自身的cache
struts.objectFactory.spring.useClassCache = true
### if specified, the default object type determiner can be overridden here
### Note: short-hand notation is supported in some cases, such as "tiger" or "notiger"
### Alternatively, you can provide a com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation name here
### Note: By default, com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer is used which handles type detection
### using generics. com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer was deprecated since XWork 2, it's
### functions are integrated in DefaultObjectTypeDeterminer now.
### To disable tiger support use the "notiger" property value here.
#struts.objectTypeDeterminer = tiger
#struts.objectTypeDeterminer = notiger
### Parser to handle HTTP POST requests, encoded using the MIME-type multipart/form-data
# 專為multipart請求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上傳用)
# struts.multipart.parser=cos
# struts.multipart.parser=pell
struts.multipart.parser=jakarta
# uses javax.servlet.context.tempdir by default
#設置存儲上傳文件的目錄夾
struts.multipart.saveDir=
#multipart請求信息的最大尺寸(文件上傳用)
struts.multipart.maxSize=2097152
### Load custom property files (does not override struts.properties!)
### 加載附加的配置文件的位置(不重載struts.properties文件中的屬性)
# struts.custom.properties=application,org/apache/struts2/extension/custom
### How request URLs are mapped to and from actions
### 如何將請求的URL映射到action類和從action類映射到URL
#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
### Used by the DefaultActionMapper
### You may provide a comma separated list, e.g. struts.action.extension=action,jnlp,do
### 用URL擴展名來確定是否這個請求是被用作Struts action,其實也就是設置 action的后綴如login.do的'do'
### 你可以提供一個逗號分隔的列表,例如:struts.action.extension=action,jnlp,do
struts.action.extension=action
### Used by FilterDispatcher
### If true then Struts serves static content from inside its jar.
### If false then the static content must be available at <context_path>/struts
struts.serve.static=true
### Used by FilterDispatcher
### This is good for development where one wants changes to the static content be
### fetch on each request.
### NOTE: This will only have effect if struts.serve.static=true
### If true -> Struts will write out header for static contents such that they will
### be cached by web browsers (using Date, Cache-Content, Pragma, Expires)
### headers).
### If false -> Struts will write out header for static contents such that they are
### NOT to be cached by web browser (using Cache-Content, Pragma, Expires
### headers)
struts.serve.static.browserCache=true
### Set this to false if you wish to disable implicit dynamic method invocation
### via the URL request. This includes URLs like foo!bar.action, as well as params
### like method:bar (but not action:foo).
### An alternative to implicit dynamic method invocation is to use wildcard
### mappings, such as <action name="*/*" method="{2}" class="actions.{1}">
### 是否允許動態方法調用
struts.enable.DynamicMethodInvocation = true
### Set this to true if you wish to allow slashes in your action names. If false,
### Actions names cannot have slashes, and will be accessible via any directory
### prefix. This is the traditional behavior expected of WebWork applications.
### Setting to true is useful when you want to use wildcards and store values
### in the URL, to be extracted by wildcard patterns, such as
### <action name="*/*" method="{2}" class="actions.{1}"> to match "/foo/edit" or
### "/foo/save".
### 這個屬性設為true以后,action的名字中就可以使用斜杠了。
### Struts2的默認設置是不允許action的名字中出現斜杠的,需要用package來分割命名空間。
struts.enable.SlashesInActionNames = false
### use alternative syntax that requires %{} in most places
### to evaluate expressions for String attributes for tags
### 是否可以用替代的語法替代tags
struts.tag.altSyntax=true
### when set to true, Struts will act much more friendly for developers. This
### includes:
### - struts.i18n.reload = true
### - struts.configuration.xml.reload = true
### - raising various debug or ignorable problems to errors
### For example: normally a request to foo.action?someUnknownField=true should
### be ignored (given that any value can come from the web and it
### should not be trusted). However, during development, it may be
### useful to know when these errors are happening and be told of
### them right away.
### 是否為struts開發模式
struts.devMode = false
### when set to true, resource bundles will be reloaded on _every_ request.
### this is good during development, but should never be used in production
### 是否自動加載國際化信息
struts.i18n.reload=false
### Standard UI theme
### Change this to reflect which path should be used for JSP control tag templates by default
# 默認的UI template主題
struts.ui.theme=xhtml
# UI templates的目錄夾
struts.ui.templateDir=template
#sets the default template type. Either ftl, vm, or jsp
#設置默認模板類型. ftl, vm, jsp三個中的一個
struts.ui.templateSuffix=ftl
### Configuration reloading
### This will cause the configuration to reload struts.xml when it is changed
### 是否自動加載xml配置
### 這將導致配置重新載入struts.xml當它被改變
struts.configuration.xml.reload=false
### Location of velocity.properties file. defaults to velocity.properties
struts.velocity.configfile = velocity.properties
### Comma separated list of VelocityContext classnames to chain to the StrutsVelocityContext
struts.velocity.contexts =
### Location of the velocity toolbox
struts.velocity.toolboxlocation=
### used to build URLs, such as the UrlTag
struts.url.http.port = 80
struts.url.https.port = 443
### possible values are: none, get or all
struts.url.includeParams = get
### Load custom default resource bundles
### 加載附加的國際化屬性文件(不包含.properties后綴)
# struts.custom.i18n.resources=testmessages,testmessages2
### workaround for some app servers that don't handle HttpServletRequest.getParameterMap()
### often used for WebLogic, Orion, and OC4J
struts.dispatcher.parametersWorkaround = false
### configure the Freemarker Manager class to be used
### Allows user to plug-in customised Freemarker Manager if necessary
### MUST extends off org.apache.struts2.views.freemarker.FreemarkerManager
#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager
### Enables caching of FreeMarker templates
### Has the same effect as copying the templates under WEB_APP/templates
### 是否緩存freemarker模版
struts.freemarker.templatesCache=false
### See the StrutsBeanWrapper javadocs for more information
struts.freemarker.wrapper.altMap=true
### configure the XSLTResult class to use stylesheet caching.
### Set to true for developers and false for production.
### 是否緩存XSLT模版
struts.xslt.nocache=false
### A list of configuration files automatically loaded by Struts
### struts自動加載的配置文件列表
struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml
### Whether to always select the namespace to be everything before the last slash or not
###
struts.mapper.alwaysSelectFullNamespace=false
### END SNIPPET: complete_file
根據以下線索,確定“誰養貓?”
1,紅房子在藍房子的右邊、白房子的左邊(不一定緊鄰)。
2,黃房子的主人來自香港,而且他的房子不在最左邊。
3,愛吃比薩餅的人住在愛喝礦泉水的人的隔壁。
4,來自北京的人愛喝茅臺,住在來自上海的人的隔壁。
5,吸希爾頓香煙的人住在養馬的人的右邊隔壁。
6,愛喝啤酒的人也愛吃雞。
7,綠房子的人養狗。
8,愛吃面條的人住在養蛇的人的隔壁。
9,來自天津的人的鄰居(緊鄰)一個愛吃牛肉,另一個來自成都。
10,養魚的人住在最右邊的房子里。
11,吸萬寶路香煙的人住在吸希爾頓香煙的人和吸“555”香煙的人的中間(緊鄰)。
12,紅房子的人愛喝茶。
13,愛喝葡萄酒的人住在愛吃豆腐的人的右邊隔壁。
14,吸紅塔山香煙的人既不住在吸健牌香煙的人的隔壁,也不與來自上海的人相鄰。
15,來自上海的人住在左數第二間房子里。
16,愛喝礦泉水的人住在最中間的房子里。
17,愛吃面條的人也愛喝葡萄酒。
18,吸“555”香煙的人比吸希爾頓香煙的人住得靠右。
01 02 03 04 05
------------------------------------------------------------------------
北京人 上海人 香港人 天津人 成都人
③(4)(16) ①(15) [⑩+1] ⑨ ⑩
------------------------------------------------------------------------
吸健牌香煙 吸希爾頓香煙 吸萬寶路香煙 吸“555”香煙 吸紅塔山香煙
② ② ② ② ②
------------------------------------------------------------------------
喝茅臺 葡萄酒 喝礦泉水 茶 啤酒
③(4)(16) [⑦+1] ①(16) [⑧+2] [⑧+1]
------------------------------------------------------------------------
養馬 狗 蛇 貓 養魚
③(②)(5) [⑧+6] [⑦+1] (*) ①(10)
------------------------------------------------------------------------
藍房子 綠房子 黃房子 紅房子 白房子
④ [⑧+5] [⑩+2] [⑧+3] [⑧+4]
------------------------------------------------------------------------
豆腐 面條 牛肉 比薩 雞
⑦ ⑦ ⑥ ⑦ ⑧
------------------------------------------------------------------------
①
②(11)(18)+(14)(15)
③(4)(16)
③(5)(②)
④(1紅白不在最左)(2黃不在最左)(③+7綠不在最左)
⑤(6吃雞不在中間)(3+16比薩不在中間)(16+17面條不在中間)-->只有豆腐牛肉可能在中間
[_?⑥_]假設豆腐在中間-->[_?⑦_](16+17面條在04位)
-->[_?⑧_]([_?⑦+3比薩在02位)
-->[_?⑨_](③+6雞不在01位)
-->[_?⑩_]([_?⑥_]+[_?⑦_]+[_?⑧_]+[_?⑨_]牛肉在01位)
-->
-->([_?⑩_]+9+15矛盾了)
⑥(⑤+[_?⑥_])
⑦(③+6雞不在01位)(16+17豆腐面條相連)(3)
⑧(⑥+⑦)
⑨(⑥+9+15)
⑩(⑨+15)
國外開發者博客中有一篇有趣的文章,將程序員按水平像軟件版本號那樣劃分為不同的版本。相對于在招聘時分為初級,中級,高級程序員,直接表明需要某種語言N版本的程序員或許更方便直接。根據作者的觀點,可將WEB開發者大致分為以下幾個版本:
Alpha:閱讀過一些專業書籍,大多數能用Dreamweaver或者FrontPage幫朋友制作一些Web頁面。但在他們熟練掌握HTML代碼以前,你大概不會雇傭他們成為職業的WEB制作人員。
Beta:已經比較擅長整合站點頁面了,在HTML技巧方面也有一定造詣,但還是用Tables來制作頁面,不了解CSS,在面對動態頁面或數據庫連接時還是底氣不足。
Pre Version 1 (0.1):比Beta版的開發者水平要高。熟悉HTML,開始了解CSS是如何運作的,懂一點JavaScript,但還是基于業余水準,逐步開始關心動態站點搭建和數據庫連接的知識。這個版本的WEB開發人員還遠不能成為雇主眼中的香餑餑。
1.0: 能夠基本把控整個站點開發,針對每個問題盡可能的找到最直接的解決辦法。但對可測性,可擴展性以及在不同(層)框架下如何選擇最合適的WEB設計工具尚無概念。這個版本的WEB開發者有良好的技術基礎,需要有進一步的幫助和指導。
2.0:懂面向對象的編程語言,理解分層開發的必要性,關注代碼分離,對問題尋找更完美的解決方法,偶然也會考慮設計模式的問題,但對此仍然概念不清。屬于優秀的初級開發者,能完成較松散的代碼開發(相對大型嚴謹的站點開發而言),在面對較復雜問題尋找解決辦法時需要周邊人的幫助。
3.0:開始較為深入的理解面向對象編程和設計模式,了解他們的用途,當看到好的設計模式時能看透其本質,逐步關注分層的架構解決辦法和可測試性。理解不同的開發語言并能說出他們的異同(例如各自的優勢)。屬于優秀的中級別開發者,雇主也確信他們最終能找到問題的解決辦法,這個版本的人可以給1.0和2.0的開發者以指導。但他們對架構的理解仍然不夠清晰,值得一提的是,只要給予一些指導,他們能很快理解并熟記做出的決定,以及選定方案的優勢所在。
4.0:理解模式,重視用戶的反饋。著手研究方法論,架構設計和軟件開發的最佳入口。頭腦中已經形成了超越開發語言,技術架構的整體方案,可根據需求解構程序。能從理論的角度,不同模式如何融合成最佳形態,將多種X-驅動的模式應用到不同的方案中。是精通多語言的高手,理解不同系統和方法論的細微差別,屬于高級程序員。這個級別的人能夠輕易的輔導2.0和3.0的程序員,將他們推向更高的級別。
5.0:從系統的角度考慮問題。對各種系統結構有深入研究,能對整個代碼架構中的問題進行改進。在團隊粘合性以及代碼安全性方面有杰出貢獻。對1.0到4.0版本的開發人員出現的問題能及時察覺,讓整個團隊保持積極性且保持興奮的狀態創建軟件解決辦法。舉例來說,他們總是對新的技術和信息保持饑渴狀態,試圖用最簡便的方案解決開發任務。在整個IT團隊中獲得信任,屬于高級程序員和架構師。
那么,您屬于哪個版本的程序員呢?