> // After above WS call, I want this view page to be displayed. The 
control must not go back to "Ok"

and

> fire and forget


won't work (both principles exclude each other).


Whats your goal? Display the output of the netBankingPage action in the 
index action or do some work in the background?
Are you sure you understand the http request response model? An actor in 
the background can't send a http response with "fire and forget". 


On Friday, September 12, 2014 4:19:48 PM UTC+2, jitendra shelar wrote:
>
> Thanks Konrad.
> I am trying with ! (tell).
>
> *Playframework Code:*
> import play.api._
> import play.api.mvc._
> import akka.actor.{ActorSystem, Actor, ActorRef,Props}
> import scala.concurrent.duration._
> import play.api.libs.ws.WS
>
> class HelloActor extends Actor {
>  
>   def receive = {
>     case "hello" => println("Hello message called")
>     case "netBanking"  => 
>       {
>          println("NetBanking called..")
>          WS.url("http://localhost:9000/netBakingPage";).get       
> // After above WS call, I want this view page to be displayed. The control 
> must not go back to "Ok"
>          println("Get called successfully...")
>       }
>   }
> }
>
>
>
> object Application extends Controller {
>  
>  def netBankingPage = Action {
>         println("This is view...")
>         Ok(views.html.index("Hello"))
>   } 
>  
>   def index = Action {
>    
>       val system = ActorSystem("ActorSystem")
>       var Actor1 = system.actorOf(Props[HelloActor], name = "Actor1")
>      
>       Actor1 ! "hello"
>       Actor1 ! "netBanking"
>      
>       Thread.sleep(8000)
>    
>   Ok("hello..")
>      
>   }
>
>
> *Output in the terminal:* 
> Hello message called
> NetBanking called..
> Get called successfully...
>
> *Output in the browser:*
> hello..
>
> In above code, I want to call the WS netbanking view page and control must 
> not return back.
> I mean, I must only be able to see the view page. Not the response of "Ok".
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to