You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Xavier Lawrence <xl...@jahia.com> on 2005/01/21 16:13:06 UTC

Portlets and filters

Hello,

I have a working struts application that I am trying to change to a
portlet. I was asking myself how were filters managed in the portlet
world. I seem to have a slight problem with those, they seem to be not
considered by the portlet.

That is, the non-portlet webApp works fine, but the portlet struts app
encounters problems because some filter methods don't seem to be called...

Any help is appreciated on the subject. Below is a piece of my web.xml file


<filter>
    <filter-name>XSLT Filter</filter-name>
    <filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>directoryBrowsingDisallowed</param-name>
      <param-value>no</param-value>
    </init-param>
  </filter>

  <filter>
    <filter-name>SvcI Filter</filter-name>
    <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
  </filter>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Portlets and filters

Posted by Ate Douma <at...@douma.nu>.
No, 2.4 has a Schema definition.

Use the following:

<?xml version="1.0" encoding="ISO-8859-1"?>
   <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
            http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
            version="2.4">

and read Servlet 2.4 SRV.6.2.5 Filters and the RequestDispatcher.

Xavier Lawrence wrote:
> So to do that, I need to specify the DTD version 2.4 in the DOCTYPE ???
> 
> 
> 
>>Tomcat 5 still supports Servlet 2.3 and if you don't define your web.xml
>>as requiring 2.4
>>it will behave as a 2.3 container.
>>
>>Xavier Lawrence wrote:
>>
>>>I am using Tomcat 5.0.28
>>>
>>>
>>>
>>>>I guess you are not running under Servlet 2.4?
>>>>Then it won't work.
>>>>Only since Servlet 2.4 will filters work for dispatched requests.
>>>>
>>>>Xavier Lawrence wrote:
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>I have a working struts application that I am trying to change to a
>>>>>portlet. I was asking myself how were filters managed in the portlet
>>>>>world. I seem to have a slight problem with those, they seem to be not
>>>>>considered by the portlet.
>>>>>
>>>>>That is, the non-portlet webApp works fine, but the portlet struts app
>>>>>encounters problems because some filter methods don't seem to be
>>>>>called...
>>>>>
>>>>>Any help is appreciated on the subject. Below is a piece of my web.xml
>>>>>file
>>>>>
>>>>>
>>>>><filter>
>>>>>   <filter-name>XSLT Filter</filter-name>
>>>>>   <filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
>>>>>   <init-param>
>>>>>     <param-name>debug</param-name>
>>>>>     <param-value>0</param-value>
>>>>>   </init-param>
>>>>>   <init-param>
>>>>>     <param-name>directoryBrowsingDisallowed</param-name>
>>>>>     <param-value>no</param-value>
>>>>>   </init-param>
>>>>> </filter>
>>>>>
>>>>> <filter>
>>>>>   <filter-name>SvcI Filter</filter-name>
>>>>>   <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
>>>>>   <init-param>
>>>>>     <param-name>debug</param-name>
>>>>>     <param-value>0</param-value>
>>>>>   </init-param>
>>>>> </filter>
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Portlets and filters

Posted by Xavier Lawrence <xl...@jahia.com>.
So to do that, I need to specify the DTD version 2.4 in the DOCTYPE ???


> Tomcat 5 still supports Servlet 2.3 and if you don't define your web.xml
> as requiring 2.4
> it will behave as a 2.3 container.
>
> Xavier Lawrence wrote:
>> I am using Tomcat 5.0.28
>>
>>
>>>I guess you are not running under Servlet 2.4?
>>>Then it won't work.
>>>Only since Servlet 2.4 will filters work for dispatched requests.
>>>
>>>Xavier Lawrence wrote:
>>>
>>>>Hello,
>>>>
>>>>I have a working struts application that I am trying to change to a
>>>>portlet. I was asking myself how were filters managed in the portlet
>>>>world. I seem to have a slight problem with those, they seem to be not
>>>>considered by the portlet.
>>>>
>>>>That is, the non-portlet webApp works fine, but the portlet struts app
>>>>encounters problems because some filter methods don't seem to be
>>>>called...
>>>>
>>>>Any help is appreciated on the subject. Below is a piece of my web.xml
>>>>file
>>>>
>>>>
>>>><filter>
>>>>    <filter-name>XSLT Filter</filter-name>
>>>>    <filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
>>>>    <init-param>
>>>>      <param-name>debug</param-name>
>>>>      <param-value>0</param-value>
>>>>    </init-param>
>>>>    <init-param>
>>>>      <param-name>directoryBrowsingDisallowed</param-name>
>>>>      <param-value>no</param-value>
>>>>    </init-param>
>>>>  </filter>
>>>>
>>>>  <filter>
>>>>    <filter-name>SvcI Filter</filter-name>
>>>>    <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
>>>>    <init-param>
>>>>      <param-name>debug</param-name>
>>>>      <param-value>0</param-value>
>>>>    </init-param>
>>>>  </filter>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>


-- 
-------------=[ xlawrence at jahia dot com ]=-------------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
www.collaborativesource.org Jahia's collaborative license




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Portlets and filters

Posted by Ate Douma <at...@douma.nu>.
Tomcat 5 still supports Servlet 2.3 and if you don't define your web.xml as requiring 2.4
it will behave as a 2.3 container.

