trycatch2004 2005年03月24日
再问问,这个struts的流程没找出。。。
这是个网上的例子,本身程序应该对的,能跑起来的,但我找不出这流程。。。
struts-config.xml文件内容如下:
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>
<!-- ========== Form Bean Definitions -->
<form-beans>
<!-- There can be many form-bean elements defined. One for each form in the system -->
<form-bean name="loginForm" type="hero.struts.forms.LoginForm"/>
<form-bean name="propertyForm" type="hero.struts.forms.PropertyForm"/>
<form-bean name="hookForm" type="hero.struts.forms.HookForm"/>
<form-bean name="nodeForm" type="hero.struts.forms.NodeForm"/>
<form-bean name="edgeForm" type="hero.struts.forms.EdgeForm"/>
<form-bean name="activityForm" type="hero.struts.forms.ActivityForm"/>
<form-bean name="userForm" type="hero.struts.forms.UserForm"/>
<form-bean name="projectForm" type="hero.struts.forms.ProjectForm"/>
<form-bean name="roleForm" type="hero.struts.forms.RoleForm"/>
<form-bean name="userroleForm" type="hero.struts.forms.UserRoleForm"/>
<form-bean name="userpreferencesForm" type="hero.struts.forms.UserPreferencesForm"/>
<form-bean name="workspaceForm" type="hero.struts.forms.WorkspaceForm"/>
</form-beans>

<!-- ========== Global Forward Definitions -->
<global-forwards>
<forward name="activity" path="activityDef"/>
<forward name="editactivity" path="editactivityDef"/>
<forward name="configproject" path="editprojectDef"/>
<forward name="project" path="projectDef"/>
<forward name="initial" path="indexDef"/>
<forward name="login" path="loginDef"/>

</global-forwards>

<!-- ========== Action Mapping Definitions -->
<action-mappings>
<!-- =================== -->
<!-- Heroine Interface Main Actions -->
<!-- =================== -->

<action path="/login/login"
type="hero.struts.actions.LoginAction"
name="loginForm"
scope="session"
validate="false">
<forward name="activity" path="activityDef"/>
<forward name="project" path="projectDef"/>
<forward name="cloneproject" path="/protected/CloneProject.jsp"/>
<forward name="projectdetails" path="/protected/ProjectDetails.jsp"/>
</action>


<action path="/protected/property"
type="hero.struts.actions.PropertyAction"
name="propertyForm"
scope="session"
validate="false">
<forward name="node" path="activityDef"/>
<forward name="project" path="projectDef"/>
</action>

<action path="/protected/activity"
type="hero.struts.actions.ActivityAction"
name="activityForm"
scope="session"
validate="false">
<forward name="failure" path="activityDef"/>
</action>

<action path="/protected/hook"
type="hero.struts.actions.HookAction"
name="hookForm"
scope="session"
validate="false">
<forward name="editactivity" path="editactivityDef"/>
<forward name="configproject" path="editprojectDef"/>
</action>

<action path="/protected/node"
type="hero.struts.actions.NodeAction"
name="nodeForm"
scope="session"
validate="false">
<forward name="failure" path="projectDef"/>
<forward name="activity" path="activityDef"/>
<forward name="project" path="projectDef"/>
</action>

<action path="/protected/edge"
type="hero.struts.actions.EdgeAction"
name="edgeForm"
scope="session"
validate="false">
<forward name="failure" path="projectDef"/>
<forward name="project" path="projectDef"/>
</action>

<action path="/user"
type="hero.struts.actions.UserAction"
name="userForm"
scope="request"
validate="false">
<forward name="newuser" path="/login/UserPrefLayout.jsp"/>
<forward name="usernotlogged" path="/login/UserLayout.jsp"/>
</action>

<action path="/userpreferences"
type="hero.struts.actions.UserPreferencesAction"
name="userpreferencesForm"
scope="request"
validate="false">
</action>

<action path="/protected/project"
type="hero.struts.actions.ProjectAction"
name="projectForm"
scope="request"
validate="false">
<forward name="addproject" path="/protected/AddprojectDef"/>
<forward name="cloneproject" path="/protected/CloneProject.jsp"/>
<forward name="projectdetails" path="/protected/ProjectDetails.jsp"/>
</action>


<action path="/protected/role"
type="hero.struts.actions.RoleAction"
name="roleForm"
scope="request"
input="/protected/Role.jsp">
</action>

<action path="/protected/userrole"
type="hero.struts.actions.UserRoleAction"
name="userroleForm"
scope="request"
validate="false">
</action>

<action path="/protected/workspace"
type="hero.struts.actions.WorkspaceAction"
name="workspaceForm"
scope="request"
validate="false">
</action>

<action path="/initial"
type="hero.struts.actions.InitialAction"
scope="request"
validate="false">
<forward name="initial" path="indexDef"/>
</action>

<action path="/protected/worklist"
type="hero.struts.actions.WorklistAction"
scope="request"
validate="false">
<forward name="worklist" path="worklistDef"/>
</action>

<action path="/sort"
type="fr.improve.struts.taglib.layout.sort.SortAction"
scope="request"
validate="false">
</action>


</action-mappings>
</struts-config>

-------------------------------------
...全文
33 点赞 收藏 2
写回复
2 条回复

还没有回复,快来抢沙发~

发动态
发帖子
Web 开发
创建于2007-09-28

5.2w+

社区成员

34.1w+

社区内容

Java Web 开发
社区公告
暂无公告