You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Meenakshi Singh <ma...@gmail.com> on 2007/08/26 00:15:01 UTC

Problem configuring in struts config

Hi all,

I hope someone would be able to provide some help in the problem that I am
describing below:

I had tow kind of programs in my app. one is prescriptive & another is
custom. Till now I only had to view these pages.
The configuration is struts config for the same was as follows:

<action name="TrackingActionForm" path="/jsp/au/tracking/viewprogram"
            parameter="viewProgram"
            input="searchprogram.page"
            scope="session"
            type="com.enbridge.dsm.web.action.TrackingProgramAction"
            validate="false">
      <forward name="input" path="searchprogram.page"/>
      <forward name="custprogpage" path="viewcustomprogram.page"/>
      <forward name="custprogpagepopup" path="viewcustomprogrampopup.page"/>
      <forward name="presprogpage" path="viewprescriptiveprogram.page"/>
      <forward name="presprogpagepopup" path="
viewprescriptiveprogrampopup.page"/>
      <forward name="markettransprogpage" path="viewmarkettransprogram.page
"/>
      <forward name="markettransprogpagepopup" path="
viewmarkettransprogrampopup.page"/>
    </action>

Now both the jsp's are not just views but they also had two editable fields.
The jsp for prescriptive program was already done.
and the configuration for the same in struts config is as under:
<action name="TrackingActionForm" path="/jsp/au/tracking/editprogram"
            parameter="editProgram"
            input="viewprescriptiveprogram.page"
            scope="session"
            type="com.enbridge.dsm.web.action.TrackingProgramAction"
            validate="true">
      <forward name="input" path="viewprescriptiveprogram.page"/>
      <forward name="success" path="/jsp/au/tracking/viewprogram.do"/>
      <forward name="custprogpage" path="viewcustomprogram.page"/>
      <forward name="custprogpagepopup" path="viewcustomprogrampopup.page"/>
      <forward name="presprogpage" path="viewprescriptiveprogram.page"/>
      <forward name="presprogpagepopup" path="
viewprescriptiveprogrampopup.page"/>
      <forward name="markettransprogpage" path="viewmarkettransprogram.page
"/>
      <forward name="markettransprogpagepopup" path="
viewmarkettransprogrampopup.page"/>
    </action>

now I have to make the other jsp(the one for cutom prg) also editable &
there are validations on this one too. The action & rest  of the classes are
the same for this jsp too.
I am not able to understand as to how shud I configure it in the struts
config so that I can specify the input for that as viewcustomprogram.page.
can I do that? What do I need to do for the same.
there r two methods in action class. From the search page it goes to the
view page depending on the type of program selected. The save button on this
page takes it to the edit method in the action class.

Plesae help at the earliest.

Thanks a lot in advance to everyone.
MV