Hi,

Sorry, I had to sleep in the meantime ;-).

Yes, of course you will need to have the SessionInactivityFilter and it's
dependencies in your webapp.
The easiest is probably to just include the jar containing it. To do that
get the binary distribution of JWP:

http://prdownloads.sourceforge.net/javawebparts/javawebparts-1.0-beta6-bin.zip?download

Unzip it, you will have the javawebparts directory in it which is an
exploded WAR.

Go to javawebparts/WEB-INF/lib, you will see all the components jared by
package.
You'll need the javawebparts-filter-1.0-beta6.jar so just copy it from
javawebparts/WEB-INF/lib to your web applications WEB-INF/lib.
Leave your web.xml as it is (e.g. filter and filter-mapping elements
configured yesterday) and it should work now.

Sorry, if the process isn't straightforward, maybe it's time for us to
update the FAQ, with instructions on how to set up things.

Hope it will all be fine now,

Tamas


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


Hi Tamas

I am getting this error. do I need to inculde class
SessionInactivityFilter
or implement this class. I didn't understand how it is going to work.

Servlet error: Error loading filter 'SessionInactivityFilter',
filter-class
'javawebparts.filter.SessionInactivityFilter' not found

This is how my web.xml looks like;
<filter>
    <filter-name>SessionInactivityFilter</filter-name>
    <filter-class>javawebparts.filter.SessionInactivityFilter
</filter-class>
    <init-param>
     <param-name>forwardTo</param-name>
     <param-value>/sessionError.do</param-value>
    </init-param>
  </filter>
  <filter-mapping>
     <filter-name>SessionInactivityFilter</filter-name>
     <url-pattern>/*</url-pattern>
  </filter-mapping>



Tamas Szabo wrote:
>
> Did you also map the filter to /* with a filter-mapping?
>
> Just after the filter element you declared you should have:
>
> <filter-mapping>
>   <filter-name>SessionInactivityFilter< /filter-name>
>   <url-pattern>/*</url-pattern>
> </filter-mapping>
>
>  This is the first think I can think of.
>
> If you think that you got that right it would be good if I could see
your
> whole web.xml file.
>
> Tamas
>
>
>
>
> On 9/25/06, mosho <[EMAIL PROTECTED]> wrote:
>>
>>
>> Thanks Tamas. That seems to get rid of the errors but it doesn't work.
>> When
>> the session expires, it doesn't take me to any page, I tried forwarding
>> to
>> struts actions and .jsp files, it doesn;t work for both. Any idea?
>>
>>   <filter>
>>     <filter-name>SessionInactivityFilter</filter-name>
>>     <filter-class>javawebparts.filter.SessionInactivityFilter
>> </filter-class>
>>     <init-param>
>>      <param-name>forwardTo</param-name>
>>      <param-value>/sessionError.do</param-value>
>>     </init-param>
>>   </filter>
>>
>>
>> Tamas Szabo wrote:
>> >
>> > 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]
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/Question-about-session-time-out-using-Listener-tf2329396.html#a6488051
>> 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#a6489959
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