Atul Kumar
Atul Kumar

Reputation: 75

play.libs.WS not recognized in Play framework

I am using play.libs.WS in my application, but whenever I compile I get error that play.libs.WS is not resolved. Can someone please help me out in this?

Upvotes: 1

Views: 2508

Answers (3)

ctomek
ctomek

Reputation: 1786

You don't have to add jars manually one by one.

From docs:

To use WS, first add javaWs to your build.sbt file:

libraryDependencies ++= Seq(
  javaWs
)

And that's all.

Upvotes: 3

Atul Kumar
Atul Kumar

Reputation: 75

Solved the issue. I had to include play_2.10.jar and play-datacommons_2.10.jar in my classpath. Thanks everyone for devoting your time.

Upvotes: 3

S.Karthik
S.Karthik

Reputation: 1389

try the following imports in your controller

import play.api.libs.ws.WS and import play.api.libs.ws._

Upvotes: 0

Related Questions