I don't know enough about your app to help out too much, but here goes... REQUEST: GET /login.do?page=1 [Struts will make a new ActionForm instance, call reset(), and call setPage(1)] RESPONSE: redirect to /config.do
REQUEST: GET /config.do [Struts will make a new ActionForm instance, call reset(), and won't set anything, which should leave page=0] It sounds like that is what you want to happen, but clearly it isn't what is happening if you end up with page=1 by the time your action is called on the second request. Where does the mental model differ from what's happening? It sounds like you covered some of the first things I would look at -- make sure redirect="true" is set, make sure the ActionForm is scope="request" for both actions. Pretend you are Struts and walk through what is supposed to happen. If that doesn't pinpoint the problem, use curl to make some requests and examine the responses more carefully than the browser will allow, or use a debugger or print statements to debug. -Max ----- Original Message ----- From: "David Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, August 26, 2003 2:49 PM Subject: RE: skipping repopulation between actions without external forwarding > Max, > > Did you mean a forward with redirect="true" like: > <forward name="menu" redirect="true" path="/config.do" /> > > If so, then I'm missing something. I have that, I'm > positive my action was recompiled & restarted to use > the above "menu" forward. I even set my action's > scope="request" to be sure it isn't being retained > in the session scope and it still seems like it's > passing my page number parameter or retaining it > somewhere. My echo printing shows: > > 2003-08-26 14:40:51 action: Config, page=1 > 2003-08-26 14:40:51 action: Config, QUERY_STRING=null > > I can figure out Validation, Tiles, and Hiberante, but > not normal redirection. What basic struts related logic > am I missing? > > Thanks, > David > > -----Original Message----- > From: Max Cooper [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 26, 2003 4:56 PM > To: Struts Users Mailing List > Subject: Re: skipping repopulation between actions without external > forwarding > > > You can't change the request parameters at all. (Technically, you can change > them with a Filter, but that would not be appropriate here, so they are > essentially immutable in this context.) > > Use a redirect after the login action rather than a forward. That way the > URL in the browser will match what the user sees in their browser window, > and it sounds like it might also fix your other problem. > > -Max > > ----- Original Message ----- > From: "David Friedman" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, August 26, 2003 1:39 PM > Subject: skipping repopulation between actions without external forwarding > > > > Without an HTTP redirect, so the call is internal to Struts and not sent > > back to the client browser, how can I either: > > > > a) remove all GET/POST parameters that came with the request so my action > > gets passed nothing for repopulation. > > > > b) change one parameter that was submitted with the HTTP GET/POST Request. > > > > In my case, I have page=1 set with the login page but need it forced down > to > > page=0 the very first time as it forwards from the login to the regular > > action. The reset() function won't work because I setPage(0) but it auto > > populates to 1 again. That initial sign-on problem screws up my actions > in > > my forms. I've set my actions to use 2 instead of one to check some > things > > but that is an ugly solution. > > > > Thanks, > > David > > > > > > --------------------------------------------------------------------- > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]