Paul King wrote:
> I know a few people have described how the jsp1.0 spec should allow jsp
> files to be included, but I don't recall anyone mentioning that they've
> actually done this. Has anyone had success with this?
>
> For example, I'd like to include a VerifyLogin.jsp file in my other jsp
> files to make sure a session has logged in. VerifyLogin would redirect
> to a login component if the session isn't logged in. Otherwise, it
> would not affect the parent page. If someone could pass along the
> single line of code I should use here, that would be great.
>
> paul
>
I'm building a multilingual application with JSWDK 1.0-EA, and used this
technique to include the language switching stuff, which is common to all
pages:
<jsp:include page="/languages.jsp" />
For your scenario, you would do this:
<jsp:include page="/VerifyLogon.jsp" />
and in that page, you might have logic like this (just as an example):
<%
boolean hasLoggedOn = ....; // Figure it out
if (!hasLoggedOn) {
%>
<jsp:forward page="/LogonForm.jsp" />
<%
}
%>
Craig
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".