Well, I will descript the problem exactly. the first page use a tag class to
render a random question from database, and their possible answers, the user
must choose the right answer and submit the form for processing.

 I need the random question numbers, which are question ids to
*Results*servlet.
*Results* servlet is a servlet that must display the same questions that was
displayed in the Questions page to run a query against the database to
display the questions and the correct and wrong answers.

My Problem is that, I want to pass these numbers, Questions IDs, from the
first page, which i have made it as a tag class, to Results page, which was
made as servlet. I tried to use request.setAttribute("Ids", ids); but when
retrieve it in Results servlet, I got *null. *

 That was my problem my buddy, by the way, when i used session, it worked
fine. and you stated that this will not work, but i think that storing these
ids in a session is a good choice, isn't it?

If you have any comments please post it.


On 7/26/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
>
> > From: Mohammed Zabin [mailto:[EMAIL PROTECTED]
> > Subject: Re: Bean and Servlet
> >
> > What do you suggest to overcome this problem?
>
> In the seven messages you've posted in this thread, you've never really
> explained what this attribute is being used for; nor have you answered
> the question of whether or not it's used only for the duration of a
> single request or is applicable to everything a given user does with
> this particular webapp.
>
> Until you give us some idea of what your intent is (as opposed to code
> snippets), I don't think anyone can really answer your questions.
>
> If you do need to store attributes in a session, you will need at least
> some synchronization logic to see if the attribute is already present,
> since multiple requests can easily be using the Session object
> concurrently.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to