title: i have wriiten a logout code in welcome.scala.html page but getting errors in that page how can i write the code for it
body: <p><a href="https://i.stack.imgur.com/Ts0td.png" rel="nofollow noreferrer">localhost</a> <a href="https://i.stack.imgur.com/Xg8Nv.png" rel="nofollow noreferrer">sbt</a></p>
  
  <p>Cannot use a method returning play.api.mvc.ActionBuilder[play.api.mvc.Request,play.api.mvc.AnyContent] as a Handler for requests</p>
  
  <p>I am trying to come back to the <code>index.scala.html</code> page after clicking on the logout button in <code>welcome.scala.html</code> but its showing a compilation error while executing.</p>
  
  <p><strong>This is the <code>welcome.scala.html</code> page:</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
  welcome to homepage
          &lt;a href="@routes.HomeController.logout()"&gt;
          &lt;input type="submit" value="Logout"&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>This is the <code>index.scala.html</code> page:</strong></p>
  
  <pre><code>@main("Welcome to Play") {
  }
  &lt;html&gt;
      &lt;body&gt;
          username&lt;input type="text" name="uname"&gt;
          password&lt;input type="password" name="pword"&gt;
          &lt;a href="@routes.HomeController.welcome()"&gt;
              &lt;div class="my-button"&gt;Submit&lt;/div&gt;
          &lt;/a&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>This is <code>HomeController</code>:</strong></p>
  
  <pre><code>@Singleton
  class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
      def index = Action {
          Ok(views.html.index())
      }
      def welcome = Action
      {
          Ok(views.html.welcome())
      }
      def logout = Action
      {
          Ok(views.html.index())
      }
  }
  </code></pre>
  
  <p><strong>This is the <code>routes</code> file:</strong></p>
  
  <pre><code>GET     /                                 controllers.HomeController.index
  GET     /welcome                          controllers.HomeController.welcome
  GET     /logout                           controllers.HomeController.logout
  
  
  
  
  this is main.scala.html code
  
  
  @(title: String)(content: Html)
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;title&gt;@title&lt;/title&gt;
  &lt;link rel="stylesheet"media="screen"href="@routes.Assets.versioned("stylesheets/main.css")"&gt;
   &lt;link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")"&gt;
  &lt;script src="@routes.Assets.versioned("javascripts/hello.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  @content
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  got this error after editing the routes page
  Cannot use a method returning play.api.mvc.ActionBuilder[play.api.mvc.Request,play.api.mvc.AnyContent] as a Handler for requests
  </code></pre>