Announcement Announcement Module
Collapse
No announcement yet.
passing a message to an included page Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • passing a message to an included page

    Hi,

    Is it possible with Spring to pass a message to an included JSP page?

    I have a masthead which I want to use on every page. There's a logo in the middle of the masthead, and on one side, I would like to add a message about the result of the user's action on the previous page - "Your message has been sent", "Your profile has been updated" - that sort of thing.

    Can I reference a parameter like this in an included page (I have failed so far to get it to work) or will I have to go back to having the code for the masthead in every JSP? Something like this:

    topRow.jsp:
    Code:
    <!-- Top Row -->
    <table >
        <tr>
          <td><p><c&#58;out value="$&#123;actionMessage&#125;"/></p></td>
          <td><div align = "center"><img src="../images/logo.gif"></div></td>         
        </tr>
    </table >
    <!-- End Top Row -->
    mailBox.jsp:
    Code:
    <%@ include file="/WEB-INF/jsp/includes/topRow.jsp" %>
    Here is your mail...etc

    Thanks,

    John Pedersen

  • #2
    you could stick the messages inside the session object and then use a filter to pull them out and clear them.

    check out http://equinox.dev.java.net/ for an example of this.

    Comment

    Working...
    X