[error][not found: type Session] when trying to get access session value in scala.html

Hi,
I am using Play 2.8, have switched from Play 2.6 recently.

I and geting an error when in Play 2.8 when i try to access session or flash in my template (scala.html).
I have a basic action written in controller.

Controller=======>

public Result exp() {
        Http.Session session = new Http.Session().adding("error","This is " +
                "error.");
        return ok(views.html.exp.render()).withSession(session);
}

With a basic scala.html
Html========>

@()(implicit session: Session)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Experiment Page</title>
</head>
<body>
@if(session.get("error")contains("This is error.")){
<p>this is session.</p>
<p>@session.get("error")</p>
}else{
<p>Does Not Contain Flash.</p>
}
</body>
</html>

==========================

when I compile, this error comes:

[info] Compiling 13 Scala sources and 54 Java sources to F:\IdeaBlock\highcourt_project\highcourt\target\scala-2.13\classes ...
[error] F:\IdeaBlock\highcourt_project\highcourt\app\views\exp.scala.html:1:1: not found: type Session
[error] @()(implicit session: Session)
[error] ^
[error] F:\IdeaBlock\highcourt_project\highcourt\app\views\exp.scala.html:1:23: not found: type Session
[error] @()(implicit session: Session)
[error]                       ^
[error] F:\IdeaBlock\highcourt_project\highcourt\app\views\exp.scala.html:17:8: not found: type Session
[error] </html>
[error]        ^
[error] three errors found.

I have to pass the Session object explicitly in views.html.exp.render() to make it work.
But this isnt the correct way as it makes my scala.html and controller tightly coupled. Also passing Flash object explicitly defeats the purpose when i also have to pass it in response as: Results.ok(“Some String/ HTML”).withFlash(flash);