He means that you should NEVER chain actions. This is an ongoing debate that usually results in everyone giving room for exceptional cases. Personally, I have never chained actions and have found no need too. I use more "standard" ways to accomplish processing chains in the biz logic. But, there are those out there that do find need for it. Until I am in there shoes I'll say, "To each his own".
Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -----Original Message----- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 2:34 PM To: 'Struts Users Mailing List' Subject: RE: LookupDispatchAction Question > -1. > You allways do that, like I have processed this page, go to another page. > .V What exactly do you mean by this comment Vic. -Juan -----Original Message----- From: Vic Cekvenich [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 4:11 PM To: [EMAIL PROTECTED] Subject: Re: LookupDispatchAction Question Alvarado, Juan (c) wrote: > From a design point of view, forwarding from one action to another action > should be examined closely. It should be the exception rather than the rule. > -1. You allways do that, like I have processed this page, go to another page. .V > > I would suggest you do the following. From your login action just forward to > your JSP; don't forward to the LookupDispatchAction. This should solve your > problem. > > > -----Original Message----- > From: Avexus Incorporated [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 3:48 PM > To: Struts Users Mailing List > Subject: RE: LookupDispatchAction Question > > > should be nothing wrong with that. i do that all the time, except this is > the first time that i've tried to use LookupDispatchAction as I just came > across it. > > Brandon Goodin <[EMAIL PROTECTED]> wrote::-D :-D :-D > > Juan was right. Why are you forwarding to another action from an action. > I'll get out of this discussion cuz I think Juan has got it. > > Brandon Goodin > Phase Web and Multimedia > P (406) 862-2245 > F (406) 862-0354 > [EMAIL PROTECTED] > http://www.phase.ws > > > -----Original Message----- > From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 1:33 PM > To: 'Struts Users Mailing List' > Subject: RE: LookupDispatchAction Question > > > Can you show me the snippet of code you are using to forward to the JSP from > the login action. > > -----Original Message----- > From: Avexus Incorporated [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 3:25 PM > To: Struts Users Mailing List > Subject: RE: LookupDispatchAction Question > > > > My login IS NOT a LookupDispatchAction. It is an Action. It is the page that > login forwards to that is a LookupDispatchAction. But that page never > displays because there is no value for the "submit" parameter in this case. > > "Alvarado, Juan (c)" wrote:Okay this is > one way of doing this: > > Your login action in this case should not be a LookupDispatchAction. It > should be a sub-class of the struts Action class. LookupDispatchAction has > another intended usage. > > When your user is authenticated (from the login action), you will forward to > the jsp that is suppose to contain all the submit buttons. Assuming > everything else is configured properly, your JSP should then display > properly. > > > -----Original Message----- > From: Avexus Incorporated [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 3:11 PM > To: Struts Users Mailing List > Subject: RE: LookupDispatchAction Question > > > > After the user logs on they are supposed to go to a "lookup" page. This page > will have no data on it when it is first displayed. This page, which is a > JSP of course, will have a form and more than 1 submit button. > The problem is that the page can't even be displayed because when Struts > calls my Action class (which extends LookupDispatchAction), there is no > value for the "submit" button. That is, Struts doesn't know which of my > methods to invoke and throws an exception (the error message from my first > email). This is because the user hasn't clicked any of the submit buttons > yet -- they haven't even seen the page. > How do I get the page to display initially? > "Alvarado, Juan (c)" wrote:Okay can you > please tell me what exactly it is you're trying to > accomplish??? I don't quite get what your ultimate goal is. > > Thanks > > -----Original Message----- > From: Avexus Incorporated [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 3:01 PM > To: Struts Users Mailing List > Subject: RE: LookupDispatchAction Question > > > > I looked at that site. That is where I found out about LookupDispatchAction. > But there is nothing that I can find that tells me how to initially display > a page that will subsequently use a dispatch action. In fact, I can't figure > out how to do it in Struts at all without either having a plain .html page > as the inital page or having 2 .jsp pages. Niether solution is good. > "Alvarado, Juan (c)" wrote:I would suggest > you read up on the usage of the LookupDispatchAction again. > It was not designed to to be used in the way you are trying to use them. > > Take a look at this site http://husted.com/struts/index.html. It has some > good suggestions on the correct usage of the action classes that come with > struts. > > -----Original Message----- > From: Avexus Incorporated [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 2:46 PM > To: [EMAIL PROTECTED] > Subject: LookupDispatchAction Question > > > > I am new to Struts and am trying to use the LookupDispatchAction class to > display a page for the first time (i.e. the user is being navigated to this > page from another page). > > I have everything setup fine in my struts_config.xml and Struts attempts to > display my page, but was giving the following error: > > Request[/lookup] does not contain handler parameter named submit > > After researching on the archives, I realized that this message is due to > the fact that the user has not yet clicked any of the "submit" button on > this page (the page hasn't even been displayed yet). The suggestion on the > archive is to implement something similar to the following in the Action > class which extends LookupDispatchAction: > > public ActionForward execute(ActionMapping actionMapping, > ActionForm actionForm, > HttpServletRequest httpServletRequest, > HttpServletResponse httpServletResponse) > throws Exception > { > if (httpServletRequest.getParameter(actionMapping.getParameter()) == null) > { > return defaultMethod(); > } > else > { > return super.execute(actionMapping, actionForm, httpServletRequest, > httpServletResponse); > } > } > > > My question is what do I return from "defaultMethod"? I have to return an > ActionForward but I don't want to forward the user anywhere -- I want to > display the page. How do I do this? I guess I could have 2 pages and 2 > actions -- one to display the page initially and one to process the page > upon "submit" -- but that is ugly and I hope not the only solution. > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]