Xavier Lawrence wrote:
> I am using Tomcat 5.0.28
> 
> 
>>I guess you are not running under Servlet 2.4?
>>Then it won't work.
>>Only since Servlet 2.4 will filters work for dispatched requests.
>>
>>Xavier Lawrence wrote:
>>
>>>Hello,
>>>
>>>I have a working struts application that I am trying to change to a
>>>portlet. I was asking myself how were filters managed in the portlet
>>>world. I seem to have a slight problem with those, they seem to be not
>>>considered by the portlet.
>>>
>>>That is, the non-portlet webApp works fine, but the portlet struts app
>>>encounters problems because some filter methods don't seem to be
>>>called...
>>>
>>>Any help is appreciated on the subject. Below is a piece of my web.xml
>>>file
>>>
>>>
>>><filter>
>>>    <filter-name>XSLT Filter</filter-name>
>>>    <filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
>>>    <init-param>
>>>      <param-name>debug</param-name>
>>>      <param-value>0</param-value>
>>>    </init-param>
>>>    <init-param>
>>>      <param-name>directoryBrowsingDisallowed</param-name>
>>>      <param-value>no</param-value>
>>>    </init-param>
>>>  </filter>
>>>
>>>  <filter>
>>>    <filter-name>SvcI Filter</filter-name>
>>>    <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
>>>    <init-param>
>>>      <param-name>debug</param-name>
>>>      <param-value>0</param-value>
>>>    </init-param>
>>>  </filter>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Portlets and filters

Posted by Xavier Lawrence <xl...@jahia.com>.
I am using Tomcat 5.0.28

> I guess you are not running under Servlet 2.4?
> Then it won't work.
> Only since Servlet 2.4 will filters work for dispatched requests.
>
> Xavier Lawrence wrote:
>> Hello,
>>
>> I have a working struts application that I am trying to change to a
>> portlet. I was asking myself how were filters managed in the portlet
>> world. I seem to have a slight problem with those, they seem to be not
>> considered by the portlet.
>>
>> That is, the non-portlet webApp works fine, but the portlet struts app
>> encounters problems because some filter methods don't seem to be
>> called...
>>
>> Any help is appreciated on the subject. Below is a piece of my web.xml
>> file
>>
>>
>> <filter>
>>     <filter-name>XSLT Filter</filter-name>
>>     <filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
>>     <init-param>
>>       <param-name>debug</param-name>
>>       <param-value>0</param-value>
>>     </init-param>
>>     <init-param>
>>       <param-name>directoryBrowsingDisallowed</param-name>
>>       <param-value>no</param-value>
>>     </init-param>
>>   </filter>
>>
>>   <filter>
>>     <filter-name>SvcI Filter</filter-name>
>>     <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
>>     <init-param>
>>       <param-name>debug</param-name>
>>       <param-value>0</param-value>
>>     </init-param>
>>   </filter>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>


-- 
-------------=[ xlawrence at jahia dot com ]=-------------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
www.collaborativesource.org Jahia's collaborative license




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Portlets and filters

Posted by Ate Douma <at...@douma.nu>.
I guess you are not running under Servlet 2.4?
Then it won't work.
Only since Servlet 2.4 will filters work for dispatched requests.

Xavier Lawrence wrote:
> Hello,
> 
> I have a working struts application that I am trying to change to a
> portlet. I was asking myself how were filters managed in the portlet
> world. I seem to have a slight problem with those, they seem to be not
> considered by the portlet.
> 
> That is, the non-portlet webApp works fine, but the portlet struts app
> encounters problems because some filter methods don't seem to be called...
> 
> Any help is appreciated on the subject. Below is a piece of my web.xml file
> 
> 
> <filter>
>     <filter-name>XSLT Filter</filter-name>
>     <filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
>     <init-param>
>       <param-name>debug</param-name>
>       <param-value>0</param-value>
>     </init-param>
>     <init-param>
>       <param-name>directoryBrowsingDisallowed</param-name>
>       <param-value>no</param-value>
>     </init-param>
>   </filter>
> 
>   <filter>
>     <filter-name>SvcI Filter</filter-name>
>     <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
>     <init-param>
>       <param-name>debug</param-name>
>       <param-value>0</param-value>
>     </init-param>
>   </filter>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


RE: Portlets and filters

Posted by Colin O'Toole <co...@pacemetrics.com>.
I believe you need to be running a servlet2.4 - compatible container and
include the <dispatcher> tags inside your <filter-mapping> element.

See the thread below for details:

http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg14477.html

-----Original Message-----
From: Xavier Lawrence [mailto:xlawrence@jahia.com]
Sent: 21 January 2005 15:13
To: Jetspeed Users List
Cc: Jetspeed Developers List
Subject: Portlets and filters


Hello,

I have a working struts application that I am trying to change to a
portlet. I was asking myself how were filters managed in the portlet
world. I seem to have a slight problem with those, they seem to be not
considered by the portlet.

That is, the non-portlet webApp works fine, but the portlet struts app
encounters problems because some filter methods don't seem to be called...

Any help is appreciated on the subject. Below is a piece of my web.xml file


<filter>
    <filter-name>XSLT Filter</filter-name>

<filter-class>edu.rpi.sss.util.servlets.ConfiguredXSLTFilter</filter-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>directoryBrowsingDisallowed</param-name>
      <param-value>no</param-value>
    </init-param>
  </filter>

  <filter>
    <filter-name>SvcI Filter</filter-name>
    <filter-class>edu.rpi.cct.uwcal.webcommon.UWCalSvciFilter</filter-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
  </filter>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org