as you know JSP's are translated to servlets and then the servlets are compiled ... bla bla bla (the life cycle of a JSP file)
and in each JSP there are some implicit objects that you can use such as (session, request, response, out ... etc), those objects are created by default in Servlet that gets generated from the JSP. and if you look in the code generated from the translation of your JSP file you should see somewhere this line of code
which creates the JSP implicit "session" object that you can use in your page, if in someway you don't want that that object gets initialized you set the session parameter in the page directive to false so it will not be generated. to clarify more this point if you try to write the following expression in a JSP (test.jsp) :
and you deploy your application and request the test.jsp you will always get a true.
hope you got it ;)
Omar Al Kababji - Electrical & Computer Engineer
[SCJP - 90% - Story] [SCWCD - 94% - Story] [SCBCD - 80% - Story] | My Blog
Joined: Feb 06, 2008
Ok , so it is only if I wanted to exclude a page from being part of a session.
if I had a page with
<%@page language="java" session="false" %>
Then I do try to use session varable what will it do ?
And could I have to different sessions at the same time over my jsp pages?
Working for the first time with sessions my boss wants me to figure out a problem with this session stuff.
What is happening is we are using jetty application server.
Whenever we change the password. And try to login in with the new password it won't let us.
We still have to use the old password. Until we shutdown the server an restart it.
I know the password is being stored properly in the mysql database when the use click save new password button.
The problem is when he clicks log out and goes back into the login page and types the new password it won't work. But the old password works until we shutdown the server. How is this even possible the old password isn't even in the data base.
Is something caching the old password I am using <form id="form-login" name="login" method="post" action="j_security_check" >
could this be caching the old password or doing something werid. I would think it would be using the current thing stored in the database?
And on top of all this my boss is pushing me to figure this out. AAAAAAAAAAA H
Joined: Feb 06, 2008
Figured it out for anybody that wants to know or is working with jetty application server.
You must set the cachetime = 0 by default it is 300.
This is why I would get an error even though the password was different in the database.
Also you obviously need session.invalidate() on your logout page hope this helps somebody.
With my similar problem it to all day to figure it out :lol: