Pause some JSP in tomcat ...

A

Ahan Hsieh

Dear All:
I have a requirement, my web container is Tomcat, and I running some JSP
(called A, B);
now I want to pause the A.jsp in my environment and B.jsp still running, how
to deal it.
thanks!!!

Regards. ahan
 
J

John C. Bollinger

Ahan said:
I have a requirement, my web container is Tomcat, and I running some JSP
(called A, B);
now I want to pause the A.jsp in my environment and B.jsp still running, how
to deal it.

What do you mean by "pausing" a JSP? Do you mean it should stop
servicing requests? Do you mean it should suspend processing of a
particular request (bad idea). Something else?

It may be useful for you to put a bean in the appropriate context
(application/session) that JSP A may query to determine the appropriate
action at any given point. Alternatively, you could put a servlet in
front of A that suitably controls access to A and/or massages requests
sent to A in some appropriate manner.

I really can't be more specific without knowing what you actually are
trying to accomplish.


John Bollinger
(e-mail address removed)
 
W

William Brogden

Ahan Hsieh said:
Dear All:
I have a requirement, my web container is Tomcat, and I running some JSP
(called A, B);
now I want to pause the A.jsp in my environment and B.jsp still running, how
to deal it.
thanks!!!

Regards. ahan

JSP get turned into servlets - servlets run when the container gets
a request. What do you want to happen when a request comes
to a "paused" A.jsp?
 
A

Ahan Hsieh

Dear Sir:
I try to explain my requirement clearly, A.jsp maybe a simple jsp or
jsp+bean or other style.
After user request for A.jsp, it will take a long time to caculate something
or combine some information
for response. Then now question happened, it will take 100% CPU time and
others job(like B.jsp)
maybe can't work, so I must using some solution to pause the A.jsp and let
B.jsp continue working.
I know the Tomcat for each request will occupy one thread, and how to
pause the tomcat thread, or maybe
a good solution for this(maybe design pattern observer, but I don't know),
so maybe you have a good idea
for me. thanks!!

--- ahan

"John C. Bollinger" <[email protected]> ?????
Ahan said:
I have a requirement, my web container is Tomcat, and I running some JSP
(called A, B);
now I want to pause the A.jsp in my environment and B.jsp still running, how
to deal it.

What do you mean by "pausing" a JSP? Do you mean it should stop
servicing requests? Do you mean it should suspend processing of a
particular request (bad idea). Something else?

It may be useful for you to put a bean in the appropriate context
(application/session) that JSP A may query to determine the appropriate
action at any given point. Alternatively, you could put a servlet in
front of A that suitably controls access to A and/or massages requests
sent to A in some appropriate manner.

I really can't be more specific without knowing what you actually are
trying to accomplish.


John Bollinger
(e-mail address removed)
 
M

Michael Borgwardt

Ahan said:
Dear Sir:
I try to explain my requirement clearly, A.jsp maybe a simple jsp or
jsp+bean or other style.
After user request for A.jsp, it will take a long time to caculate something
or combine some information
for response. Then now question happened, it will take 100% CPU time and
others job(like B.jsp)
maybe can't work, so I must using some solution to pause the A.jsp and let
B.jsp continue working.

No, that's nonsense. This is why we have multitasking. Just give the
calculation-intensive thread a lower priority.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top