Daniel

I'm following this example : http://j2ee.masslight.com/Chapter5.html
and it seems to have the /> at the end.

I think I must be confused. Could I have a bad TLD?

Also, the <logic:notPresent> tag is telling me the cookie isn't there.
(I see the notpresent=true message below.

JSP:
<logic:notPresent name="validUser"> 
         NO COOKIE FOUND NOTPRESENT=true
        <!--jsp:forward page="/pages/error.jsp" /-->
</logic:present>   


On Tue, 21 Sep 2004 14:31:01 +0100, Daniel Perry <[EMAIL PROTECTED]> wrote:
> It is saying that bean:cookie should be an empty tag. As you havnt closed
> the tag, it isnt empty!
> 
> So, should be:
> <bean:cookie id="validUser" name="userCookie" />
> 
> Notice the slash on the end!
> 
> Daniel.
> 
> 
> 
> > -----Original Message-----
> > From: CCNY [mailto:[EMAIL PROTECTED]
> > Sent: 21 September 2004 14:04
> > To: Struts Users Mailing List
> > Subject: Fwd: Checking a cookie or redirecting - best way? (Getting
> > ERROR, Help!)
> >
> >
> > So when I run the jsp below (ironically named "success.jsp") I get the
> > following error
> >
> > org.apache.jasper.JasperException: /pages/success.jsp(4,0) According
> > to TLD, tag bean:cookie must be empty, but is not
> >
> > Huh?
> >
> > I also tried <bean:cookie name="validUser"> in the JSP, sme error.
> >
> > Can anyone help? am i useing bean:cookie wrong?
> >
> >
> > ---------- Forwarded message ----------
> > From: Dave Johnson <[EMAIL PROTECTED]>
> > Date: Tue, 21 Sep 2004 08:41:47 -0400
> > Subject: Checking a cookie or redirecting - best way?
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >
> > 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]

Reply via email to