Hello folks, is possible to create session variables in web.xml? I�d like to create some default values to all servlets.
No, there are no suck directives. However, you can write a HttpSessionListener, install it using the web.xml element <listener>, and have it do something like this:
public void sessionCreated(HttpSessionListenerEvent e)
{
HttpSession session = e.getSession(); session.setAttribute("default1", ...");
session.setAttribute("default2", ...");
.
.
.
}-chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
