掲示板

how to implement filter in liferay and redirect to URL

7年前 に Abutalib Shaikh によって更新されました。

how to implement filter in liferay and redirect to URL

Junior Member 投稿: 36 参加年月日: 16/05/17 最新の投稿
Hi ,

we implement hook for filter mapping , filter works fine
- but we have following scenario :
1. if user is belongs to "test" group then
redirect to for e.g. "www.test.com" i used http sendredirect() method for that
- but problem is that seems no redirection is done

2. if user is not belongs to "test" group
do nothing, proceed as normal
do chain (); method call

- i implement filter and print some statements in do filter () method
- when hit a request method was call but for 1 request 15 times that statement (dofilter () method is calling)
- so may overheads on Database check every time user belongs to that group or not please suggest any alternative way for this

so please suggest way how i proceed and URL redirection issue


thank you in advance emoticon
thumbnail
5年前 に Andrew Jardine によって更新されました。

RE: how to implement filter in liferay and redirect to URL

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi Abutalib,

Your approach sounds correct -- can you share your code with us? Perhaps if we see the actual lines something will jump out for one of us.
thumbnail
5年前 に Victor Zorin によって更新されました。

RE: how to implement filter in liferay and redirect to URL

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
Generally it depends on how the filter is mapped,
e.g. if somehow your filter has been on the invocation of portlet render urls and there 15 of them to be called on the page, you filter will be called 15 times.
On another note, very likely that the database will not be called 15 times, only once due to caching. However it is still an overhead.
5年前 に Abutalib Shaikh によって更新されました。

RE: how to implement filter in liferay and redirect to URL

Junior Member 投稿: 36 参加年月日: 16/05/17 最新の投稿
Thank's for the feedback,

I have achieve this by using service pre action with hook plugin