JSP use beans

How do I pass the java objects from page to page?I have a an instance and want to reuse it in the consequent pages, so is there any method to pass it? Thank you
[181 byte] By [dy-xa] at [2007-11-26 16:04:58]
# 1
Beans are usually passed between JSP and Servlets as an attribute of the request or session objects.In the JSP you access the bean using jsp:useBean tags.
tolmanka at 2007-7-8 22:27:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Some common beans like "userLoginBean" can be tied with Session, but you do not wish to put Collections of "Beans" in your session; that will slow things down, eat up all your memory and very impractical!by Avatar Ng
Avatar_Nga at 2007-7-8 22:27:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Actually, the problem is that, I got some things stored in the objects from the web pagesIf I do not pass object, I have to store the values into session and that might not really efficient.In that case, any suggestion on that?
dy-xa at 2007-7-8 22:27:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Hmmm I think I got your concern, I had that issue once too, So ...

1. either you do it the stupid way to pass it through "request" by "request" or ...

2. store it on some persistence storage == db/file etc.

3. use a cookie ?

I want to highlight a few things:

(i) passing params/attributes (of Object,Vector or whatever) tru 1 level page-flow is OK.

(ii) common information can be store in application scope, e.g.: countries,common combo box values, table data, ...

(iv) login information, locale information to be stored in session.

I don't really know what you are trying to pass around, but if it is a user input ... and you don't use that information immediately in the next page ... there must be some problem with your flow. This is a web page, not a desktop application.

Do you understand my language? Haha, I'm found I'm so lost too ...

Anyway I would like to hear your feedback or show portion of your codes here, may be we can work something out ... :)

Good luck!

By Avatar Ng

Avatar_Nga at 2007-7-8 22:27:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...