cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernhard Huber" <bh22...@i-one.at>
Subject Re: Wrap an HttpServletRequest
Date Mon, 19 Nov 2001 23:24:24 GMT
Yes,
You can use the JSPEngineImplNamedDispatcherInclude generator.

You have to setup your cocoon.xconf:
<?xml version="1.0"?>
<cocoon version="2.0" user-roles="WEB-INF/my.roles">

Next you have to create WEB-INF/my.roles:
<?xml version="1.0"?>
<role-list>
  <role name="org.apache.cocoon.components.jsp.JSPEngine"
    shorthand="jsp-engine"
    
default-class="org.apache.cocoon.components.jsp.JSPEngineImplNamedDispatcherInclude"/>

Last you have to configure a generator like your sitemap.xmap:
  <map:generator  name="myservlet"         
src="org.apache.cocoon.generation.JspGenerator"  label="content">
    <!-- serlvet-name is resolved using context.getNamedDispatcher -->
    <servlet-name>the-servlet-name</servlet-name>
  </map:generator>

I hope this works, the other way is to write a new generator merging 
JSPEngine, and JSPEngineImplNamedDispatcherInclude...

bye



Diego del Río wrote:

> Is there any way to wrap an HttpServletRequest in Tomcat 3.2.x and 
> then forward the wrapped request to anoher servlet?
>
> We need a 'decorated request' with added functionality, more 
> precisely, we need to add 'extra-parameters' to that request and then 
> forward it to another servlet that process both the original and the 
> added parameters.
>
> Thanks,
>
> diego
>


Mime
View raw message