File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "anything available just like static?" Watch "anything available just like static?" New topic

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?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Store the data in the session.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: anything available just like static?
jQuery in Action, 3rd edition