Changing The Result Page

2011-02-01 Thread Richard Sayre
I am making a mobile site for my current web application. I have a huge number of actions that return to JSP pages. I have a mobile detection class written. Is there a way that I can change the result page if the user is on a mobile device? I want to avoid having to write this in all my

Re: Changing The Result Page

2011-02-01 Thread Dave Newton
Interceptor w/ pre-result listener? Dave On Tue, Feb 1, 2011 at 12:50 PM, Richard Sayre richardsa...@gmail.comwrote: I am making a mobile site for my current web application. I have a huge number of actions that return to JSP pages. I have a mobile detection class written. Is there a way

Re: Changing The Result Page

2011-02-01 Thread Greg Lindholm
You could also add a btype (browser type) macro to your jsp paths like this... result/struts2/${btype}/Profile.jsp/result Your actions would have to have a getBtype() method that supplied that portion of the path. This assumes you keep the mobile jsp pages in a separate directory then the

Re: Changing The Result Page

2011-02-01 Thread stanlick
Have you considered Sitemesh? On Tue, Feb 1, 2011 at 11:50 AM, Richard Sayre richardsa...@gmail.comwrote: I am making a mobile site for my current web application. I have a huge number of actions that return to JSP pages. I have a mobile detection class written. Is there a way that I can

Re: Changing The Result Page

2011-02-01 Thread Chris Pratt
To extend on this idea, instead of requiring all your actions to add a getBtype(), you could use an interceptor that determine's the Browser Type and sets a context attribute you could access using: result/${#btype}/Profile.jsp/result (*Chris*) On Tue, Feb 1, 2011 at 10:36 AM, Greg Lindholm

Re: Changing The Result Page

2011-02-01 Thread Richard Sayre
This looks like a good Idea. I will test it and Dave N's suggestion as well. Thank you All On Tue, Feb 1, 2011 at 3:14 PM, Chris Pratt thechrispr...@gmail.com wrote: To extend on this idea, instead of requiring all your actions to add a getBtype(), you could use an interceptor that