Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

module switching problem

 
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
 
Something must be done about this. Let's start by reading this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic