java - Session inside Model in play framework -


I have in my model

  package model; Import *; Import.data.validation Import. *; Import.db.jpa. *; Import Libs *; Import com.google.gson.JsonObject; Import javax.preistence *; Import java.util. *; Import play.mvc *; Public class user model {increases the public static zero facebookOAuthCallback (JsonObject data) {string email = data. Get ("email"). GetAsString (); Println (email); If (email! = Null) {session session = new session (); Session.put ("user", user.email); }}}   

When this action operation is poor, then it can not be resolved in the session type whether I am doing wrong: (< / P>

Thank you in advance

Have you not tried putting this code into your model Instead of putting it into its controller, the session is a controller concept, and I do not think it is a good idea by mixing it with your model.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -