Carol.Kar
Carol.Kar

Reputation: 5205

Embed static HTML page in play 2.2.1

I want to display a static html page embedded into a play 2.2.1 project.

I have created a play 2.2.1 project.

I have put my whole static html files with its assets(js, css, img ect.) into the public folder of play.

enter image description here

I also have deleted the precreated controller and views packages.

My routing file looks the following:

GET  /comingSoon.html   controllers.Assets.at(path="/public", file="comingSoon.html")

However, when I go to http://localhost:9000/ I get:

enter image description here

I really appreciate your help!

Upvotes: 1

Views: 250

Answers (1)

biesior
biesior

Reputation: 55798

Hm, I don't get it, actually Play told you that you didn't create any route for path / ;)

just add this route:

GET   /   controllers.Assets.at(path="/public", file="comingSoon.html")

Upvotes: 2

Related Questions