You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marius Sorin Barduta <ma...@necomm.ro> on 2000/06/28 13:06:26 UTC

Bug in CheckLogonTag in struts-example?

It seems that there is an error in CheckLogonTag class in struts-example.
The class redefines the method doStartTag. If the user is not logged in, the
method should redirect to logon.jsp and skip the evaluation for the rest of
the page. Unfortunately this does not happen.
First doStartTag returns a SKIP_PAGE value in case the user is not logged
in, but this value, according to JSP specifications is "Valid return value
for doEndTag." So, in fact, the JSP engine ignores the returned value and it
continues to evaluate the page.
One quick fix should be, in may opinion, to change the name of the function
to doEndTag and have this function return EVAL_PAGE if the user is valid and
SKIP_PAGE if not.
It  works for me.
This bug is present in the source distribution jakarta-struts-src-20000627

Marius Sorin Barduta