S
S
sainnr2011-11-24 17:50:54
Java
sainnr, 2011-11-24 17:50:54

How can a web.xml parameter be read inside a bean?

You need to get the <session-timeout> value from web.xml inside the bean.

There is an armor-piercing method - to parse web.xml, but it does not differ in elegance. Maybe there are some alternative methods?

Or, specifically for session timeout, is it possible to read the actual value from somewhere else?

[edited]

We are talking about EJBs, not Java Beans (POJOs).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Mamaev, 2011-11-24
@sainnr

HttpSession session = request.getSession();
session.getMaxInactiveInterval();

But what if "someone" changes it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question