I do not know if this a correct way of doing by removing from web.xml following items:
<param-name> scratchdir </param-name>
<param-value> /temp < /param-value>
It fixed the incorrect index.jsp problem.
I'm having the same problem with JBoss 3.2.2. Can you tell me which web.xml file you modified? Thanks!