I have a follow-up question about this subject (redirecting to an Action class rather than a jsp file).
When I do the redirect, and the target is an Action class with validated input fields, when the screen is initially shown, I get "... field is required" messages on everything. Apparently the Action class thinks a user submit was done, and so it runs all its validations. This isn't the behavior I would like to see; I tried removing the "input" result from struts.xml but that just causes a "No result defined" error. Does anyone know the trick to this? Thanks, Dennis ________________________________ From: Dennis Atkinson <dennisatkinson...@yahoo.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Thursday, July 30, 2009 1:18:12 PM Subject: Re: New to Struts, a Question Thanks to all who helped with this - I understand it better now. Dennis ________________________________ From: Martin Gainty <mgai...@hotmail.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Thursday, July 30, 2009 8:32:01 AM Subject: RE: New to Struts, a Question in your config files look for default result assignment with <result tag as in <result>/userDisplay.jsp</result> http://struts.apache.org/2.0.14/docs/result-configuration.html Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 29 Jul 2009 21:14:24 -0400 > Subject: Re: New to Struts, a Question > From: tomsatt...@gmail.com > To: user@struts.apache.org > > In my struts.xml file, I have the UserDisplayAction class and a blank (no > "name=") result for userDisplay.jsp. Does it pick up from there? > > > > On Wed, Jul 29, 2009 at 8:40 PM, Dave Newton <newton.d...@yahoo.com> wrote: > > > Dennis Atkinson wrote: > > > >> Dave, > >> > >> OK, I can make it work. I just don't understand WHY it works. > >> > >> If I change to this: <a href="/betaSystem/userDisplay.action">My > >> Acccount</a> > >> > >> I get exactly what I expect; the screen loads with the data filled in > >> properly. > >> > >> But what I don't understand is how Struts knows to load > >> userDisplay.jsp. I assume it parses the "userDisplay" out of the url > >> and appends the ".jsp" to the end, so as long as I have these names > >> the same (other than the suffix), this will work? > >> > > > > You don't have a user display action configured via XML or annotations? > > > > > > Dave > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > _________________________________________________________________ Bing™ brings you maps, menus, and reviews organized in one place. Try it now. http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1