aspose file tools*
The moose likes Websphere and the fly likes problem with Servlet Filter in Portal environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "problem with Servlet Filter in Portal environment" Watch "problem with Servlet Filter in Portal environment" New topic
Author

problem with Servlet Filter in Portal environment

Dashk Uzjd
Greenhorn

Joined: Jun 26, 2007
Posts: 1
I need help on filters in WebSphere Portal 5.1.x environment. I�ve tried to implement both Servlet Filter and Portlet Filter, but none of them work as expected. Here is the layout of my application specified in DD:

<web-app id='SomeID'>

<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class></servlet-class>
</servlet>

<servlet id='SomeServletID'>
<servlet-name>NotSimpleServlet</servlet-name>
<servlet-class>com.ibm.wps.pb.wrapper.PortletWrapper</servlet-class>
<init-param>
<param-name>c2a-application-portlet-class</param-name>
<param-value>
com.abnamro.oce.presentation.common.portlets.WpsStrutsPortlet
</param-value>
</servlet>

</web-app>


In other words I have normal servlet SimpleServlet and portlet NotSimpleServlet. Note, I use Struts 1.<something> that�s why there is WpsStrutsPortlet included in NotSimpleServlet description.

I will not touch the Portlet Filter, otherwise the post will be too big. Here is my Servlet definition:

...
<filter>
<filter-name>MyServletFilter</filter-name>
<filter-class>foo.my.MyServletFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MyServletFilter</filter-name>
<servlet-name>SimpleServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>MyServletFilter</filter-name>
<servlet-name>NotSimpleServlet</servlet-name>
</filter-mapping>
...
The problem is that the Servlet Filter works only for the SimpleServlet, but not NotSimpleServlet. In other words when I trigger SimpleServlet the filter is invoked, while triggering of NotSimpleServlet does not invoke the filter.

Does any one have any clue why this does not work?

Thanks in advance,
Uzjd
[ June 02, 2008: Message edited by: Dashk Uzjd ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem with Servlet Filter in Portal environment