Is it a way to render a pure html file with play framework version 2? I don't want to put it in public/ folder because later on there will be some dynamic information added to it.
相关问题
- PlayFramework: how to transform each element of a
- Could not import the newly generated play framewor
- Play Framework Unicode symbols in HTTP Header
- Play framework 2 : How to pass object between rout
- Putting output of 'git describe' in templa
相关文章
- how to set H2 primary key id to auto_increment?
- Testing request with CSRF Token in Play framework
- How to map an abstract collection with jpa?
- Build maven project as a part of SBT build
- play2 framework my template is not seen. : package
- How does @Inject in Scala work
- play framework 2.0 - unexpected exception - Key No
- Error integration fingerprint U.are.U SDK with jav
Of course, put your whole static html ie. in
index.scala.html
and use simplest possible way:That are the basics, you should go trough Play's documentation and samples
Here is my solution:
in routes: I do some configurations as following.
and then the file structure is as below:
for hello.html , here is its content.
After these three steps, you can use outside HTML directly. No need to follow Play template to do front-end development work. So now, Play only is responsible for back-end. Front-end developer only needs to operate this public file to do development.
GET / controllers.Assets.at(path="/public/html", file="index.html")
This is working in my case with play 2.0.1. Hierarchy is public - html ---index.html