users@glassfish.java.net

Re: Strange servlet behaviour !!!!!!!

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 Jul 2008 11:14:57 PDT

Well if the servlet were processing the previous requests the second request would already result in value to be "value1"? Could it be that you are using instance members to store the request parameters? Generally there exists only one servlet per servlet definition in the web.xml. Thus instance members are rarely appropriate for servlets.

If you use instance members, use the request scope to store any attributes you want to process later on.

For questions like yours it is always helpful to post the servlet in question (stripped down to the essential bits) and also the web.xml. Could you please add these to this board?

Thanks,

--
Wolfram Rittmeyer
[Message sent by forum member 'writtmeyer' (writtmeyer)]
http://forums.java.net/jive/thread.jspa?messageID=287374