科帮网

登录/注册
您现在的位置:论坛 盖世程序员(我猜到了开头 却没有猜到结局) 盖世程序员 > Struts2详细配置文件说明
总共48087条微博

动态微博

查看: 1874|回复: 0

Struts2详细配置文件说明

[复制链接]

114

主题

29

听众

429

金钱

传功长老

该用户从未签到

跳转到指定楼层
楼主
发表于 2014-08-05 21:58:38 |只看该作者 |正序浏览

一:struts2的配置文件有哪些,相对应的作用是什么?

Web.xml:包含所有必须的框架组件的web部署描述符.Struts2主要加载前端控制器及初始化参数.

( Z: \5 y, E* N

Struts.xml:定义应用自身使用的action映射,拦截器及常量,result/view定义.


( N3 J7 N8 b% |8 y

Struts-default.xml:定义框架自身用的action映射及result


8 |/ i( N& [9 R7 ?$ Y0 L- ~

Struts-plugin.xml:struts插件使用的配置文件


  M  S7 _. r- E& G% h; d

Struts.properties:定义框架自身的全局变量及框架属性.


0 u+ f* t5 q% z3 f, z
8 R! t5 C; q3 [! m! U+ E

二:配置文件的加载顺序

' C0 R2 K9 ~; I2 N, U( |% z

Struts-default.xml-->struts-plugin.xml-->struts.xml-->struts.properties-->web.xml

9 D7 U) Y9 N3 Y2 R% J# M" q

注:若之前的配置文件设置过某一属性,则以后加载的配置文件对于相同的属性的设置,会覆盖之前的配置

三:Struts2常量的具体用法实例Xml代码

  1. <font color="rgb(0, 0, 0)"><font face="SimSun"><font size="2"><b><?xml version="1.0" encoding="UTF-8" ?>     8 y& R4 M% u" ?0 d$ B; ^+ M
  2. <!DOCTYPE struts PUBLIC      
    0 m$ c" d6 ?9 G
  3.     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"      . H: v3 V4 E  m; Y. U/ x
  4.     "http://struts.apache.org/dtds/struts-2.0.dtd">     / J/ A' k  L( T( h( N9 h
  5.      
    / p" ~) @! H2 o" R: {) x
  6. <struts>     1 T7 {, L6 z1 u; P' k5 z2 X3 l
  7.     <!-- 指定Web应用的默认编码集,相当于调用HttpServletRequest的setCharacterEncoding方法 -->     
    8 A& S6 g& r& v1 d& P  w
  8.     <constant name="struts.i18n.encoding" value="UTF-8" />     + O$ u! e' T8 D/ [% N: |8 }1 H4 M+ F
  9.      
      S3 m9 o" ?* h3 b
  10.     <!--      2 X( k' ]! ^. ?2 W$ V# |
  11.         该属性指定需要Struts 2处理的请求后缀,该属性的默认值是action,即所有匹配*.action的请求都由Struts2处理。      
    8 q: }7 E3 P* ]# q6 l1 E; A3 d
  12.         如果用户需要指定多个请求后缀,则多个后缀之间以英文逗号(,)隔开。      
    - A" |9 J% v- P. _5 j" S$ K; }
  13.     -->     $ ^' J4 t$ g, I2 J$ l
  14.     <constant name="struts.action.extension" value="do" />     - ?9 |8 w3 c& u6 S% O1 Y& |% ]0 ^
  15.      % D4 n9 g! B0 p% Y5 Z' ?
  16.     <!-- 设置浏览器是否缓存静态内容,默认值为true(生产环境下使用),开发阶段最好关闭 -->     ) D$ b! X# g; D6 @& R' X2 G4 X4 {
  17.     <constant name="struts.serve.static.browserCache" value="false" />     8 f* |  c4 [( D
  18.      
    ! @" U: g  n8 T% [& L
  19.     <!-- 当struts的配置文件修改后,系统是否自动重新加载该文件,默认值为false(生产环境下使用),开发阶段最好打开 -->     0 N2 p. t7 d0 w  P5 k$ q
  20.     <constant name="struts.configuration.xml.reload" value="true" />     
    0 y1 ^* D, e* u3 a, n; q) ?
  21.      ( s6 ^% o% `( P+ D
  22.     <!-- 开发模式下使用,这样可以打印出更详细的错误信息 -->     
    3 H& {8 d7 G# u& `" Z
  23.     <constant name="struts.devMode" value="true" />     
    9 _6 Z) Y9 u# M' X
  24.      
    ; F" P6 s# L6 h
  25.     <!-- 默认的视图主题 -->     9 a- R  Z. A9 Y5 R% y( a
  26.     <constant name="struts.ui.theme" value="simple" />     
    + e1 }$ ?: a. R! [/ o5 Y
  27.      2 ]% ^: u' U3 |7 X1 q" s
  28.     <!-- spring 托管 -->     7 F2 r7 R% q: B% h+ l5 F
  29.     <constant name="struts.objectFactory" value="spring" />     
    8 a+ T* |, @* ~2 w7 O* a
  30.      % g* q% |* V1 R! I  D. v# ]
  31.     <!--      ( O( F) A2 N* x
  32.         指定加载struts2配置文件管理器,默认为org.apache.struts2.config.DefaultConfiguration      , T; I' j, t/ M; S* D# M3 K4 Q. x
  33.         开发者可以自定义配置文件管理器,该类要实现Configuration接口,可以自动加载struts2配置文件。      % T6 [' F* i6 j8 F7 h1 K: i+ Q4 K
  34.     -->     
    # a4 X/ {9 w5 |
  35.     <constant name="struts.configuration"     
    3 V0 t- z& N& {" o$ ?
  36.         value="org.apache.struts2.config.DefaultConfiguration" />     
    $ |( H" l6 Z! v( o, J4 l
  37.      - K' Q3 A4 G2 Y) P2 }6 s
  38.     <!-- 设置默认的locale和字符编码 -->     
    2 q3 x' d1 B  C# \; Q- w5 L
  39.     <constant name="struts.locale" value="zh_CN" />     # Z5 M$ Y* h, x. M+ f* X4 O6 b) _
  40.     <constant name="struts.i18n.encoding" value="GBK" />     
    $ M) Y1 X/ i! Z$ W9 N
  41.      - S7 _6 E8 I* t( |  f' w  H
  42.     <!-- 指定Struts的工厂类 -->     
    : L. r, B, `, ^( u* H5 f
  43.     <constant name="struts.objectFactory" value="spring"></constant>     % a7 W1 ~3 f# i; Z: }1 _
  44.      
    ( h1 H5 T) m  X* y. s2 p: a, j
  45.     <!--      
    3 F9 p% _0 V+ U! V2 R
  46.         指定spring框架的装配模式,装配方式有: name, type, auto, and constructor (name      
    $ s8 M- W) I) g, p) H
  47.         是默认装配模式)      
    9 F6 a; ?  \7 H  A3 V
  48.     -->     
    6 U3 v1 m3 q- ?6 }7 k# N3 D
  49.     <constant name="struts.objectFactory.spring.autoWire" value="name" />     + b# H+ N1 {7 P  [
  50.      ) d# c+ j0 F7 x; B  M! G0 p
  51.     <!-- 该属性指定整合spring时,是否对bean进行缓存,值为true or false,默认为true -->     ' W  A! D9 A& s) Q; j& m$ S  Y% Y
  52.     <cosntant name="struts.objectFactory.spring.useClassCache" />     
    ( \% k* M  P( K5 \" b) c
  53.      
    ' a$ j0 o- t5 Z/ x* Q, L' ]
  54.     <!-- 指定类型检查,包含tiger和notiger -->     0 S' W9 `8 B! i! f$ h2 L( r: C. t
  55.     <cosntant name="struts.objectTypeDeterminer" value="tiger" />     
    1 `  C& V0 v: ~9 G" g& o
  56.      6 v; E5 ~; i" X! Q. m
  57.     <!-- 该属性指定处理 MIME-type multipart/form-data,文件上传 -->     ) Z! l# ?( \+ [4 k5 B
  58.     <constant name="struts.multipart.parser" value="cos" />     
    . K; ]/ P) A( H2 e* i
  59.     <constant name="struts.multipart.parser" value="pell" />     
    . ]: l+ C: K, r( \9 h) Y  W" L
  60.     <constant name="struts.multipart.parser" value="jakarta" />     
    8 {! f! N' S2 u) I8 `
  61.      6 ~7 U0 c7 R9 ?
  62.     <!-- 指定上传文件时的临时目录,默认使用 javax.servlet.context.tempdir -->     + J9 i/ G1 L! n  L
  63.     <constant name="struts.multipart.saveDir" value="/tmpuploadfiles" />     8 s3 y, O8 r+ c
  64.      
    0 k* U6 C2 \6 N0 x. [1 E) J
  65.     <!-- 该属性指定Struts 2文件上传中整个请求内容允许的最大字节数 -->     9 p7 h& I' a! K" q
  66.     <constant name="struts.multipart.maxSize" value="2097152" />     0 S3 H  z: p$ r6 r+ m9 Z6 V
  67.      ; S0 M9 ]. n5 r" ?& ?* S
  68.     <!--      
    6 C  [1 [8 B* W7 E: T3 d* x; R9 h
  69.         该属性指定Struts2应用加载用户自定义的属性文件,该自定义属性文件指定的属性不会覆盖      1 _. y: J( [1 \6 ?/ A" a$ D/ f
  70.         struts.properties文件中指定的属性。如果需要加载多个自定义属性文件,多个自定义属性文      
    6 Y" L& R( T8 ?$ a
  71.         件的文件名以英文逗号(,)隔开。(也就是说不要改写struts.properties!)      
    7 T8 M' A- }7 w! E
  72.     -->     & U. p; X5 P4 S. g
  73.     <constant name="struts.custom.properties"     , b5 l" z/ @# }
  74.         value="application,org/apache/struts2/extension/custom" />     9 [: B/ j. T5 ?2 K& i# n- n
  75.               
    2 S: {, L1 X7 _  U2 k
  76.     <!-- 指定请求url与action映射器,默认为org.apache.struts2.dispatcher.mapper.DefaultActionMapper -->     
    * F0 C/ C$ J6 }8 @
  77.     <constant name="struts.mapper.class" value="org.apache.struts2.dispatcher.mapper.DefaultActionMapper" />     * I; Q' b! q( w# P9 n
  78.      
    . R4 l8 ~0 i& [) ^2 ^8 K9 S! R
  79.     <!-- 指定action的后缀,默认为action -->     % p, N$ _1 B  {" j/ w
  80.     <constant name="struts.action.extension" value="do" />     
    % e! K5 ]" y# s2 i: k1 R1 D& ~: d
  81.           . g! E7 t& r% z
  82.     <!-- 被 FilterDispatcher使用指定浏览器是否缓存静态内容,测试阶段设置为false,发布阶段设置为true. -->     9 q! `3 a  Y) a; b: \
  83.     <constant name="struts.serve.static.browserCache" value="true" />     ' ?0 o7 {. c9 Q/ G1 v
  84.      
    * {! Y; s& c( y! p
  85.     <!-- 设置是否支持动态方法调用,true为支持,false不支持. -->     0 D' M9 u* Z; e+ }3 _" H: v
  86.     <constant name="struts.enable.DynamicMethodInvocation" value="true" />     ; [% z0 Q2 V2 @/ _) M4 c9 o
  87.               
    3 e4 j) b3 V6 s  m! S6 [* x# `
  88.     <!-- 设置是否可以在action中使用斜线,默认为false不可以,想使用需设置为true. -->     + k# j* t' p0 k( O
  89.     <constant name="struts.enable.SlashesInActionNames" value="true" />     
    0 Q) @* R, a- ]5 V
  90.           9 \. a4 `5 ^  {4 B
  91.     <!-- 是否允许使用表达式语法,默认为true. -->     9 T; l) C, U' `1 x: Y7 N  |
  92.     <constant name="struts.tag.altSyntax" value="true" />     6 n5 b1 G8 d$ c7 G" i
  93.      
    . d6 R3 R7 o; ]0 G0 o& ^1 Z  I
  94.     <!-- 设置当struts.xml文件改动时,是否重新加载 -->     8 X3 E( L. d6 K/ d
  95.     <cosntant name="struts.configuration.xml.reload" value="true" />     
    $ \. y/ ^& ~% t+ _2 P, O% ?
  96.           # G' s: ]1 @- A9 Y1 x/ [
  97.     <!-- 设置struts是否为开发模式,默认为false,测试阶段一般设为true. -->     5 f# b  K& g& o% Y) B% u7 ~9 `
  98.     <cosntant name="struts.devMode" value="true" />     
    : C! F! `) Y: B- E2 p6 ~( r2 w7 o
  99.      
    9 T2 f. G+ f) o" [
  100.     <!-- 设置是否每次请求,都重新加载资源文件,默认值为false. -->     1 a2 G' _! x5 M$ R% j2 Y$ J
  101.     <cosntant name="struts.i18n.reload" value="false" />     + I0 G, J# Z! X4 V
  102.      
    " b6 O+ H$ K+ y5 Y
  103.     <!-- 标准的UI主题,默认的UI主题为xhtml,可以为simple,xhtml或ajax -->     
    & @  ?$ s/ F# E4 v( x" q9 ?' e
  104.     <cosntant name="struts.ui.theme" value="xhtml" />     
    2 k/ `9 k  _9 N6 m% N6 T# }7 B! a0 @
  105.               
    9 o: ]! e4 R8 [0 I/ `7 O
  106.     <!-- 模板目录 -->     % I7 H4 P4 w$ m- w% [/ [
  107.     <cosntant name="struts.ui.templateDir" value="template" />     + D, m6 H; ?) k
  108.      
    ) d% m4 g) w2 x6 o4 j) j9 x+ [# W( f9 F
  109.     <!-- 设置模板类型. 可以为 ftl, vm, or jsp -->     4 X$ U& N# ~6 Q. n3 u+ y' a$ t
  110.     <cosntant name="struts.ui.templateSuffix" value="ftl" />     
    1 G  ?/ Q/ s; S& v2 `8 Z& b% s
  111.      
    ; q. H" d  k8 |3 }
  112.     <!-- 定位velocity.properties 文件. 默认velocity.properties -->     
    % y8 p& k* h8 c- t/ [
  113.     <cosntant name="struts.velocity.configfile" value="velocity.properties" />     
    # e  D* O/ r4 ^- k  w1 V$ q
  114.           " K5 {, x) b! }3 o1 ?) [
  115.     <!-- 设置velocity的context. -->     ; L3 a5 l) f3 T
  116.     <cosntant name="struts.velocity.contexts" value="...." />     
    5 Q1 T7 y  p& W! u3 S+ Q  ~5 O
  117.          
    + z8 ^9 [4 X" t$ h# j% I
  118.     <!-- 定位toolbox -->     ) s# Z: A0 R) a* g5 R6 H
  119.     <cosntant name="struts.velocity.toolboxlocation" value="...." />     ; i  o+ L% T, P: g. A! z7 v
  120.      
    8 Y4 x7 I' Y: V8 ^2 ]* F8 H
  121.     <!-- 指定web应用的端口 -->     
    8 a4 I8 G; I) E5 p
  122.     <cosntant name="struts.url.http.port" value="80" />     7 M/ M4 @# D( a: U
  123.           $ x" E2 \  k# t" q% P! h
  124.     <!-- 指定加密端口 -->            
    ! I8 F! w6 \$ m5 b! N" A8 d
  125.     <cosntant name="struts.url.https.port" value="443" />     
    / g" q  _2 g; D
  126.      ( a: S% h) n) T2 ~' o, J
  127.     <!-- 设置生成url时,是否包含参数.值可以为: none,get or all -->     
    ) l5 @' q  ?3 \) g- h. E8 {: C  s
  128.     <cosntant name="struts.url.includeParams" value="get" />     
    5 P  L: o  i. K+ ^) h5 N, P, J  f8 [
  129.      
    * g3 \2 ?- e7 {! N2 P& o& f
  130.     <!-- 设置要加载的国际化资源文件,以逗号分隔. -->     
    ; q; d3 E8 A+ J* v" P! F( g9 ~
  131.     <cosntant name="struts.custom.i18n.resources" value="application" />       D# B! S8 c2 n5 x$ |
  132.          
    ; v, ?# c- g5 ^/ P- T
  133.     <!-- 对于一些web应用服务器不能处理HttpServletRequest.getParameterMap(),      
    # }0 W* E7 R5 u$ l$ ~
  134.         像 WebLogic,Orion, and OC4J等,须设置成true,默认为false. -->     8 O2 p! y3 l0 Q4 a. L4 ^, y( ^5 F' G4 e7 d
  135.     <cosntant name="struts.dispatcher.parametersWorkaround" value="false" />        3 X" ?+ T: R4 K. M9 s* Y
  136.      
    # B- q, |5 M9 v- g6 a/ c- u
  137.     <!-- 指定freemarker管理器 -->     7 e3 @& h" p$ Z0 X6 R
  138.     <cosntant name="struts.freemarker.manager.classname" value="org.apache.struts2.views.freemarker.FreemarkerManager" />       0 C5 I; |4 i" F9 I+ ^. Y
  139.      
    8 C) O3 H$ `9 `5 S5 s- r
  140.     <!-- 设置是否对freemarker的模板设置缓存,效果相当于把template拷贝到 WEB_APP/templates. -->     * F3 m7 r+ F8 }) n+ n0 x2 }6 |
  141.     <cosntant name="struts.freemarker.templatesCache" value="false" />         
    ; V: ^3 k1 ^5 I2 A# K/ Q* t  i
  142.      ( q( z  C# [6 t% E; C; O( t
  143.     <!-- 通常不需要修改此属性. -->     ' ?! P$ k2 ?$ G
  144.     <cosntant name="struts.freemarker.wrapper.altMap" value="true" />       0 i! z2 D2 O7 M0 V: g/ s6 ?
  145.          
    # ~3 J6 ~( A$ }# B
  146.     <!-- 指定xslt result是否使用样式表缓存.开发阶段设为true,发布阶段设为false. -->     
    . ^  \7 a# Y9 Z) V# H
  147.     <cosntant name="struts.xslt.nocache" value="false" />      
    2 L+ v# n' n+ A# f- J! S2 x# m
  148.          
    + u" h$ w5 `3 h
  149.     <!-- 设置struts自动加载的文件列表. -->     % R1 w1 K$ I7 N  [/ y
  150.     <cosntant name="struts.configuration.files" value="struts-default.xml,struts-plugin.xml,struts.xml" />     " D& M8 A3 J. P! C* U
  151.               
    9 V- Z5 p' ^6 v- F6 K! ]$ @7 s
  152.     <!-- 设定是否一直在最后一个slash之前的任何位置选定namespace. -->     
    7 }. p- S. n) ^- j& H$ O$ \
  153.     <cosntant name="struts.mapper.alwaysSelectFullNamespace" value="false" />     
    1 k0 ]9 F* _" i8 m9 c5 b. W
  154. </struts>   
    + a) M6 [) G4 N$ H
  155.   / i$ r+ L6 b0 T3 u1 ~' \2 R
  156.    
    4 o4 F. b. L# e$ i
  157.   
    ( J8 u6 J% E: \1 r
  158. <struts>  
    2 k( G3 J: s! a
  159.   
    ( e0 z; m  Q7 w$ o
  160.     <!-- include节点是struts2中组件化的方式 可以将每个功能模块独立到一个xml配置文件中 然后用include节点引用 -->  . ], \3 m+ t' n! n
  161.     <include file="struts-default.xml"></include>  
    1 f# e. \7 a* u3 v4 x
  162.       
    ; O9 R# @: d( W$ d9 L! W1 G3 R
  163.       
    - D) {' j2 K" x' X  `& f, q
  164.     <!-- package提供了将多个Action组织为一个模块的方式  
    7 b( ^8 U- `. P* @- i, j, Y. E
  165.         package的名字必须是唯一的 package可以扩展 当一个package扩展自  , |$ S* j' |8 m; G
  166.         另一个package时该package会在本身配置的基础上加入扩展的package  
    2 L1 @+ |/ \8 A4 i( ?, U% o
  167.         的配置 父package必须在子package前配置   ' I4 c$ Q* Y3 p' z( [' p  c
  168.         name:package名称  
    % D; |) T* d* {6 W/ s
  169.         extends:继承的父package名称  ) j9 B1 @; k) D& E1 y) Y- b! E( a
  170.         abstract:设置package的属性为抽象的 抽象的package不能定义action 值true:false  3 e4 L4 @! }6 h, X) N+ _3 V
  171.         namespace:定义package命名空间 该命名空间影响到url的地址,例如此命名空间为/test那么访问是的地址为http://localhost:8080/struts2/test/XX.action  ' i. E0 z0 U# u3 }; j. ~
  172.      -->  9 u6 S7 S$ m: P! ]3 X0 a
  173.     <package name="com.kay.struts2" extends="struts-default" namespace="/test">  ) s; y& `6 s+ r% c
  174.         <interceptors>  
    * ?% S" f! v) }4 _( s6 N
  175.             <!-- 定义拦截器   
    ; h( B/ l; D& Y0 u. Q
  176.                 name:拦截器名称  * K: {& b  F7 G9 b7 z5 U
  177.                 class:拦截器类路径  
      \/ r$ i5 }9 n0 i) x
  178.              -->  : B/ [, d7 L& `5 x! J& p
  179.             <interceptor name="timer" class="com.kay.timer"></interceptor>  
    " ?- M7 g: G% n3 n% k5 X
  180.             <interceptor name="logger" class="com.kay.logger"></interceptor>  0 N* P: Y+ z7 i3 m  X, z. a
  181.             <!-- 定义拦截器栈 -->  
    0 z; B7 b; M4 M$ T7 z  O2 p0 U1 v
  182.             <interceptor-stack name="mystack">  
    3 X/ C4 ^% G$ S
  183.                 <interceptor-ref name="timer"></interceptor-ref>  
    % `+ K" U3 j) D
  184.                 <interceptor-ref name="logger"></interceptor-ref>  
    ) V+ V4 q2 w# f! n' t% d  F
  185.             </interceptor-stack>  
    * E2 D: X7 ?6 F
  186.         </interceptors>  : U+ B+ C9 A+ [# p
  187.           6 \% b( O( E% _8 u& _0 J
  188.         <!-- 定义默认的拦截器 每个Action都会自动引用  ) b# S0 a6 T" o% u% n7 t( [% M
  189.          如果Action中引用了其它的拦截器 默认的拦截器将无效 -->  : L% j% }* r, O6 E% H0 N
  190.         <default-interceptor-ref name="mystack"></default-interceptor-ref>  
    " G3 I- W% j& P  S
  191.           4 }1 X' O, Y0 x. p) i" L
  192.           5 G& b% d7 {: o' J7 E
  193.         <!-- 全局results配置 -->  
    - m7 e! s: R$ H; j0 Z" D# N
  194.         <global-results>  
    # }3 [# l2 k* A) B+ `* \9 g) N
  195.             <result name="input">/error.jsp</result>  
    # o. d. x. a: ?- M+ D- F. W
  196.         </global-results>  
    / @* Q7 v2 ?( r+ c2 P& u( L9 t
  197.          
    ' L  t/ y' e! K. ~7 \8 i" _* G
  198.         <!-- Action配置 一个Action可以被多次映射(只要action配置中的name不同)  4 @* G7 L$ s5 Y2 O4 e
  199.              name:action名称  
    - q# O1 S/ }+ W5 N0 I  {& g
  200.              class: 对应的类的路径  + t6 p& P  W: A: z$ A0 b" T3 I: C8 E
  201.              method: 调用Action中的方法名  / b/ [  V! ^$ S: [. i9 W
  202.         -->  " ^) r- x; N4 X( y1 s$ u( j: D5 j
  203.         <action name="hello" class="com.kay.struts2.Action.LoginAction">  
    & `% ~6 V: O1 n
  204.             <!-- 引用拦截器  
    # D+ x# K6 Q. V% }/ y
  205.                 name:拦截器名称或拦截器栈名称  ( V% f0 `( d8 E: ?
  206.              -->  ; R6 O8 b- I2 k' O8 b
  207.             <interceptor-ref name="timer"></interceptor-ref>  
    * `2 ]( [4 g: z6 O, N/ {1 g) U. }
  208.          
    2 v1 [, o& a: `( u
  209.             <!-- 节点配置  0 v/ K# l+ ^) E1 p! y
  210.                 name : result名称 和Action中返回的值相同  , w9 L, S! `. `1 b: L
  211.                 type : result类型 不写则选用superpackage的type struts-default.xml中的默认为dispatcher  " {0 w( b( Y5 t1 n2 u( q" i, M
  212.              -->  
    3 _9 g; h' p4 z' V( O6 `
  213.          <result name="success" type="dispatcher">/talk.jsp</result>  ! _5 o6 l2 V# P7 u$ ?0 }
  214.          <!-- 参数设置   
    9 N% y5 \. n( b8 |
  215.              name:对应Action中的get/set方法   
    ) r* [8 t! g; U, ?! H; [/ ]
  216.          -->  8 V3 V! M1 ?. u  O+ X3 T
  217.          <param name="url">http://www.sina.com</param>  
      w& ?+ L* B# r3 t
  218.         </action>  
    - k/ F* u  H: }/ z& _/ W
  219.     </package>  
    ) F( ?. q( m+ f2 `0 B
  220. </struts></b></font></font></font>
复制代码
这些是常用的struts配置文件常量,如果想把struts用好,就要懂得每个配置是怎么一回事.不光光需要学习技术,更要学习好理论知识.技术的高度是由理论知识的深度决定的.
3 [5 _/ b: `6 M# d2 v
5 U( B( \0 m& n# R

科帮网 1、本主题所有言论和图片纯属会员个人意见,与本社区立场无关
2、本站所有主题由该帖子作者发表,该帖子作者与科帮网享有帖子相关版权
3、其他单位或个人使用、转载或引用本文时必须同时征得该帖子作者和科帮网的同意
4、帖子作者须承担一切因本文发表而直接或间接导致的民事或刑事法律责任
5、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
6、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
7、科帮网管理员和版主有权不事先通知发贴者而删除本文


JAVA爱好者①群:JAVA爱好者① JAVA爱好者②群:JAVA爱好者② JAVA爱好者③ : JAVA爱好者③

快速回复
您需要登录后才可以回帖 登录 | 立即注册

   

关闭

站长推荐上一条 /1 下一条

发布主题 快速回复 返回列表 联系我们 官方QQ群 科帮网手机客户端
快速回复 返回顶部 返回列表