Announcement Announcement Module
No announcement yet.
Spring MessageContext Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring MessageContext

    In my controller,

    I set the messageContext as follows,

    MessageContext messageContext = RequestContextHolder.getRequestContext().getMessag eContext();

    messageContext.addMessage(new MessageBuilder().error().defaultText("The service is currently unavailable. Please try again later.").build());

    And access the same in my JSP as follows.

    <div class="txtCenter">
    <h2 style:text-align="centre">
    <c:forEach items="${flowRequestContext.messageContext.allMess ages}" var="message">

    I am able to see the message in my app, but when we click on the browser back and Forward button, the messages gets disappeared.

    Is there any way to set the scope of the message or what could be the problem?