please give me a hand!!!

please help me!

HttpServletRequest request;

i use "request.setAttribute("value",value);" in a method of "Action" to save the value and use "request.getAttribute("value");" to get the value in "jsp" which findForward from the method, but there are two servers being used which are deployed same. my problem is that when the servers are changing randomly to serve you, can i get the value correctly everytime? if the answer is "no", can you help me solve this problem?

thank you!

jjrainbow

[518 byte] By [jjrainbowa] at [2007-11-27 4:50:54]
# 1
can anyone help me?thanks!!!!!!!
jjrainbowa at 2007-7-12 10:04:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
help!if you don't understand what i mean, please tell me!
jjrainbowa at 2007-7-12 10:04:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
You could implement a storage of the objects in a database which both servers can access. It would reduce performance but then data could be shared.
Niklasa at 2007-7-12 10:04:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

You have two clustered servers, either of which can handle the request?

As I understand it, once a server receives a request it should handle the entire request. Forwarding to another jsp/servlet is purely an internal transition, and so should not result in changing the server.

If you can make that assumption, then your request attributes will always be present and correct.

So I think the answer to your question: "can I get the value correctly every time" is yes. Unless you are doing your own custom clustering which does interfer in the request cycle in which case all bets are off. Most likely though, there is no issue .

evnafetsa at 2007-7-12 10:04:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
thanks for your help!i see
jjrainbowa at 2007-7-12 10:04:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...