You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by fr...@virgilio.it on 2001/06/11 22:52:08 UTC

XML and browsers

Hi,
I'm running Tomcat 4.0 m5 with Cocoon2 on Apache 3.1.19 and mod_webapp.

Scenario:

1)lynx http://localhost:8080/examples/servlets/ shows Tomcat's examples
(servlets and JSP) file correctly.

2)lynx http://localhost:8080/examples/cocoon/ shows Cocoon's xml files correctly

3)lynx http://localhost/examples/servlets/ works as 1)

4)lynx http://localhost/examples/cocoon/ has a strange behaviour.
  When I select an xml file, browser asks me if I would save the file on   hard disk. \
Now it doesn't recognise .xml extension!  The same with Netscape.

Is this a problem in httpd.conf or in server.xml (or in web.xml)?

Any answer wellcome!

Regards, ciao
Francesco

PS The same message has been posted on tomcat-user. This is because
my problem seems between Tomcat and Apache but it's a XML-related one.

Francesco Casalena
L.U.G. "Il Pinguino"
----------------------------------------------
Virgilio Mail - Il tuo indirizzo E-mail gratis
http://mail.virgilio.it


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: XML and browsers

Posted by Holger Prause <ho...@detewe.de>.

francesco.casalena@virgilio.it schrieb:

> Hi,
> I'm running Tomcat 4.0 m5 with Cocoon2 on Apache 3.1.19 and mod_webapp.
>
> Scenario:
>
> 1)lynx http://localhost:8080/examples/servlets/ shows Tomcat's examples
> (servlets and JSP) file correctly.
>
> 2)lynx http://localhost:8080/examples/cocoon/ shows Cocoon's xml files correctly
>
> 3)lynx http://localhost/examples/servlets/ works as 1)
>
> 4)lynx http://localhost/examples/cocoon/ has a strange behaviour.
>   When I select an xml file, browser asks me if I would save the file on   hard disk. \
> Now it doesn't recognise .xml extension!  The same with Netscape.
>
> Is this a problem in httpd.conf or in server.xml (or in web.xml)?
>

Hi

i had the same problem a time ago and i think  i have the solution:

The following statem,ents are taken fromn the cocoon-documentation

<cut>
To make Cocoon work with Tomcat, you must add a context to Tomcat that describes to Tomcat
how to load Cocoon files. Then you must tell Apache to send certain requests to Tomcat (and
consequently Cocoon). Finally you must provide the .xml files to be served by Cocoon. These
steps are outlined below
</cut>

-> If you dont do so , the Webserver cant recoginze the *.xml context and the browser asks
you save the file on   hard disk

<cut>
A context in Tomcat describes to Tomcat how and when to load a particular servlet and
Cocoon is one such servlet. First we need to make sure that Tomcat knows how to load the
Cocoon .jar files. To begin with, you must copy any .jar files from $COCOON_HOME/lib to
$TOMCAT_HOME/lib that are necessary for Cocoon to run (see top of page). In addition, you
must copy $COCOON_HOME/bin/cocoon.jar to $TOMCAT_HOME/lib.

In recent versions of Tomcat under Unix and Windows, Tomcat will automatically detect any
.jar files in the $TOMCAT_HOME/lib directory. But with Tomcat 3.1 under Windows only, you
must explicitly add the new .jar files in the appropriate place in the file
$TOMCAT_ROOT/bin/tomcat.bat.

Next you must tell Tomcat about the new context which will run Cocoon requests. To do this
edit the file $TOMCAT_HOME/conf/server.xml and add the following line:


  <Context path="/cocoon" docBase="webapps/cocoon" debug="0" reloadable="true" >
 </Context>


This tells Tomcat that requests that come in under that partial path "/cocoon" should be
mapped to the context defined in the directory "webapps/cocoon".
</cut>

That will do the job i think.You can also take a look at the good documentarion.The docs
can be found at

$COCOON_HOME/docs

Then just klick install.html

Bye,

Holger


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>