Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6977959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:41:37+00:00 2026-05-27T17:41:37+00:00

Right now we are working on a project that will have a desktop and

  • 0

Right now we are working on a project that will have a desktop and a mobile version of the site, created in Spring. We want the mobile and the desktop version to share the same Spring security system etc.

We are using Spring mobile to detect whether or not the device is mobile, and may possibly use the Spring site preference parameter.

We dont want to use the spring mobile redirector, as this appears to redirect to another domain (eg m.website.com), and would not use the same spring security easily.

So I am thinkin gof using a HandlerInterceptor to redirect to a specfic directory within the site – eg “/jsp/mobile/”.

1) Is it possible in this extended HandlerInterceptor to use the Spring Mobile device detector in the preHandle method?

2) What is the best way to redirect? Is it a) to just use the http response, or b) to somehow change the viewResolver and change the prefix from “/jsp/” to “/jsp/mobile/”

Sorry for the long winded question, but I hoped to put as much info in as possible about what we are trying to do!

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:41:37+00:00Added an answer on May 27, 2026 at 5:41 pm

    I am currently using a HandlerInterceptor in the pre handler method makes the assessment of whether or not the application is a mobile device, if coming from a mobile device, through the method requestUri get current address and places as prefix “m” after the name of the application context. Then do a redirect:

    response.sendRedirect(“/application/m/…..”) ( documentation )

    Example

    /application/user           //recived
    /application/m/user         //sent
    

    The problem is that this interceptor intercepts all requests, therefore it is necessary to assess the following:

    1. if the request comes with a path like “/application/m/…..” not verify that comes from a mobile device, because the “m” and says it does me

    2. if you let spring handle static resources, the interceptor must not redirect if the requests come from a mobile device (the mobile version and the normal share these resources)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a jQuery project right now that will essentially dump a bunch
In the .net 3.5 project that I am working on right now, I was
I am working on a project right now that involves receiving a message from
Right now a project I'm working on has reached a level of complexity that
Right now I'm working on a project that extensively uses 64bit unsigned integers in
I have a very large project that uses Oracle ODP.NET. Right now it is
Right now I am working on a project that issues IDs consisting of both
Right now I am working on a stub of a project. In the course
I'm working on a project right now in which I need to automate animated
I'm working on a Flash project right now and I am having to force

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.