• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Duplicate action and path

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I was given a web appliation where i have to extend the functionalit. i have a struts configuration file which has got duplicate path elements.
i dont understand what could be need to have duplicate paths offcourse one is forwarding direclty to the jsp where as other has got a correspding action. I would appreciate if any one can clear me this doubt.
Here is an example of what i was trying to say
<action path="/selectHierarchy" forward="/jspHierarchySelection.jsp" />
<action path="/selectHierarchy" type="HierarchySelectionAction" name="dynaHierarchySelectionForm" validate="false">
<forward name="success" path="/jsp/reporting-mso/HierarchySelection.jsp" />
</action>
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use

<global-forwards>
<forward name="" path=""/>
</global-forwards>
 
kiran kumar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Srilatha,
Thanks for your response.
May be i was not clear with the question.My question is
"which action is being processed when a request arrives", there are two actions which services the same path.which path is processed by the request processor. Hope i am clear this time.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Duplicate action paths are not supported. Struts will use one and ignore the other, but I'm not sure which will be used and which ignored.

My guess is that the previous developer decided to change the mapping, but forgot to remove the old one.
[ April 04, 2006: Message edited by: Merrill Higginson ]
 
kiran kumar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Merrill Higginson , i appreciate your response.
It is not the case with a single action which i can think of as an unintentional, almost it is the case with 50% of the action mappings.
 
srilatha kareddy
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i made a little search and found this... hope this may help you

if you define duplicate action-mapping (by
path) or form-beans (by name), the last one is loaded silently.
 
kiran kumar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Srilatha for your interest in answering my question.
what would be the need to have duplicate actions if the later is processed.I am trying to find out that.because the earlier developer made the duplicate actions deliberately.
 
kiran kumar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Srilatha for your interest in answering my question.
what would be the need to have duplicate actions if the later is processed.I am trying to find out that.because the earlier developer made the duplicate actions deliberately.
 
Beauty is in the eye of the tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic