Username:

Password:

Author Topic: How to display a message temporarily in a JSP page?  (Read 1028 times)

Santosbulus

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 38
How to display a message temporarily in a JSP page?
« on: March 09, 2011, 02:54:41 AM »
I have a JSP page as a Form,on submitting that form it goes to servlet.Servlet inserts values of form in Database.After insertion it redirects to JSP .
Now the problem is i want to display a message in JSP page after redirection that Records are inserted. And this message must be for some little time.
Please Help..

kaminikethy1

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 11
Re: How to display a message temporarily in a JSP page?
« Reply #1 on: May 28, 2011, 09:33:01 AM »
In the servlet create a bean to store the message and save it in servlet context as an attribute.
retrieve the bean in jsp from the context and print extracted message

dryparker

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
Re: How to display a message temporarily in a JSP page?
« Reply #2 on: July 11, 2011, 01:00:39 AM »
@kaminikethy1, Complete agree with those steps and they were worked. Thanks for sharing comprehensive solution.
Logged
SSL Certificate, EV SSL, WildCard SSL | Secure eCommerce with theSSLstore.com

lilly1236

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 163
    • WWW
Re: How to display a message temporarily in a JSP page?
« Reply #3 on: July 27, 2011, 09:32:43 AM »
NEVER use Java code in JSP.
NEVER try to mix binary and text data in a ServletOutputStream.

lilly1236

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 163
    • WWW
Re: How to display a message temporarily in a JSP page?
« Reply #4 on: August 02, 2011, 03:51:02 AM »
in the servlet create a bean to store the message and save it in servlet context as an attribute.
retrieve the bean in jsp from the context and print extracted message

cashcars

  • Full Member
  • ***
  • Karma: +0/-0
  • Posts: 196
Re: How to display a message temporarily in a JSP page?
« Reply #5 on: January 03, 2012, 02:16:50 AM »
In the servlet create a bean to store the message and save it in servlet context as an attribute.
retrieve the bean in jsp from the context and print extracted message