JiveJdon Community Forums
在线178人   首页   主题表   培训咨询   标签   精华   查搜   注册    登陆 RSS
首页 » 论坛 » 开源项目大家谈
???en_US.forumThreadPrev.name??? 上一主题
google yahoo 365Key网摘 CSDN网摘 添加到百度搜藏 POCO网摘 新浪ViVi 天极网摘
???en_US.forumThreadNext.name??? 下一主题
Go 共有 1 回复 / 1
 发表新帖子   回复该主题贴
landog

悄悄话
发表文章: 2
注册时间: 2003年04月03日 20:46
structs初级问题 2003年04月03日 21:34 到本帖网址 加入本帖到收藏夹 回复该主题
标签
我发现structs的例子(structs-example)中有action.xml,struct_config.xml,database.xml和web.xml等4个配置文件
而一般的例子中只有struct_config.xml,web.xml两个。我想只有这两个应该是必须的吧,那么系统是在哪里引用到action.xml呢?我没有找到

struct_config.xml有:
<#action path="/editRegistration"
type="org.apache.struts.webapp.example.EditRegistrationAction"
name="registrationForm"
scope="request"
validate="false">
<forward name="success" path="/registration.jsp"/>
<#/action>

而action.xml中有
<#action path="/editRegistration"
actionClass="org.apache.struts.webapp.example.EditRegistrationAction"
formAttribute="registrationForm"
formClass="org.apache.struts.webapp.example.RegistrationForm">
<forward name="success" path="/registration.jsp"/>
<#/action>

两个都在mapping里面,我不知道他们各自实现什么功能。我感觉差不多呢,有什么区别和联系呢》
初学structs,请大家帮忙,别耻笑。[
kkk9

悄悄话
发表文章: 4
注册时间: 2003年04月03日 10:21
Re: structs初级问题 2003年04月05日 15:58 到本帖网址 加入本帖到收藏夹 回复该主题
> 我发现structs的例子(structs-example)中有action.xml,s
> ruct_config.xml,database.xml和web.xml等4个配置文件
> 而一般的例子中只有struct_config.xml,web.xml两个。我想?> 有这两个应该是必须的吧,那么系统是在哪里引用到action.x
> l呢?我没有找到
>
> struct_config.xml有:
> <#action path="/editRegistration"
> type="org.apache.struts.webapp.example.EditRegistratio
> Action"
> name="registrationForm"
> scope="request"
> validate="false">
> <forward name="success"
> path="/registration.jsp"/>
> <#/action>
>
> 而action.xml中有
> <#action path="/editRegistration"
> actionClass="org.apache.struts.webapp.example.EditRegi
> trationAction"
> formAttribute="registrationForm"
> formClass="org.apache.struts.webapp.example.Registrati
> nForm">
> <forward name="success"
> ss" path="/registration.jsp"/>
> <#/action>
>
> 两个都在mapping里面,我不知道他们各自实现什么功能。我?> 觉差不多呢,有什么区别和联系呢》
> 初学structs,请大家帮忙,别耻笑。[


你看一下action.xml的开头注释说得很清楚:
!--
WARNING: This file is deprecated, and remains only as an example
of how the Struts configuration file would have been set up using
the conventions of Struts 0.5. All new development should be based
on Struts 1.0 standards, and you should be configuring the file
"struts-config.xml" instead.
-->

标签
共有 1 回复 / 1Go
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表    返回页首返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG:
正在读取,请等待...
查询本论坛内 回复超过的热门帖子
标题
 
粗体: [b]文本[/b] 斜体: [i]文本[/i] 下划线 [u]文本[/u] 插入图片 [img]http://wwww.xxxx.com/img.ext[/img] 插入代码 [code]程序代码[/code]  插入url链接 [url]http://url[/url] / [url=http://url]URL加下滑线[/url] 插入附件 插入word文档 Txt等文件
内容
  提交时自动拷贝以上内容到剪贴板 Ctrl-V可取出;提问题前先查询标签列表

RSS 手机阅读 add to google add to yahoo
解惑之道在J道 ,打造中国最具影响力的的企业软件社区 推荐Chrome快速浏览本站
OpenSource JIVEJDON v3.5 Powered by JdonFramework Code © 2002-09 jdon.com

anti spam