This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
i think you need a more fine-grain session concept. if you had an action like "displayChatPage" which you use to render the page, and another action "processUserInput" which gets submitted by the form, your problem would be solved :-)
best regards, jan
sorry, i just see that "session" is wrong and extremely misleading. i meant "action" [ September 07, 2006: Message edited by: Jan Groth ]
Joined: Apr 15, 2006
Sorry but the reply is not elaborative enough. Can you just tell me how can i call those two actions seperately. I mean one will be for Send button's click but what about other to refresh a page? It's really confusing?
Thanks Manoj Amrutkar
Joined: Feb 03, 2004
hey, untwist you brain a bit :-)
forget about your design-structure for the next minute, and try to follow this concept-proposual for a chat app with login:
(1) a user hits your url and gets a welcome-screen with login -> rendered by loginShow.do
(2) on this screen we have a login form -> submitting to loginProcess.do
(3) the login is processed, and if successfull, the user sees the chat-screen -> processed by loginProcess.do ---> failure redirects to errorPageShow.do ---> success redirects to chatShow.do
(4) the user sees the chat screen. on this screen we have a form which processes the possible user input -> screen is rendered by chatShow.do (as said in (3)) -> form submits to userInputProcess.do (we se in a sec)
(4.1) the user hits f5 -> chatShow.do renders the screen again
(4.2) the user submits a form -> userInputProcess.do processes the user input and possible redirect back to chatShow.do
:-) 4.1 and 4.2 are the import parts which make your question obsolete. the point is that you render your screen with a different action then you process the input.
hope it helped a bit, jan
feel free to post
Joined: Apr 15, 2006
Yup, Thanks a lot for your reply and very important time. It was really so very usefull. Thanks once again