Comments (4)
Could not verify using 2.1.3-RC1:
➜ play 2.1.3-RC1 cd project
➜ project ../play run
Getting org.scala-sbt sbt 0.12.2 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
40 artifacts copied, 0 already retrieved (8381kB/217ms)
[info] Loading global plugins from /Users/wsargent/.sbt/plugins
[info] Updating {file:/Users/wsargent/.sbt/plugins/}default-a96b95...
[info] Resolving org.scala-sbt#precompiled-2_10_0;0.12.2 ...
[info] downloading http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.9.2_0.12/1.4.0/sbt-idea-1.4.0.jar ...
[info] [SUCCESSFUL ] com.github.mpeltonen#sbt-idea;1.4.0!sbt-idea.jar (270ms)
[info] downloading http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/name.heikoseeberger/sbt-groll/scala_2.9.2/sbt_0.12/1.5.0/jars/sbt-groll.jar ...
[info] [SUCCESSFUL ] name.heikoseeberger#sbt-groll;1.5.0!sbt-groll.jar (662ms)
[info] Done updating.
[info] Loading project definition from /Users/wsargent/play 2.1.3-RC1/project/project
[info] Set current project to project (in build file:/Users/wsargent/play%202.1.3-RC1/project/)
Getting Scala 2.10.0 ...
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24106kB/110ms)
[info] Updating {file:/Users/wsargent/play%202.1.3-RC1/project/}project...
[info] Done updating.
Cannot load the JNotify native library (/Users/wsargent/play%202.1.3-RC1/repository/local/net.contentobjects.jnotify/jnotify/0.94/jars/jnotify.jar (No such file or directory))
Play will check file changes for each request, so expect degraded reloading performace.
--- (Running the application from SBT, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[info] Compiling 5 Scala sources and 1 Java source to /Users/wsargent/play 2.1.3-RC1/project/target/scala-2.10/classes...
[info] play - Application started (Dev)
Output of curl:
➜ ~ curl localhost:9000
<title>Welcome to Play 2.1</title> <script src="/assets/javascripts/jquery-1.9.0.min.js" type="text/javascript"></script>Your new application is ready.
Browse APIs Select language Scala JavaWelcome to Play 2.1
Congratulations, you’ve just created a new Play application. This page will help you with the few next steps.
You’re using Play 2.1.3-RC1
Why do you see this page?
The conf/routes
file defines a route that tells Play to invoke the Application.index
action whenever a browser requests the /
URI using the GET method:
# Home page
GET / controllers.Application.index
Play has invoked the controllers.Application.index
method to obtain the Action
to execute:
def index = Action {
Ok(views.html.index("Your new application is ready!"))
}
An action is a function that handles the incoming HTTP request, and returns the HTTP result to send back to the web client.
Here we send a 200 OK
response, using a template to fill its content.
The template is defined in the app/views/index.scala.html
file and compiled as a Scala function.
@(message: String)
@main("Welcome to Play 2.1") {
@play20.welcome(message)
}
The first line of the template defines the function signature. Here it just takes a single String
parameter.
This template then calls another function defined in app/views/main.scala.html
, which displays the HTML layout, and another
function that displays this welcome message. You can freely add any HTML fragment mixed with Scala code in this file.
Is this your first time?
You can now continue with the first tutorial, which will guide you through the basics of creating a Play 2.1 application.
Need to set up an IDE?
You can start hacking your application right now using any text editor. Any changes will be automatically reloaded at each page refresh, including modifications made to Scala source files.
If you want to set-up your application in Eclipse or any other Scala IDE, check the Setting up your preferred IDE page.
Need to connect to a database?
You can quickly set-up a development database (either in-memory or written to the file system),
by adding these lines to the conf/application.conf
file:
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"
If you need to connect to another JDBC-compliant database, first add the corresponding driver library to your application dependencies:
val appDependencies = Seq(
"mysql" % "mysql-connector-java" % "5.1.18"
)
Then add the corresponding JDBC configuration to the conf/application.conf
file:
db.url=jdbc:mysql:database_name
db.driver=org.mysql.Driver
db.user=root
db.pass=secret
Need more help?
When your application is run from the Play console, you can access the current documentation directly, at the /@documentation URL or go to http://www.playframework.org.
The Play Google Group is where Play users come to seek help, announce projects, and discuss issues and new features. If you don’t have a Google account, you can still join the mailing list by sending an e-mail to [email protected].
Browse
Start here
</body>
from playframework.
So, the original bug is fixed, but there is a new directory:
play%202.1.3-RC1/repository
So when the system downloads new files into the local repository, it doesn't use the original directory path -- instead it uses a URL encoded string.
from playframework.
Can anyone verify this with Play 2.2.x?
from playframework.
Closing, as Play no longer uses its own repository, but uses the default SBT repository.
from playframework.
Related Issues (20)
- Requests with Large POST Body Immediately Goes into Delay Cancellation Right After the Server Received the Request HOT 6
- Caffeine cache API has inconsistent behavior with differing types and between sync/async HOT 1
- play hangs on console interacton when using jblas library HOT 4
- 2.9 with Scala 2.13 not supporting pack4j 6.00 dependency :Jackson Data-bind 2.15.x
- Documentation spelling fix HOT 3
- Scala 3.3.2: class file ... is broken, reading aborted with `class java.util.NoSuchElementException` `contextual$` HOT 9
- Replace `3.0.x` with next version HOT 5
- SSL certificate for www.playframework.com is expired HOT 2
- Search in documentation does not work HOT 1
- Support for Partitioned cookie attribute (AKA CHIPS) / make cookies more flexibel HOT 1
- Asset changes in subprojects HOT 2
- Recommend Scala Metals + VSCode as an IDE on this page: https://www.playframework.com/documentation/2.9.x/IDE HOT 1
- Timeout issue when using AsyncCacheApi and custom http filter HOT 2
- [2.8.20] CVE-2023-44487 in akka-http-core HOT 1
- Support for Application Secret rotation
- play 2.9 is trying to fetch guice-6.0.0-no_aop jar, caused not found error HOT 6
- Play gradle plugin fails to create playRun task when no compileScala task found in a project
- Dependency Dashboard
- Apache Pekko doesn't support autogenerated TLS certs HOT 1
- Application secret from env variable does not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playframework.