Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Ptr: Struts - Setup/Submit pattern

Posted on 2006-11-19
1
Medium Priority
?
185 Views
Last Modified: 2010-04-01
0
Comment
Question by:matthew016
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
jaggernat earned 2000 total points
ID: 17974934
Have a single action class called "Setup" which extends DispatchAction so that you can have your own custom methods : setupIndex()  and  SetupSubscription()

public class Setup extends DispatchAction {

// common code  for  index *webpage*  and   subscription webpage  goes here
          // setup header.jsp (put things inr equest ...)
         // setup menu_left.jsp
         // setup index content
         // ...

//custom method : setupIndex
    public ActionForward setupIndex(
                    ActionMapping mapping, ActionForm form,
                    HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
             
//other specific logic for setUpIndex
return  mapping.findForward("SetupIndexPage");  //forwards to index page

 }


//custom method : setupSubscription
public ActionForward setupSubscription (
                    ActionMapping mapping, ActionForm form,
                    HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
         
//other specific  logic for setupSubscription
return  mapping.findForward("SetupSubscriptionPage"); //forwards to SetupSubscription Page
    }



}


hope that helps
J
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question