0

My project I've some messages in bussiness layer and I can't send to Angular JS.

Using Struts2, we can to do like that:

addActionMessage("You are valid user!");

There are one way similar that works with angular + spring framework? I' am looking for a solution for global messages using these technologies and not found for a while.

amphetamachine
  • 27,620
  • 12
  • 60
  • 72
rafaduka
  • 31
  • 6

1 Answers1

0

I dont know well Struts2, but you can attach messages to your cookies request response and then in angularjs, looking up for the messages inside the cookies and render them. Im using this approach with Django, but you can implement it using struts2 for sure.

Here is a tutorial how to set cookies using struts2

Here its how to access cookies using angularjs

Community
  • 1
  • 1
levi
  • 22,001
  • 7
  • 73
  • 74