File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes setMaxInactiveInterval and setMaxAge ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "setMaxInactiveInterval and setMaxAge ?" Watch "setMaxInactiveInterval and setMaxAge ?" New topic

setMaxInactiveInterval and setMaxAge ?

Jesus Doe

Joined: Apr 14, 2006
Posts: 4
I was wondering if someone could explain the differance between both of these. I would like to know how each works.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

setMaxInactiveInterval is used to set the session timeout, while setMaxAge is used to set a cookie's life time limit.

[My Blog]
All roads lead to JavaRanch
Jesus Doe

Joined: Apr 14, 2006
Posts: 4
So, if i had a form to submit a username... using maxInterval.. and I submited to a page that would then link to a page and dispaly the name...once i reach the time out the username would become null... but by simply refreshing the name would become accessible again and for maxAge on refresh i would still not be able to access the username once the max life had been reach unless i go back to enter the username.
I think I may be incorrect in my thinking...
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

"Jesus Doe",
We're pleased to have you here with us in the JSP forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: setMaxInactiveInterval and setMaxAge ?
It's not a secret anymore!