I need to create a website which is working in both pc and mobiles and i am doing this project in struts2. I need to redirect user to another namespace like "www.website.com/mobile" when a user trying to access the website "www.website.com" by using the mobile. If a user access any page may be the inner pages, i need to add an extra namespace like "mobile" if the device is mobile. Is there any method?
Asked
Active
Viewed 972 times
0
-
use request header to find user-aagent – Umesh Awasthi May 01 '12 at 17:02
1 Answers
0
I recommend you to write a interceptor which will take care of identifying what kind of device accessing the resource you can identify it by request headers. And consider this scenario even if the smart user tamper the url you interceptor should correct it. You can consider using the framework
And for further details How do i detect mobile clients on my webserver

Community
- 1
- 1

MohanaRao SV
- 1,117
- 1
- 8
- 22