Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.
This repository was archived by the owner on Apr 4, 2026. It is now read-only.

run war file on tomcat 8 #313

Description

@kushNumberTheory

HI i have made rest api in scala using play framework. My Routes files include"

 GET     /                           controllers.Application.index 

 GET     /assets/*file                controllers.Assets.at(path="/public", file)
 
 POST   /createfile                @controllers.scala.CaffeOnSpark.FileCreation

Now I added Play2War in my 2.4.1 Play framework. My Build.sbt include

name := "NT_CAFFE"
version := "1.0"
scalaVersion := "2.11.7"
lazy val `NT_CAFFE` = (project in file(".")).enablePlugins(PlayScala)
libraryDependencies ++= Seq( jdbc , cache , ws   , specs2 % Test )
crossScalaVersions := Seq("2.10.4", "2.11.0", "2.11.1", "2.11.7")

My Plugins.sbt includes

logLevel := Level.Warn
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.2")
addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "1.4.0")

In play framework , we dont need web.xml. Routes does all the work.
i am able to build war file.. but it includes only lib folder..i mean no classes are there. I copy pasted it in the webapps folder of tomcat and deployed it. But it gives me Action Not found error. Please can you help me with this. What am i missing ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions