Results 1 to 2 of 2

Thread: passing a message to an included page

  1. #1
    Join Date
    Aug 2004
    Location
    Devon, UK
    Posts
    132

    Default 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. #2
    Join Date
    May 2005
    Posts
    23

    Default

    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.
    -jae

Similar Threads

  1. Pageable data list with Hibernate
    By robmorgan in forum Data
    Replies: 23
    Last Post: Jul 24th, 2006, 06:12 PM
  2. Replies: 3
    Last Post: Oct 31st, 2005, 03:23 AM
  3. UpgradeAcegi Security System from 0.6.1 to 0.8.3
    By mannobug in forum Security
    Replies: 3
    Last Post: Sep 23rd, 2005, 07:00 PM
  4. Channel and message transformation question
    By Alarmnummer in forum Architecture
    Replies: 12
    Last Post: May 11th, 2005, 05:06 PM
  5. Message Area in Application Page
    By afida in forum Swing
    Replies: 6
    Last Post: Oct 16th, 2004, 11:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •