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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:06:56+00:00 2026-06-16T21:06:56+00:00

This post from a while back: RESTful on Play! framework Illustrated a very elegant

  • 0

This post from a while back:
RESTful on Play! framework
Illustrated a very elegant approach to designing RESTful Web Services on Play! 1.x with Java.

I am working with Play! v2 and am wondering how easy it is to migrate this approach to the new version. Right off the bat I see that the render method doesn’t exist anymore, so I was wondering if any major architecture changes in the framework prevent this process from being used.

This post:
Play 2.0 RESTful request post-processing
illustrates some of the 2.0 based processing, but it is done in Scala and I am having a devil of a time parsing through it

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

    Whole process in Play 2.0 will be VERY similar the only small differences will be in the syntax, take a look into the documentation .

    routes

    # REST actions
    GET     /user/:id    controllers.Rest.user(id: Int)
    POST    /user        controllers.Rest.createUser
    PUT     /user/:id    controllers.Rest.updateUser(id: Int)
    DELETE  /user/:id    controllers.Rest.deleteUser(id: Int)
    

    Edit:

    Of course you can use Accept header instead of format parameter, however param is just… easier to set. You can also use ie. user.scala.xml name for the view, and in the controller render it with: return ok(views.xml.user.render(user).body());

    I published that sample on the GitHub with some fixes, so you can try it yourself: play-simple-rest

    Note that you need to keep Rest.java controller (and its routes) while everything in Application is just for displaying and demonstration (ie making GET/POST/PUT/DELETE calls in controllers).

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

Sidebar

Related Questions

While browsing I came across this blog post about using the Wikipedia API from
SO I post this json to this restful web service and the post is
Getting an error while trying to consume a Restful web service using POST method(with
From this post : I would first suggest that you optimize your dependentObservable (a.k.a.
All are from this post . What does these statement mean: error(nargchk(5, 6, nargin));
I have learnt from this post that always use <a> tags or <button> tags
This is a separate question stemming from this post: How to use the filename
I need to do the same thing from this post Pop Images like Google
I've seen a plugin for Vim called AutoClose (discovered from this post) which automatically
I've installed NVM for node.js using the instructions from this post: http://www.backdrifter.com/2011/02/18/using-nvm-and-npm-to-manage-node-js/ When I

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.