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 8243203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:26:06+00:00 2026-06-07T21:26:06+00:00

I know play can match /something/{id}. What we want is a bit more complex

  • 0

I know play can match /something/{id}. What we want is a bit more complex as I may port a prototype to play as I really like the ability for the asynchronous stuff.

We have urls like so

/services/<moduleA>/<moduleB>/....

and what I really want is a pattern like this

/services/{capture-all-of the modules}

In the existing system, there would be 10 modules, and could be 3, but the client decides how to wire modules together and the data coming back is piped through each module based on that url. Is there any potential for doing this in the playframework?

thanks,
Dean

  • 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-06-07T21:26:07+00:00Added an answer on June 7, 2026 at 9:26 pm

    You can capture all URL starting with /services/ and create your own requestDispatcher (not tested) :

    //routes
    GET     /services/*toBeRouted    controllers.Dispatcher.dispatch(toBeRouted: String)
    
    //Dispatcher object
    def dispatch(toBeRouted: String) = Action { implicit request => 
        toBeRouted.split("/") match {
            case Nil => BadRequest(views.html.default.wrongModule())
            case _ => {
                ...//Route to the right controller
            }
        }
    }
    

    Important: rule for path spanning several slashes must be with asterisk not colon: *toBeRouted

    You can go a bit further to only capture valid patterns in your routes file using regexp

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

Sidebar

Related Questions

I want to know how many games my computer can play in 1000 ms.
Does anybody know of a plug-and-play login system that supports existing logins like Google
I would like to know if it is possible to create something like Picture
I know the iPhone can play video on an external screen if you have
I'm developing a board game and would like to know how i can use
I really like Play and it adresses all the problems I had when develpoing
I want to make a music player, it can play music and appear music
So for example: I have file.mp3, I know that my desired format can play
I don't have any prior experience with Selenium/WebDriver tests. I know that Play supports
Anyone know of a good book on Game Interface Design (not game play mechanics;

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.