RE: Shutdown notice functionality

2003-12-13 Thread Nicklas Karlsson
On Fri, 12 Dec 2003, Wendy Smoak wrote:

> Sounds like (yet another) job for a Filter! I have a similar thing, a
> MaintenanceFilter that checks to see if the system is under maintenance,
> and sends the user to a so-sorry-try-later page.

How do you pass along the shutdown command? Through the request
with container-authentication or something else? The filter could also be 
activated to record requests passing through and extracting a list of 
users who are active, I guess...

> Letting them continue on is surely possible... Depends on what's in the
> request.  Form fields are easy enough to handle with hidden fields, then
> the 'OK' button actually submits a new request, with an extra field
> that'll let you through the filter.  I tend to solve this sort of thing
> by putting everything in session scope.

Hidden fields are a little tricky since they would have to be 
generated dynamically (the user could come from any page) and I try not to 
overuse the session. Is there a JSP/Servlet mechanism for 
storing/serializing the request completely and passing it along when the 
user submits with the OK button?

---
Nicklas "Nik" Karlsson, Murkiogatan 3 B 29 20740 Åbo, 040 9000 724
[EMAIL PROTECTED] ::: http://www.abo.fi/~nickarls ::: [EMAIL PROTECTED]

"If a man speaks in the forest and there is no woman around to hear him -
 Is he still wrong?"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Shutdown notice functionality

2003-12-12 Thread Wendy Smoak
> From: Nicklas Karlsson [mailto:[EMAIL PROTECTED] 
>   I need to implement per-application (WAR) shutdown messages for
> the currently logged on users on a web application e.g. when the
> application is being re-deployed or the server is going down for 
> maintenance.
>   Is it possible to extend ActionServlet so that processing would
> also include a check for an attribute in the servletcontext 
> (e.g. time to shutdown in minutes) and if such an attribute exists, 
> redirect the user to shutdown.jsp? 

Sounds like (yet another) job for a Filter!  I have a similar thing, a
MaintenanceFilter that checks to see if the system is under maintenance,
and sends the user to a so-sorry-try-later page.

Letting them continue on is surely possible... Depends on what's in the
request.  Form fields are easy enough to handle with hidden fields, then
the 'OK' button actually submits a new request, with an extra field
that'll let you through the filter.  I tend to solve this sort of thing
by putting everything in session scope.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Shutdown notice functionality

2003-12-12 Thread Nicklas Karlsson

Hello,

I need to implement per-application (WAR) shutdown messages for
the currently logged on users on a web application e.g. when the
application is being re-deployed or the server is going down for 
maintenance.

Is it possible to extend ActionServlet so that processing would
also include a check for an attribute in the servletcontext (e.g. time to
shutdown in minutes) and if such an attribute exists, redirect the user to 
shutdown.jsp? More importantly, is it possible to retain the request 
information so that the user could continue the normal workflow (passed as 
a parameter to shutdown.jsp?) after a click on the OK button?

If not, are there other ways than having the servlet copy the 
shutdown information to the user request/session and have a 
"shutdowncheck" custom tag that pops up a javascript alert box if shutdown 
information is present?

---
Nicklas "Nik" Karlsson, Murkiogatan 3 B 29 20740 Åbo, 040 9000 724
[EMAIL PROTECTED] ::: http://www.abo.fi/~nickarls ::: [EMAIL PROTECTED]

"If a man speaks in the forest and there is no woman around to hear him -
 Is he still wrong?"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]