hi,
i'm currently creating a webapplication with jsp the problem i have is:
i have to check if the user is logged in in every file (for security
reasons) therefore i need to have a very easy and flexible way to do
this..... i have created a bean doing the logincheck for me but i still
have some code to write, which is i think, unnecessary if i use this
code in an external jsp file and include it every time... this works
fine EXCEPT that if the user is not logged in it displayes the loginpage
AND the code of the page..... so i have to stop the JSP from displaying
the rest of the side if the user is not logged in ...... HOW? to clarify
this here the logical code of my pages:
//
// this is my external login file named LOGIN.JSP
//
<%
if (!user.notLoggedIn){
%>
here i post some html code with forms and stuff to give the user an
interface for login
<%
}
here i do the login if the user submits the form
//
// this is a file like one out of hundreds of my application
//
<%@ include file="LOGIN.JSP" />
here is the HTML code or Java code which should only show up if the user
is logged in.....
ok as you see the html code of the second page will always be
displayed.... how can i avoid that... i tried adding a else in the
second file which would reefers to the IF in LOGIN.JSP but i didn't
work.... any suggestions...
how do you solve this login problem.... i guess i'm not the first one
thinking about that.
would be nice to get help specifically to the problem described above
but i think anything concerning logins could help me maybe there is
another way to solve that.
bye,
simon
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html