RE: Redirect fails in templates

2001-11-13 Thread Becky Moyer


That's what I am doing already...
When I put these tags in my template.jsp page:




They do not redirect if the securityObject is not present.

If I put them in entry.jsp below...


  



  


They work fine.  What is it about the template.jsp page that keeps it from 
being able to redirect?

Thanks,
Becky

Original Message Follows
From: "Nguyen, Khuong" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: RE: Redirect fails in templates
Date: Tue, 13 Nov 2001 11:21:40 -0500

Try using the present tag since you inserted an object into the session for
a valid user. If you are using the standard container security, then declare
those pages in web.xml. The container does the rest for logging in. You may
want to check for the presence of other beans used on the page and redirect
to an action to populate those before displaying.





-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:53 AM
To: [EMAIL PROTECTED]
Subject: Redirect fails in templates


I am trying to redirect a user to the login page if they bookmark a page and

don't have the right authorization when they access it.  Essentailly, once
someone is securely logged in, I store an object in the session - it's
presence proves they are logged in.  If it isn't there, then they should be
redirected.  I put the logic in my actual page, it works.  If I put it in
the body of my template (since I want it on every page) it can't redirect.
Why?  I know that the redirect code gets executed, but I either end up
seeing the page i wanted to access, or I end up seeing a blank page.  I've
tried the following tags:



<% response.sendRedirect("/login.jsp"); %>

 where the ActionForward that refers to is:


Any thoughts?  My workaround now is to put the tag in each page
individually, but I'd really like to be able to put it in my templates.

Thanks!
Becky


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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

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



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




RE: Redirect fails in templates

2001-11-13 Thread Nguyen, Khuong

Try using the present tag since you inserted an object into the session for
a valid user. If you are using the standard container security, then declare
those pages in web.xml. The container does the rest for logging in. You may
want to check for the presence of other beans used on the page and redirect
to an action to populate those before displaying.


   


-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:53 AM
To: [EMAIL PROTECTED]
Subject: Redirect fails in templates


I am trying to redirect a user to the login page if they bookmark a page and

don't have the right authorization when they access it.  Essentailly, once 
someone is securely logged in, I store an object in the session - it's 
presence proves they are logged in.  If it isn't there, then they should be 
redirected.  I put the logic in my actual page, it works.  If I put it in 
the body of my template (since I want it on every page) it can't redirect.  
Why?  I know that the redirect code gets executed, but I either end up 
seeing the page i wanted to access, or I end up seeing a blank page.  I've 
tried the following tags:



<% response.sendRedirect("/login.jsp"); %>

 where the ActionForward that refers to is:


Any thoughts?  My workaround now is to put the tag in each page 
individually, but I'd really like to be able to put it in my templates.

Thanks!
Becky


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: