Search code examples
jsficefaces

IceFaces: inputRichText - session timeout while typing


I'm using the inputRichText component for composing HTML-formatted messages in a system I'm working on.

I've encountered a problem, however. It seems the session times out, even when the user is working in the editor.

I tried setting the session timeout parameter in web.xml to 1 minute and started typing in the editor. After 1 minute the "User session expired" dialog box appeared. Is there any way to make the rich text editor component keep the session alive? It's pretty annoying to work on something for a while only to loose it to a session time out, event though you haven't been inactive.

This is the code I use to display the component in the page:

<ice:inputRichText height="250" toolbar="MyToolbar" customConfigPath="/FCKconfig.js" id="messageBody" value="#{bean.messageBody}" language="sv" saveOnSubmit="true" />

Thanks!

Edit:

I solved it using a periodic JavaScript calling into a servlet implementing the stuff outlined in this IceFaces JIRA report

If there's a better way, please let me know :)


Solution

  • I solved it using a periodic JavaScript calling into a servlet implementing the stuff outlined in this IceFaces JIRA report.

    It basically allows a servlet to "touch" the session and hence keep it alive.

    If there's a better way, please let me know :)