Re: How to send redirect from an XSP?

2002-08-21 Thread MTiffany71


> > You shouldn't do it. Use an action for this. There are already a
> > number of actions that perform this job. Use one of them, modify one
> > of them, write a new one, or write an XSP action that does it.
> 

I tried using actions in the sitemap, (a la cut and paste and tweak from the sitemap provided in the "protected" sample directory that comes with C2) but just could not get them to work -- the documenation is rather sparse. Can anyone provide any working examples?

thanks
mtiffany


RE: How to send redirect from an XSP?

2002-08-21 Thread ROSSEL Olivier

> > You shouldn't do it. Use an action for this. There are already a
> > number of actions that perform this job. Use one of them, modify one
> > of them, write a new one, or write an XSP action that does it.
> 
> What is an "XSP action"?  Can we now use XSP to write Actions?
> Is there any documentation on it?

You can use the ServerPagesAction.
A action written in XSP.
It is only documented in the Javadoc.
Quite simple, and very nice !

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: How to send redirect from an XSP?

2002-08-21 Thread Christopher Painter-Wakefield



> You shouldn't do it. Use an action for this. There are already a
> number of actions that perform this job. Use one of them, modify one
> of them, write a new one, or write an XSP action that does it.

What is an "XSP action"?  Can we now use XSP to write Actions?
Is there any documentation on it?

-Christopher



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: How to send redirect from an XSP?

2002-08-21 Thread Christian Haul

On 21.Aug.2002 -- 04:07 AM, [EMAIL PROTECTED] wrote:
> hello all,
> 
> i'm trying to check to see if a user is in a session, and if not, redirect 
> them to a login page...

You shouldn't do it. Use an action for this. There are already a
number of actions that perform this job. Use one of them, modify one
of them, write a new one, or write an XSP action that does it.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




How to send redirect from an XSP?

2002-08-21 Thread MTiffany71
hello all,

i'm trying to check to see if a user is in a session, and if not, redirect them to a login page...

my (rather sloppy) code so far goes like so...



  xmlns:session="http://apache.org/xsp/session/2.0"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  create-session="false">



protected void checkUser()
{
 if(!getSession())
   { 
 //SEND REDIRECT...
 }
}

protected boolean getSession()
{
  Session session=request.getSession(false);
if(session == null)
return false;
else
return true;

}


so, anyone care to share with me the secret of sending a redirect? I've checked out the response stylesheet and that was of no help, and the action stylesheet is apparently "not for use in Generators"...

any and all help (exlcuding RTFM) welcome