Regarding Message

hi all,

i have some problem in the client side screens.

in my jsp i have an two options, one is add and another one is delete.

for both the client and server side working.

my problem is i want to show the message after the succesfull add or delete in the client side.

for that purporse i try to use the bean concept, but it's not working well.

any one can help me to recove this problem.

today is my release date.

Thanx in advance.

[487 byte] By [art84a] at [2007-11-27 5:08:24]
# 1

Once your transaction is successfull, you can put some message in the session, then in the jsp you can get the message and display.

session.setAttribute("success_msg", "Record has been added");

mapping.findForward("success");

in your message jsp (success jsp),

<%

session.getAttribute("success_msg");

%>

I used this kind of thing when I used AJAX. It may work here too. Try it out.

skp71a at 2007-7-12 10:27:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

when doing a forward I would suggest the request over the session. The message is useful for this one request only.

request.setAttribute("successmsg", "Record has been added");

and in the JSP:

${requestScope.succesmsg}

Of course I wouldn't use that exact message, users care nothing about a "record being added", they may care that their information was stored or something more meaningful and less programming related.

gimbal2a at 2007-7-12 10:27:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanx for the tips.i am using the session to get the forward the message.it's working fine.Bala
art84a at 2007-7-12 10:27:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...