--- "Dahnke, Eric" <[EMAIL PROTECTED]> wrote:
> >If I comment out the init() method in my servlet do I get an instance of it
> >for each request?
> >
> >Do people commonly do this?
>
> I suspect that if you do this Eric, it won't compile...
>
>
> It compiles fine, and works fine too. But I hav
>If I comment out the init() method in my servlet do I get an instance of it
>for each request?
>
>Do people commonly do this?
I suspect that if you do this Eric, it won't compile...
It compiles fine, and works fine too. But I haven't testing it in a
multiuser environment yet.
--
To unsubscrib
You guys are confusing me...
At 10:52 27/03/2002 +0100, you wrote:
> Great, that's what I thought. But here's why I'm getting confused. The
> servlet tutorial says that a servlet is created once and once
> only (that's
> when the init() is run).
> http://java.sun.com/docs/books/tutorial/servlet
> I describe the work what I need to finish.
> First the jsp file gets a user name, then pass it to java bean.
> And the bean
> get some values from the database accoding to the user name, then get a
> result and save it to database. The idea of synchronized objects cannot
> work. I want to acitv
> First of all, thank you so much Alexander for taking the time to explain
> this so thoroughly.
*bow*
> Now, since each JSP is essentially a servlet, how does the
> servlet perform
> the sharing of the javabean ? Does a servlet that shares a
> javabean (similar
> to the JSP case [d] above, whe
CTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 3:28 PM
> Subject: RE: AW: Multiple users share java bean?
>
>
> > Are your sure loginname is getting set properly? Try including the
value
> in
> > your
oblem when
I open windows for multiple users. Is it the problem of the server or
setting?
- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 3:28 PM
Subject: RE: A
: AW: Multiple users share java bean?
- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 2:12 PM
Subject: RE: AW: Multiple users share java bean?
> Are y
- Original Message -
From: "Wagoner, Mark" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 2:12 PM
Subject: RE: AW: Multiple users share java bean?
> Are you sure you really want independent
Referring to this point:
>Great, that's what I thought. But here's why I'm getting confused. The
>servlet tutorial says that a servlet is created once and once only (that's
>when the init() is run).
If I comment out the init() method in my servlet do I get an instance of it
for each request?
I misunderstood. You want many users to use the same bean to get common
information, kind of like a message board. each user works
independently, but they are using a common bean.
someone else said "If it is the latter, then just use local variables in
your bean methods."
more information about
, March 26, 2002 2:06 PM
To: Tomcat Users List
Subject: Re: AW: Multiple users share java bean?
What's the meaning of JMS? I'm not sure my problem is just what you said. I
want to get independent instance or the same bean for each user. So they can
work independently, and won't infl
anks.
>
> - Original Message -
> From: "peter lin" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 1:32 PM
> Subject: Re: AW: Multiple users share java bean?
>
> >
> > One common
MAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 1:32 PM
Subject: Re: AW: Multiple users share java bean?
>
> One common technique to solve this is to use JMS. All beans that are
> instances of the same user listen to the same
One common technique to solve this is to use JMS. All beans that are
instances of the same user listen to the same topic. when one instance
of the user's bean is updated, the other instances are notified. Each
bean then goes to the database to refresh itself.
peter lin
Chenming Zhao wrote:
>
In fact, it's a good and difficult topic. Now I haven't still understood it
completely. I have a question about my application.
I describe the work what I need to finish.
First the jsp file gets a user name, then pass it to java bean. And the bean
get some values from the database accoding to the
First of all, thank you so much Alexander for taking the time to explain
this so thoroughly.
> > First, am I correct in saying that the default behaviour for a
> > Javabean is that each servlet or JSP that uses it will create > a new
>instance of that Javabean ? For example, if we have > Regi
http://shannon.informatik.fh-wiesbaden.de/jsp/jsp/index.html
Alexander
> -Ursprüngliche Nachricht-
> Von: Robert Douglass [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 26. März 2002 10:21
> An: Tomcat Users List
> Betreff: RE: Multiple users share java bean?
>
>
What is the German book you were going to recommend?
-Original Message-
From: Alexander Reifinger [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 10:04 AM
To: Tomcat Users List
Subject: AW: Multiple users share java bean?
> First, am I correct in saying that the defa
> First, am I correct in saying that the default behaviour for a
> Javabean is
> that each servlet or JSP that uses it will create a new instance of that
> Javabean ? For example, if we have Register.jsp which uses a Javabean
> called memberData.java then if 2 people were to submit data to
> Regi
Hello guys,
i expect beans and servlets to behave different?
As i know servlets should only be instanced once in the servlet
container, and each request should be handled by the same instance of
the servlet. To handle different data for different users, you need to
use session tracking and sto
ages where I question the fundamental understanding. I must go read the
servlet API I think.
Soefara.
>From: Daniel Hinojosa <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: Tomcat Users List <[EMAIL PROTECTED]>
>Subject: Re: Multi
t;Daniel Hinojosa" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, March 25, 2002 11:35 AM
>Subject: Re: Multiple users share java bean?
>
>>If it's a shared bean, sycnchronize it. Make sure that
>>all mutators(S
;[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 2:29 PM
Subject: Re: Multiple users share java bean?
>
> If you have multiple users sharing the same bean, then that's what's going
to
> happen. By synchronizing the get and set method, all you're doing is
saying
> &qu
To: "Tomcat Users List"
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]cc:
u>
ginal Message -
From: "Daniel Hinojosa" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 11:35 AM
Subject: Re: Multiple users share java bean?
> If it's a shared bean, sycnchronize it. Make sure that
> all mutato
IL PROTECTED]>
Sent: Monday, March 25, 2002 11:35 AM
Subject: Re: Multiple users share java bean?
>
>
> Chenming Zhao wrote:
>
> >Hi,
> >When two users call the bean almost at the same time, it seems that they
share the same object and their implementing is dependent
Chenming Zhao wrote:
>Hi,
>When two users call the bean almost at the same time, it seems that they share the
>same object and their implementing is dependent with each other (I hope they are
>independent), and cannot get correct results. Should I configure Tomcat? I think the
>java bean is
Hi,
When two users call the bean almost at the same time, it seems that they share the
same object and their implementing is dependent with each other (I hope they are
independent), and cannot get correct results. Should I configure Tomcat? I think the
java bean is no problem. It's urgent. Plea
29 matches
Mail list logo