This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes anything available just like static? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "anything available just like static?" Watch "anything available just like static?" New topic
Author

anything available just like static?

yuvaraj KumarAmudhan
Ranch Hand

Joined: Aug 22, 2009
Posts: 110
i have a jsp page and a controller. when each time i clicked something in the jsp page, it calls the servlet code and it returns some result.
consider, it returns "one" at the first time. (some variable = "one") that result is assigned to some variable.

after that, if i click again, the control is forwarded to the same servlet. this time it may return some other result.
consider, it returns "two" at this time. already i had a variable with one as its value.
this time i append the new result with that. now the variable has "one two" as its value.

when each time i click something, the result has to be appended in some variable.

how can i get the above mentioned result?


thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Store the data in the session.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: anything available just like static?
 
Similar Threads
how can we use struts to issue a session scope preparation ?
updating and refreshing a jsp page
session variable problem, please help
shine J2EE service oriented framework
threading issue in servlet