Why not use a Filter? The logic goes in one place and you can map the Filter to all requests.
robert > -----Original Message----- > From: Dave Johnson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 21, 2004 8:42 AM > To: Struts Users Mailing List > Subject: Checking a cookie or redirecting - best way? > > > hi all > > Well now I've got this cookie that I need to check for, and if it > exists, lovely. Nothing else needs to be done. > > if NOT, I need to send the user to a specific page (/error.jsp). > > I was thinking of using <logic:present> to check for the bean, but I > dont want to wrap all my jsp code with that tag, what I really want is > something simple at the beginning that checks if the bean is there > then does a redirect if there's an error. > > should I be using a struts tag or scriptlet? > > what about if I need to include something like that in HTML (using > javascript) has anyone done that? > > Thanks > > D > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]