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

  • Home
  • SEARCH
  • 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 8787659
In Process

The Archive Base Latest Questions

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

I am trying to implement a web application using play framework as a replacement

  • 0

I am trying to implement a web application using play framework as a replacement for old http server implementation that is interfacing the old non-browser legacy http client.

That client is written in Delphi and it is posting data directly in the body of a request with some header information about it.

I thought I would get something in

request.body /* In the play controller */

but nothing is there.

See the code below:

public static void uploadPicture() {

        InputStream data = request.body;
    String fx = Play.getFile("").getAbsolutePath()+File.separator+"uploads"+File.separator+"test.jpg";
        File f = new File(fx);
        FileOutputStream moveTo = new FileOutputStream(fx);
        try {
                byte[] b = new byte[4096];
                for (int x = 0; (data.read(b)) != -1;){
                    moveTo.write(b, 0, x);
            }
        } finally{
            moveTo.close();
        }

    } 

EDIT:
To clarify my point : I went and I created a simple Dynamic Web Project in eclipse HttpServlet and in doPost() method when I get the request.getInputStream() it contains the file that is sent from the legacy client.

Play is doing something to the body of the request!?

What are my options?

Thanks.

Irfan

  • 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-13T21:56:44+00:00Added an answer on June 13, 2026 at 9:56 pm

    Ok, it was a bug in Play 1.2.4. I installed latest version 1.2.5 and everything works out of the box.

    You can access raw body of a request in request.body in the controller.

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

Sidebar

Related Questions

I am trying to implement Riot CMS to my Spring-java web application using http://www.riotfamily.org/docs/quickstart.html
I'm running a web app in Jboss application server and I'm trying to implement
I am trying to implement recoemmender code in java dynamic web application using direct
I'm trying to implement a simple web application server as a personal project to
Background I am trying to implement a RESTful web service using Apache-CXF that interacts
I am trying to develop a web application using ASP.net MVC 2. For that
I'm trying to implement OpenId login for a web application. Whenever new user who
I am trying to implement web services that use different security mechanisms to do
I'm trying to implement this web api autocomplete in a standard mvc app. http://techbrij.com/987/jquery-ui-autocomplete-asp-net-web-api
I am trying to implement a web service that uses open JPA to access

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.