*
The moose likes Struts and the fly likes module switching problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "module switching problem" Watch "module switching problem" New topic
Author

module switching problem

sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
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

Joined: Jan 09, 2005
Posts: 125
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
 
Consider Paul's rocket mass heater.
 
subject: module switching problem
 
Similar Threads
how to populate values in jsp page
action mapping error in popup window page,help me
Struts module problem
can i call DispatchAction from global forward
struts module navigation problem