Solved

Ptr: Struts - Setup/Submit pattern

Posted on 2006-11-19
1
183 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 500 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

Industry Leaders: 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

How many times a day do you open, acknowledge, or close an IT incident? What’s your process? Do you have a process depending on the incident, systems involved, and other factors? New Relic Alerts gives you options for how you interact with notifica…
Deploying our service is a grudge match between customer benefits and customer pain. In one corner, rolling out fixes (yay!) and delivering new features (double yay!). In the other corner, training on new features (boo – sounds like work), and chan…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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