Re: Handling invalid sessions

2005-10-17 Thread Jadeler
Thanks for the suggestions.  I'll try them out.

Cheers,

Jadeler

--- Aladin Alaily <[EMAIL PROTECTED]> wrote:

> Hi Jadeler,
> 
> In response to your question about managing session
> objects, I would 
> propose two methods:
> 
> 1) Write a CustomRequestProcessor (which extends the
> struts 
> RequestProcessor), and put your management code in
> there.   As a struts 
> programmer, you know that all requests *should* go
> through this 
> processor.  This way, if you (or someone else)
> forgets to extend a base 
> class (as was suggested in another post), your
> validation still takes place.
> 
> 2) Write a filter as you suggested.  Plain and
> simple.  The advantage of 
> the filter is that it is not struts dependent and it
> can be mapped to 
> specific urls. Consequently, not all requests will
> pass through the 
> filter (unless you specify the map as '/').
> 
> Good Luck.
> Aladin
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 







__ 
Find your next car at http://autos.yahoo.ca

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



Re: Handling invalid sessions

2005-10-17 Thread Aladin Alaily

Hi Jadeler,

In response to your question about managing session objects, I would 
propose two methods:


1) Write a CustomRequestProcessor (which extends the struts 
RequestProcessor), and put your management code in there.   As a struts 
programmer, you know that all requests *should* go through this 
processor.  This way, if you (or someone else) forgets to extend a base 
class (as was suggested in another post), your validation still takes place.


2) Write a filter as you suggested.  Plain and simple.  The advantage of 
the filter is that it is not struts dependent and it can be mapped to 
specific urls. Consequently, not all requests will pass through the 
filter (unless you specify the map as '/').


Good Luck.
Aladin


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



Re: Handling invalid sessions

2005-10-16 Thread rajasekhar . cherukuri

That is why i have clearly specified that you have to implement an 
abstract method in the base class. which will be implemented in all your 
classes and that method will be called explicitly from Base Action class. 
You should not override the execute() method in the Child classes.


Regards,
Rajasekhar Cherukuri



peru cheppanu <[EMAIL PROTECTED]> 
10/17/2005 10:26 AM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: Handling invalid sessions







If we do that, then execute() method in child classes will override Base 
Action execute() method. Right? Then, as far as I know, that execute() in 
Base Action will not be executed..
 
Peru Cheppanu
 

[EMAIL PROTECTED] wrote:

Hi,
The best way is to write a Base Action class and extend that class 
for all your Action classes in your application. Place a check in the 
execute method of the Base Action class and if it is a "success" then call 

an abstract method in the Base Action class which will be implemented by 
all your Action classes. If it is a "failure" (means there is NO required 
information in the session), then forward to a login page or failure page.


Regards,
Rajasekhar Cherukuri




Jadeler 
10/17/2005 09:57 AM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Handling invalid sessions






What is the best way to handle invalid sessions (http
sessions) within Struts? I need a way to determine
when an object within a session no longer exists and
redirect the user to an error page when that happens. 
I was thinking of implementing
HttpSessionAttributeListener or a Servlet filter. Any
suggestions on whats recommended? Thanks.

Jadeler






__ 
Find your next car at http://autos.yahoo.ca

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


ForwardSourceID:NT615A 


Notice: The information contained in this e-mail message and/or 
attachments to it may contain confidential or privileged information. If 
you are not the intended recipient, any dissemination, use, review, 
distribution, printing or copying of the information contained in this 
e-mail message and/or attachments to it are strictly prohibited. If you 
have received this communication in error, please notify us by reply 
e-mail or telephone and immediately and permanently delete the message and 
any attachments. Thank you
 
-
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
ForwardSourceID:NT616E 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Re: Handling invalid sessions

2005-10-16 Thread peru cheppanu

If we do that, then execute() method in child classes will override Base Action 
execute() method. Right? Then, as far as I know, that execute() in Base Action 
will not be executed..
 
Peru Cheppanu
 

[EMAIL PROTECTED] wrote:

Hi,
The best way is to write a Base Action class and extend that class 
for all your Action classes in your application. Place a check in the 
execute method of the Base Action class and if it is a "success" then call 
an abstract method in the Base Action class which will be implemented by 
all your Action classes. If it is a "failure" (means there is NO required 
information in the session), then forward to a login page or failure page.


Regards,
Rajasekhar Cherukuri




Jadeler 
10/17/2005 09:57 AM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Handling invalid sessions






What is the best way to handle invalid sessions (http
sessions) within Struts? I need a way to determine
when an object within a session no longer exists and
redirect the user to an error page when that happens. 
I was thinking of implementing
HttpSessionAttributeListener or a Servlet filter. Any
suggestions on whats recommended? Thanks.

Jadeler






__ 
Find your next car at http://autos.yahoo.ca

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


ForwardSourceID:NT615A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information. If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited. If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments. Thank you

-
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

Re: Handling invalid sessions

2005-10-16 Thread rajasekhar . cherukuri

Hi,
The best way is to write a Base Action class and extend that class 
for all your Action classes in your application. Place a check in the 
execute method of the Base Action class and if it is a "success" then call 
an abstract method in the Base Action class which will be implemented by 
all your Action classes. If it is a "failure" (means there is NO required 
information in the session), then forward to a login page or failure page.


Regards,
Rajasekhar Cherukuri




Jadeler <[EMAIL PROTECTED]> 
10/17/2005 09:57 AM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Handling invalid sessions






What is the best way to handle invalid sessions (http
sessions) within Struts?  I need a way to determine
when an object within a session no longer exists and
redirect the user to an error page when that happens. 
I was thinking of implementing
HttpSessionAttributeListener or a Servlet filter.  Any
suggestions on whats recommended?  Thanks.

Jadeler


 

 
 
__ 
Find your next car at http://autos.yahoo.ca

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


ForwardSourceID:NT615A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Handling invalid sessions

2005-10-16 Thread Jadeler
What is the best way to handle invalid sessions (http
sessions) within Struts?  I need a way to determine
when an object within a session no longer exists and
redirect the user to an error page when that happens. 
I was thinking of implementing
HttpSessionAttributeListener or a Servlet filter.  Any
suggestions on whats recommended?  Thanks.

Jadeler






__ 
Find your next car at http://autos.yahoo.ca

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