Yes, you probably just added the filter at the end of the web.xml, after the
<error-page> element that you already had in there.

You have to declare the elements in the order defined by the DTD.
For 2.3 this is:

<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, filter*, filter-mapping*, listener*, servlet*,
servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

So try to have the declaration of the filter and filter-mapping just before
the listener elements or  the servlet element if you don't have any
listeners declared.

Please don't hesitate to contact us if you have any other problems.

Tamas




On 9/25/06, mosho <[EMAIL PROTECTED]> wrote:


Thanks for all your replies.
My application is a struts application. I tried to use
SessionInactivityFilter, i am getting compilation errors.
I just have to include the following in my xml file or I need to do
something else also:

<filter>
  <filter-name>SessionInactivityFilter</filter-name>
  <filter-class>javawebparts.filter.SessionInactivityFilter</filter-class>
  <init-param>
    <param-name>forwardTo</param-name>
    <param-value>/session_expired.jsp</param-value>
  </init-param>
</filter>

I get the following error:
Error(108,9): Invalid element 'filter' in content of 'web-app', expected
elements '[taglib, resource-env-ref, resource-ref, security-constraint,
login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'.


Tamas Szabo wrote:
>
> Hi,
>
> You can use SessionInactivityFilter from the JavaWebParts project if you
> don't want to reinvent the wheel:
>
> Doc:
>
http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/SessionInactivityFilter.html
>
> JWP Home Page:
> http://javawebparts.sourceforge.net/
>
> Good Luck,
>
> Tamas
>
>
>
>
>
http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/SessionInactivityFilter.html
>
> On 9/25/06, mosho <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> Hi All,
>>
>> When session times out I want to forward a request to another page.Isit
>> possible to do it with HttpSessionListener?
>> How can I get response object so that I can redirect to another page?
>>
>> Thanks for your  help!
>> --
>> View this message in context:
>>
http://www.nabble.com/Question-about-session-time-out-using-Listener-tf2329396.html#a6480246
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/Question-about-session-time-out-using-Listener-tf2329396.html#a6486905
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to