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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:40:40+00:00 2026-06-06T05:40:40+00:00

this is my code where i need to retrieve data sent in POST: @play.db.jpa.Transactional

  • 0

this is my code where i need to retrieve data sent in POST:

@play.db.jpa.Transactional
public static Result registered(String fullname, String email, String password, String username) {
    if(fullname.isEmpty()){
        return badRequest("<p>fehlerhafte eingabe!</p>").as("text/html");
    } else {
    User user = new User();
        user.fullname = fullname;
        user.email = email;
        user.password = password;
        user.username = username;
        user.save();

    }

    String success = "Successful registered!";
    return ok(register.render(success));

}

and this is my user class:

public class User extends Model {
private static final long serialVersionUID = 1L;
public String fullname;
@Email
public String email;
@Required(message="Username erforderlich!")
public String username;
@Transient @Required
public String password;

public User(){}

public User(String username, String password, String fullname, String email) {
    this.username = username;
    this.password = password;
    this.email = email;
    this.fullname = fullname;
    }

and this is my html:

    <form method="post" action="@routes.Application.registered()">
            <p id="login_panel">@success</p>
            fullname: <input type="text" name="fullname" id="fullname" value=""/>
            email: <input type="text" name="email" id="email" value=""/>
            username: <input type="text" name="username" id="username" value=""/>
            password: <input type="password" name="password" id="password" value=""/>
            <button type="submit">Register</button>
   </form>

and this is in my routes:

POST     /registered                controllers.Application.registered()   

What is WSRequest? can this be the clue for my problem?

i appreciate any help! thanks thanks

  • 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-06T05:40:41+00:00Added an answer on June 6, 2026 at 5:40 am

    You need to check the controller class code. You should have all field names as parameter in the called controller method. Then you can use these filed in your application.

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

Sidebar

Related Questions

Hi i need send file to server i use this code public void PostFile()
I need to retrieve data via cross-domain XMLHttpRequest. To make this work in (almost)
I have this code and I need to make this work: if ($handle =
I have got this code and I need to access somehow Button and call
I need to change this code to cpp code This is the c# code
Kind of need help understanding what this code actually outputs. Does it out put
This code changes bg color only once. What do I need to add to
i have this code, and need help with the logic end. I would like
I need help with Google Maps Polyline I just downloaded this code ( just
I need a quick hand figuring out what this code is doing, and how

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.