struts-config.xml
001 <?xml version="1.0" encoding="ISO-8859-1" ?>
002 <!DOCTYPE struts-config PUBLIC
003   "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
004   "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
005 
006 <struts-config>
007 
008   <!--   F O R M   B E A N S   -->
009   <form-beans>
010     <form-bean
011         name="patientBean"
012         type="com.bea.medrec.beans.PatientBean"/>
013 
014     <form-bean
015         name="prescriptionBean"
016         type="com.bea.medrec.beans.PrescriptionBean"/>
017 
018     <form-bean
019         name="recordBean"
020         type="com.bea.medrec.beans.RecordBean"/>
021 
022     <form-bean
023         name="searchBean"
024         type="com.bea.medrec.beans.SearchBean"/>
025 
026     <form-bean
027         name="userBean"
028         type="com.bea.medrec.beans.UserBean"/>
029 
030     <form-bean
031         name="vitalSignsBean"
032         type="com.bea.medrec.beans.VitalSignsBean"/>
033   </form-beans>
034 
035   <!--   G L O B A L   F O R W A R D S   -->
036   <global-forwards>
037     <forward name="medrec.startpage" path="http://localhost:7101/start.jsp" redirect="true"/>
038     <forward name="login.home.redirect" path="/login.do" redirect="true"/>
039     <forward name="error" path="/Error.jsp"/>
040     <forward name="home" path="/search.do"/>
041   </global-forwards>
042 
043   <!--   A C T I O N   M A P P I N G S   -->
044   <action-mappings type="org.apache.struts.config.SecureActionConfig">
045     <action
046       path="/prescription"
047       input="/CreatePrescription.jsp"
048       name="prescriptionBean"
049       scope="request"
050       type="com.bea.medrec.actions.CreatePrescriptionAction"
051       parameter="actionPrescription"
052       validate="true">
053       <set-property property="secure" value="true"/>
054       <forward name="save.prescription.success" path="/visit.do" redirect="true"/>
055       <forward name="cancel.prescription" path="/CreateVisit.jsp"/>
056       <forward name="validate.prescription.failure" path="/CreatePrescription.jsp"/>
057       <forward name="create.prescription" path="/CreatePrescription.jsp"/>
058     </action>
059 
060     <action
061       path="/visit"
062       input="/CreateVisit.jsp"
063       name="recordBean"
064       scope="session"
065       type="com.bea.medrec.actions.CreateVisitAction"
066       parameter="action"
067       validate="true">
068       <set-property property="secure" value="true"/>
069       <forward name="create.visit" path="/CreateVisit.jsp"/>
070       <forward name="validate.record.failure" path="/CreateVisit.jsp"/>
071       <forward name="cancel.record.success" path="/medicalrecord.do"/>
072       <forward name="save.record.success" path="/medicalrecord.do"/>
073       <forward name="create.prescription" path="/prescription.do"/>
074     </action>
075 
076     <action
077       path="/error"
078       type="com.bea.medrec.actions.ErrorAction">
079       <set-property property="secure" value="false"/>
080       <forward name="error.page" path="/Error.jsp"/>
081     </action>
082 
083     <action
084       path="/login"
085       type="com.bea.medrec.actions.PhysLoginAction"
086       name="userBean"
087       scope="request"
088       input="/Login.jsp"
089       validate="true">
090       <set-property property="secure" value="true"/>
091       <forward name="login.home" path="/Login.jsp"/>
092       <forward name="login.success" path="/search.do" redirect="true"/>
093       <forward name="login.failure" path="/Login.jsp"/>
094     </action>
095 
096     <action
097       path="/logout"
098       type="com.bea.medrec.actions.PhysLogoutAction">
099       <set-property property="secure" value="false"/>
100       <forward name="login.home" path="/Login.jsp"/>
101     </action>
102 
103     <action
104       path="/searchresults"
105       type="com.bea.medrec.actions.SearchResultsAction"
106       name="searchBean"
107       scope="request"
108       input="/Search.jsp"
109       parameter="action">
110       <set-property property="secure" value="true"/>
111       <forward name="search.home" path="/search.do"/>
112       <forward name="search.invalid" path="/Search.jsp"/>
113       <forward name="search.results" path="/SearchResults.jsp"/>
114       <forward name="view.records.summary" path="/medicalrecord.do" redirect="true"/>
115     </action>
116 
117     <action
118       path="/search"
119       type="com.bea.medrec.actions.SearchAction">
120       <set-property property="secure" value="true"/>
121       <forward name="search.home" path="/Search.jsp"/>
122     </action>
123 
124     <action
125       path="/profile"
126       type="com.bea.medrec.actions.PhysViewProfileAction">
127       <set-property property="secure" value="true"/>
128       <forward name="view.profile" path="/ViewProfile.jsp"/>
129     </action>
130 
131     <action
132       path="/medicalrecord"
133       type="com.bea.medrec.actions.PhysViewRecordsSummaryAction">
134       <set-property property="secure" value="true"/>
135       <forward name="search.results" path="/searchresults.do"/>
136       <forward name="view.records.summary" path="/ViewRecords.jsp"/>
137     </action>
138 
139     <action
140       path="/record"
141       type="com.bea.medrec.actions.PhysViewRecordAction">
142       <set-property property="secure" value="true"/>
143       <forward name="view.records.summary" path="/medicalrecord.do"/>
144       <forward name="view.record" path="/ViewRecord.jsp"/>
145     </action>
146   </action-mappings>
147 
148   <!--   C O N T R O L L E R   -->
149   <controller>
150     <set-property property="debug" value="2"/>
151     <set-property property="nocache" value="true"/>
152   </controller>
153 
154   <!--   M E S S A G E   R E S O U R C E S   -->
155   <message-resources
156     parameter="com.bea.medrec.utils.ApplicationResources"/>
157 
158   <!--   P L U G - I N S   -->
159   <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
160     <set-property property="pathnames"
161                      value="/WEB-INF/validator-rules.xml,
162                             /WEB-INF/validation.xml"/>
163   </plug-in>
164 
165   <plug-in className="org.apache.struts.action.SecurePlugIn">
166     <set-property property="httpPort" value="7101"/>
167     <set-property property="httpsPort" value="7102"/>
168     <set-property property="enable" value="true"/>
169     <set-property property="addSession" value="true"/>
170   </plug-in>
171 
172 </struts-config>