You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frans Thamura <fr...@meruvian.org> on 2011/09/12 18:00:24 UTC

implementation of m. and www.

hi all

i have 3 container,

1. www using jquery common
2. m. using jquery mobile
3. REST API


for 1 and 2, i try to implement a same URI for both

this is an exanple

http://www.mervpolis.com/profile/fthamura
http://m.mervpolis.com/profile/fthamura

i want if the user access using mobile, and click www from email, will
be redirect to the m. URL

and also if we click m. in PC/notebook browser, will redirect to www.

question
1. is there implementation that u can share, if we wanna to implement
under one container (.war) for both.

2. if we implement 2 containers.

for the REST API, we dont have problem. esp the security
implementation, we still want to know the REST implementation with the
both case no. 1 and no. 2 which we use jquery both, and i am glad if
we can make JQuery consume JSON from REST API of Struts

this is the case

server -> JSON -> jquery for www
server -> JSON -> jquery mobile for m.

which the interceptor for redirector

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: implementation of m. and www.

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
We use a simple interceptor which reads to request URL and sets some base
action flags which we then use use with sitemesh to determine template
structure.

The benefit of an interceptor is that you only make any changes centrally.

Z.


On 13/09/11 2:00 AM, "Frans Thamura" <fr...@meruvian.org> wrote:

>hi all
>
>i have 3 container,
>
>1. www using jquery common
>2. m. using jquery mobile
>3. REST API
>
>
>for 1 and 2, i try to implement a same URI for both
>
>this is an exanple
>
>http://www.mervpolis.com/profile/fthamura
>http://m.mervpolis.com/profile/fthamura
>
>i want if the user access using mobile, and click www from email, will
>be redirect to the m. URL
>
>and also if we click m. in PC/notebook browser, will redirect to www.
>
>question
>1. is there implementation that u can share, if we wanna to implement
>under one container (.war) for both.
>
>2. if we implement 2 containers.
>
>for the REST API, we dont have problem. esp the security
>implementation, we still want to know the REST implementation with the
>both case no. 1 and no. 2 which we use jquery both, and i am glad if
>we can make JQuery consume JSON from REST API of Struts
>
>this is the case
>
>server -> JSON -> jquery for www
>server -> JSON -> jquery mobile for m.
>
>which the interceptor for redirector
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org