According to http://docs.jboss.org/jbossweb/2.1.x/sysprops.html it's a system property.
You can set this by adding:
to the value of the JAVA_OPTS environment variable to $JBOSS_HOME/bin/run.conf or %JBOSS_HOME%\bin\run.conf.bat files as appropriate.
You can also mitigate this problem by adding:
Session tempSession = request.getSession(false);
if (tempSession != null)
to the JSP that you have configured for your form login, or equivalent if it's not a JSP.