Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

module switching problem

 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I m using modularity concept in my application

here are two struts-config files...

struts-config.xml
--------------------
<struts-config>
<global-forwards>

<forward
name="ComplaintDetails"
path="/switch.do?page=/patientcomplaintdetails.do&prefix=/pd"/>
</global-forwards>

<action-mappings>few action mappings here
.
.
<action
path="/switch"
type="org.apache.struts.actions.SwitchAction"/>
</action-mappings>
</struts-config>
-------------------------------
struts-pd-config.xml
----------------------------

<struts-config>
<forward
name="PatientDetails"
path="PatientDetails.do"/>
<forward
name="VitalsDetails"
path="VitalsDetails.do"/>
</global-forwards>

<action-mappings>
<action
path="PatientDetails"
parameter="/patientdetails.jsp"
type="org.apache.struts.actions.ForwardAction"/>

<action
path="VitalsDetails"
parameter="/PatientVitalFrame.jsp"
type="org.apache.struts.actions.ForwardAction"/>
</action-mappings>
</struts-config>

---------------------------

I have a PatientdashBoard.jsp page in the Default module,and I have link
called <html:link forward="ComplaintDetails" styleClass="linkswhite">Create</html:link>

when i click on the link ,following patientcomplaintdetails.jsp is displayed which is located under pd folder...

under pd folder ,i have these pages.
1.patientcomplaintdetails.jsp
2.patientdetails.jsp
3.PatientVitalFrame.jsp

In this patientcomplaintdetails.jsp page I have few more links,when i click on them they have to show repective pages from the same module pd.

here are the links

<html:link forward="PatientDetails"><img src="<%=root%>/images/personal-details-out.gif" alt="Personal Details" width="125" height="21" border="0" /></html:link>

<html:link forward="VitalsDetails" ><img src="<%=root%>/images/vitals-out.gif" alt="Vitala" width="125" height="21" border="0" /></html:link>

when i click on the links following error is displayed

Invalid path /VitalsDetails was requested

description The requested resource (Invalid path /VitalsDetails was requested) is not available


Invalid path /PatientDetails was requested

description The requested resource (Invalid path /PatientDetails was requested) is not available.


I have kept mapping correctly,whats going wrong i dont know...

Help me out...

Thanking you

Sreenivas
[ March 15, 2007: Message edited by: sreenivas jeenor ]
 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

One more doubt,

If i move from default config to specific config module using switchAction,where does the control lies .ie whether in default one or module specific one...

help me out
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic