Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing value to Struts-Config.xml

Status
Not open for further replies.

manojkmi

Programmer
Jul 11, 2007
1
US

Is there a way to pass value to "path" attribute
in the <forward> tag within an <action>?

Example:
<forward name="command" path="$$$$$$"/>

$$$$$$- have to pass dynamically.

Thanks in Advance
Manoj
 
Hi

No, you can not. But if you want dynamic forward address, then solve it in the [tt]Action[/tt] class :
Code:
[b]public[/b] ActionForward perform(
    ActionMapping mapping, 
    ActionForm form, 
    HttpServletRequest request,                                 
    HttpServletResponse response)
[b]throws[/b] IOException, ServletException 
{
    String dynPath="[green][i]$$$$$$[/i][/green]";
    [gray]// ...[/gray]
    [b]return[/b] [b]new[/b] ActionForward(dynPath);
}

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top