• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

finding action-mapping given the action name

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any class in struts that will convert an action path and look it up in struts-config and find the corresponding forward?
for example, I have the following action-mapping:
<action path="/viewReportSetup" type="com.xxx.ViewReportSetupAction">
<forward name="success" path="/assessment/ReportSetup.jsp"/>
<forward name="failure" path="/assessment/ReportSetup.jsp"/>
</action>

I want to be able to find the corresponding ActionForward given the string "viewReportSetup.do", can this be done?
I found ConfigHelper class, i am not sure if it's the right class to use, and it requires PageContext to be passed it as an argument to the constructor. The available objects i have access to are HttpServletRequest request, HttpServletResponse response.
thanks in advance.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might find it easier to simply use global forwards to achieve your objective.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic