cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Maitre <Ludovic.Mai...@sophia.inria.fr>
Subject Re: Web.inf questions
Date Thu, 11 Jan 2001 13:38:27 GMT
Ivan wrote:

> Wap Browser). I only would like to know if it's posible to store
> *.wml files and *.wbmp files under a Cocoon working
> directory instead of place wml and wbmp files in a Apache web
> directory, and how can I setup up web.inf (if it's the correct
> place) to accept Cocoon and Tomcat to serve wml and wbmp
> files from a Cocoon directory. Nowadays my Wap Browser sends
> me 404 error or when I debug , it returns me
> 'No traslator for content type text/plain' when I ask for a wbmp file.

I haven't a lot of experience with this but I think that first you must add a handler in Apache
who redirect wml files to Tomcat in the httpd.conf of Apache like :

AddType text/wml .wml
AddHandler jserv-servlet .wml
<LocationMatch /*.wml>
  SetHandler jserv-servlet
</LocationMatch>

(with mod_jserv, i don't know if this is different for mod_jk,
and don't forget to add alias for your Cocoon directory in Apache)

And you must also create a servlet mapping for redirect the wml page to Cocoon (in the web.xml
file of Cocoon)

<servlet-mapping>
        <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
        <url-pattern>*.wml</url-pattern>
</servlet-mapping>

With this you must place your files (text and pictures) in a directory visible for the cocoon
servlet,
i.e. under the Cocoon root (who is generally under the tomcat webapps root directory).
Typically under TOMCAT_HOME/webapps/cocoon/

And (perhaps, i haven't try) that you can add a mime mapping to Tomcat for specifying the
mime-type of wml
(it's also declared in Cocoon.properties but try it if the 2 first steps don't solve your
problem):

    <mime-mapping>
        <extension>
            wml
        </extension>
        <mime-type>
            text/wml
        </mime-type>
    </mime-mapping>

but for this i don't know if you must also declare it in Apache and if you must place this
mapping in the
Tomcat conf file (TOMCAT_HOME/conf/web.xml) or if you can declare it only in the Cocoon web.xml
file
(i think yes 'cause it's the same DTD for the Tomcat and the webapps conf files)

OK, good luck,

Regards,

--
 Ludovic.Maitre@sophia.inria.fr

 INRIA - 2004 route des lucioles - BP 93    Tel: (33/0) 4 92 38 50 41
 06902   SOPHIA-ANTIPOLIS cedex (France)    Fax: (33/0) 4 92 38 76 02




Mime
View raw message