• 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

how to determine the forward? [s1]

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Obviously where it says "someforward" I need to put my own forward there. Where can I find out the exact name of the forward? I didn't see anything that I thought I could use in the struts-config.xml

Any suggestions?
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I think you have to check your struts-config-main.xml

SO basically where you have the input attribute in your config file:

<action path="/TestDispatch"
type="com.jamesholmes.minihr.TestDispatchAction"
name="TestDispatchForm"
scope="request"
validate="false"
input="/TestDispatch.jsp"
parameter="function"/>

With that findForward it will go to TestDispatch.jsp. I believe this is how it works I guess someone can correct me if I am wrong hope this works.

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

You can find out the exact name of the forward in forward tag under the corrosponding action mapping of your struts-config.xml.

<global-forwards>
<forward name="failure" path="/failure.jsp"></forward>
</global-forwards>
<action-mappings>
<action path="/test" name="testForm" type="com.action.TestAction">
<forward name="success" path="/welcome.jsp"></forward>
<forward name="error" path="/error.jsp"></forward>
</action>
</action-mappings>

success is the forward name if you want the request to be forwarded to welcome.jsp.

If there are no forward tags under corrosponding action mapping, then global-forwards will be checked.

Hope it is helpful.

Suresh.
 
Sunny Gibbony
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes this is very helpful! Thanks for your knowledge.

I think my issue was that I was looking at the wrong struts-config file as the project has many sub components with their own config file.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic