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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:04:37+00:00 2026-05-30T22:04:37+00:00

I am writing application on playframework. I have a search form and I want

  • 0

I am writing application on playframework. I have a search form and I want to send POST request and be able to accept it in my controller, how this is possible?

  • 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-30T22:04:38+00:00Added an answer on May 30, 2026 at 10:04 pm

    There Many samples for it, First Add a method login in your Application (or whatever) controller.

    Lets assume your posting login details for your controller.

    public static void  login(String userCode,String password){        
        User loginUser = User.find("byUserCodeAndPassword",userCode,password).first();
        if(loginUser == null){
            flash.put("username",userCode);
            flash.error("Invalid Credentials");
            index();
        }
        else{
            Cache.set(session.getId(),loginUser,"20mn");
            Home.Home();
        }
    }
    

    In your conf/routes file add

        POST    /                                       Application.login
    

    Assuming you have a index.html in your app/views/Application folder.

    From the Html Page:

    <div id="login">
    #{form @login(), id:'formLogin'}
    <p class="field">
        <label>User Code:</label>
        <input type="text"  name="userCode" size="19" value="${flash.userCode}" required>
     </p>
    
    <p class="field">
        <label>Password:</label>
        &nbsp;<input type="password" name="password" size="19" required>
    </p>
    <p class="buttons">
        <input type="submit" value="Login">
    </p>
    #{/form}
    

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

Sidebar

Related Questions

I am writing application (.NET 4.0) that should do post-request to SalesForce to submit
I am writing application with asp.net mvc. I have controller with action, which use
I'm writing Playframework 2.0 application using Scala and Anorm to access db. Currently I'm
I am writing application in Linux using C, pthreads and sockets. This will be
Im writing an application that supposed to send coordinates in an SMS, but I've
im writing application on asp mvc. so, i have jQuery tabs on index.aspx, which
I am writing an application that is accepting POST data from a third party
I have followed a tutorial to create a simple blog writing application in PHP
I writing an application where i use an array within a class. This array
I am writing application using c++, in windows. I want to get a thumbnail

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.