Josh2007 pisze:
> Hi,
> 
> I'm implementing an Xquery Servlet as a block in Cocoon 2.2
> Prior to Cocoon 2.2 I was able to define servlet-mapping in my web.xml.
> Now, is there a way to get the same result when the Servlet is declared as a
> Spring bean?

You can still use web.xml for defining servlet-mapping but using SSF[1] and 
definig a servlet as a
Spring bean is advised because it brings several serious advantages.

> something like:
> 
> <bean name="XqueryServlet" class="org.my.class.servlets.XqueryServlet">
>     <servlet:context mount-path="/xquery"
> context-path="blockcontext:/xquery/">
>     <servlet:init-params>
>     <entry key="basedir" value="WEB-INF"/>
>     <entry key="start" value="true"/>
>     </servlet:init-params>
>     <servlet:mapping>
>     <entry value="*.xq"/>
>     <entry value="*.xql"/>
>     </servlet:mapping>
>     </servlet:context>
>     </bean>
> 

Yep, such configuration should work well apart from I'm not sure about <entry 
value="*.xq"/> is put
in a right place.

If you have more specific questions/troubles don't hesitate to ask.

[1] http://cocoon.zones.apache.org/daisy/cdocs-servlet-service-impl/g1/1412.html

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to