`
文章列表

i18n

to appoint resource base name directly <s:i18n name="baseName">   <s:text name="welcome">      <s:param>huayu00</s:param>   </s:text> </s:i18n>
Validate by Manual Programming 1: validate every action method    (1):extend ActionSupport and rewrite the validate method    (2):<result name="input"/>    (3):<s:filederror /> 2: validate specific action method    (1):add validateXxx method to validate Xxx method    (2):<res ...

File upload

Single file upload: 1: reference    commmons-fileupload-1.2.1.jar 2: <form enctype="multipart/form-data">       <input type="file" name="uploadFile"/>    </form> 3: create action    This action should contain three properties corresponding to the " ...
mode 1 : ActionContext context = ActionContext.getContex(); context.getApplication(); context.getSession(); context.get("request"); mode 2 : ServletActionContext.getRequest(); ServletActionContext.getRequest().getSession(); ServletActionContext.getServletContext(); mode 3 : ServletRequestA ...

Type convertor

actionName.conversion.properties     propertyName = Custom convertor xwork.conversion.properties     type = Custom convertor
struts.i18n.encoding : UTF-8 struts.action.extension : action,do struts.serve.static.browserCache : true -- cache the static content struts.configuration.xml.reload : false struts.devMode : false -- print detailed error message on development mode struts.ui.theme : simple -- set the style of the stru ...
Configuration:       <constant name="struts.action.extension" value="action,do"/> The order that struts load constant:       struts-default.xml       struts-plugin.xml       struts.xml       struts.properties       web.xml the latter will cover the former if the same constan ...
Progressively decreasing according to the namespace of the action given by url.
use commonly: 1: dispatcher 2: redirect 3: chain 4: redirectAction     param 1: actionName     param 2: namespace 5: plainText     param 1: location     param 2: charset
Global site tag (gtag.js) - Google Analytics