Solved

Ptr: Struts - Setup/Submit pattern

Posted on 2006-11-19
1
176 Views
Last Modified: 2010-04-01
0
Comment
Question by:matthew016
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now