diff --git a/Play2.5.md b/Play2.5.md new file mode 100644 index 0000000..89dd477 --- /dev/null +++ b/Play2.5.md @@ -0,0 +1,39 @@ +# Play2.5.4 + +## Environment +play 2.5.4 +scala 2.11 +tomcat 8.0 +servlet 3.1 + +## Build +cd project-code +sbt clean +sbt -Dplay2war.sbt.scala211 -Dplay2.version=2.5.4 publishLocal + +## Project Usage +- Modify {ProjectHome}/project/plugins.sbt + +``` +addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "1.5-beta1-SNAPSHOT") + +``` + +- Modify {ProjectHome}/build.sbt + +``` +import com.github.play2war.plugin._ + +Play2WarPlugin.play2WarSettings +Play2WarKeys.servletVersion := "3.1" +Play2WarKeys.explodedJar := true + +``` + +- Package + +``` +activator war + +``` + diff --git a/project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala b/project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala index 7adfa49..75b256e 100644 --- a/project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala +++ b/project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala @@ -165,7 +165,7 @@ trait HttpServletRequestHandler extends RequestHandler { // if (withContentLength || chunked) { val flow = body.dataStream.map { f ⇒ getHttpResponse().getRichOutputStream.foreach { os ⇒ - os.write(f.asByteBuffer.array()) + os.write(f.toArray) os.flush() } } @@ -176,7 +176,7 @@ trait HttpServletRequestHandler extends RequestHandler { // cleanup() onHttpResponseComplete() case Failure(ex) => - Logger("play").debug(ex.toString) + Logger("play").error(ex.toString, ex) onHttpResponseComplete() } // } else { diff --git a/project-code/project/plugins.sbt b/project-code/project/plugins.sbt index d84a16b..cb73052 100644 --- a/project-code/project/plugins.sbt +++ b/project-code/project/plugins.sbt @@ -6,4 +6,6 @@ resolvers += Resolver.typesafeRepo("releases") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.3.2") -addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") \ No newline at end of file +addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") + +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")