so here is ex of doing it just by jsp
index.jsp
Expand|Select|Wrap|Line Numbers
- <html>
- <body>
- <%
- if (session.getAttribute("username") != null) {
- out.print("
- <div>
- user | option | logout
- </div>
- ");
- } else {
- out.print("
- <div>
- login | forgotpassword | create account
- </div>");
- }
- %>
- </body>
- </html>
so I want to do the same thing only doing it by the right way(jsp/servlets). I tried look up but cant find any thing.