Re: Another struts design question

2006-02-15 Thread Mark Lowe
On 2/15/06, Lixin Chu [EMAIL PROTECTED] wrote: ok, I let page A or B pass a returnURL to page C who keeps it in the session scoped actionForm. I think what's being suggested is storing a reference to the referer in the session, and thus circumventing any potential issues with the Referer header

Re: Another struts design question

2006-02-15 Thread Frank W. Zammetti
On Wed, February 15, 2006 4:24 am, Mark Lowe said: My understanding of the suggestion is like replicating the history object in client side javascript. Which does sound like a good suggestion. That's a good way to put it :) The only difference is that you wouldn't build up a whole history,

Re: Another struts design question

2006-02-15 Thread [EMAIL PROTECTED]
already be handled? --- On Tue 02/14, Frank W. Zammetti [EMAIL PROTECTED] wrote: From: Frank W. Zammetti [mailto: [EMAIL PROTECTED] To: user@struts.apache.org Date: Tue, 14 Feb 2006 18:59:11 -0500 Subject: Re: Another struts design question Michael Jouravlev wrote: On 2/14/06, Rick Reumann

Re: Another struts design question

2006-02-15 Thread Frank W. Zammetti
: [EMAIL PROTECTED] To: user@struts.apache.org Date: Tue, 14 Feb 2006 18:59:11 -0500 Subject: Re: Another struts design question Michael Jouravlev wrote: On 2/14/06, Rick Reumann [EMAIL PROTECTED] wrote:In the action just look for some param like fromPage and key off of that for your return

Re: Another struts design question

2006-02-15 Thread Michael Jouravlev
On 2/15/06, Frank W. Zammetti [EMAIL PROTECTED] wrote: On Wed, February 15, 2006 2:46 pm, [EMAIL PROTECTED] said: Is it, however, possible that you could design you application to where all the mapped actions were setup actions? I guess not. Yes you can. In this case you need to somehow

Re: Another struts design question

2006-02-15 Thread Frank W. Zammetti
Michael Jouravlev wrote: An action should *never* forward to a page that does not belong to that action; this practice leads to a spaghetti code both in Java and in config file. If you mean forward directly to a JSP, I agree. If you meant something else, I'm not sure how you would ever get

Re: Another struts design question

2006-02-15 Thread Dakota Jack
Is there any actual verification that these remarks are true? Could you give us some links? On 2/14/06, Michael Jouravlev [EMAIL PROTECTED] wrote: On 2/14/06, Mark Lowe [EMAIL PROTECTED] wrote: You could use the referer header to create an action forward based on that value. referer

Another struts design question

2006-02-14 Thread Keith Sader
Greetings, I need to have an action return to a previous page depending upon which page originally requested the common page. Think of it as a settings page that can be accessed from multiple places. Like this: Entry 1 --- Common Page Entry 2 How can I tell the common page action to return

Re: Another struts design question

2006-02-14 Thread Mark Lowe
You could use the referer header to create an action forward based on that value. String referer = request.getHeader(Referer); URL url = new URL(referer); String path = url.getPath(); String contextPath = request.getContextPath(); path = path.replaceFirst(contextPath,); return new

Re: Another struts design question

2006-02-14 Thread Keith Sader
That could work, and it would scale to n input pages. Thanks Mark! On 2/14/06, Mark Lowe [EMAIL PROTECTED] wrote: You could use the referer header to create an action forward based on that value. String referer = request.getHeader(Referer); URL url = new URL(referer); String path =

Re: Another struts design question

2006-02-14 Thread [EMAIL PROTECTED]
: Tue, 14 Feb 2006 08:04:15 -0600 Subject: Re: Another struts design question That could work, and it would scale to n input pages.Thanks Mark!On 2/14/06, Mark Lowe [EMAIL PROTECTED] wrote: You could use the referer header to create an action forward based on that value. String referer

Re: Another struts design question

2006-02-14 Thread Dave Newton
[EMAIL PROTECTED] wrote: As long as you are arriving at the settings page via an action, can't you just call the getInputForward() -- the method that the validate stuff calls to return to the starting page if there were errors; this seems like it would easily work. If you aren't

Re: Another struts design question

2006-02-14 Thread Michael Jouravlev
On 2/14/06, Mark Lowe [EMAIL PROTECTED] wrote: You could use the referer header to create an action forward based on that value. referer field is unreliable. Can fail depending on your mix or forwarding/redirecting/reloading a page. It is also often removed by proxies/firewalls. I would not

Re: Another struts design question

2006-02-14 Thread Mark Lowe
On 2/14/06, Michael Jouravlev [EMAIL PROTECTED] wrote: On 2/14/06, Mark Lowe [EMAIL PROTECTED] wrote: You could use the referer header to create an action forward based on that value. referer field is unreliable. Can fail depending on your mix or forwarding/redirecting/reloading a page. It

Re: Another struts design question

2006-02-14 Thread Rick Reumann
Mark Lowe wrote the following on 2/14/2006 2:32 PM: The only other suggestion i would make if this were an issue is use separate action mappings for each point of entry.. Actually that seems pretty clean to me. Even if he has a lot of points of entry it can't be that many. Or another option

Re: Another struts design question

2006-02-14 Thread Michael Jouravlev
On 2/14/06, Rick Reumann [EMAIL PROTECTED] wrote: In the action just look for some param like fromPage and key off of that for your return. (Of course a drawback is you'll need to remember to set this var on the pages that need it - of course there are ways you could simplify that even, if

Re: Another struts design question

2006-02-14 Thread Mark Lowe
On 2/14/06, Rick Reumann [EMAIL PROTECTED] wrote: Mark Lowe wrote the following on 2/14/2006 2:32 PM: The only other suggestion i would make if this were an issue is use separate action mappings for each point of entry.. Actually that seems pretty clean to me. Even if he has a lot of

Re: Another struts design question

2006-02-14 Thread Frank W. Zammetti
Michael Jouravlev wrote: On 2/14/06, Rick Reumann [EMAIL PROTECTED] wrote: In the action just look for some param like fromPage and key off of that for your return. (Of course a drawback is you'll need to remember to set this var on the pages that need it - of course there are ways you could

Re: Another struts design question

2006-02-14 Thread Lixin Chu
ok, I let page A or B pass a returnURL to page C who keeps it in the session scoped actionForm. On 2/15/06, Frank W. Zammetti [EMAIL PROTECTED] wrote: Michael Jouravlev wrote: On 2/14/06, Rick Reumann [EMAIL PROTECTED] wrote: In the action just look for some param like fromPage and key