You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ivan <if...@latinia.com> on 2001/01/10 13:23:46 UTC

Web.inf questions

Hi all!

Well my questions are all about encoding and directory storage.
About encoding, where can I choose the WML(XML) encoding , because
I'm using cocoon to serve wml files made with XML+XSL and the default
encoding is UTF-8. I would like to get iso-8859-1 encoding to see special
caracters and tildes in spanish language. Tried to change encoding in
cocoon.properties, but no way out.

The other thing, is how could I store in the same directory XML and 
WML(WBMP too) files, because only recognises the XML ones, but
the WML are served like text only file (no way to get anything in a WAP
browser), or get an 404 error.

TIA

Iván Fontán
Technical Department

LATINIA CORPORATION 
www.latinia.com

Spain Office
Barcelona
Trav. Gràcia, 342-344
08025 Barcelona (Spain)
Tel.: +34 934 465 026

US Offices
New York
885 3rd Avenue
Suite 2800
New York, NY 10022

Miami
1210 Brickell Avenue
Suite 430
Miami, FL 33131

Re: Web.inf questions

Posted by Ulrich Mayring <ul...@denic.de>.
Ivan wrote:
> 
> And, OT ... Robin, it's not necesary
> that you remind us 4 times, that this question could be
> off the topic in this list. If you don't want to help, or
> you don't know how to solve this problem, don't do
> it, but let us try to solve this problem if we can ...

The alternative to telling you that you spammed this list with OT stuff
is removing you from the list. But I think it is much nicer to tell
people, when they have made a mistake, and give them a chance to learn
:)

> There are many many off topic mails in this list to
> bother you for 3 or 4 mails ... Thanks for your
> comprehension. Maybe Ludovic could help some
> other people too with this topic :)

You can take your OT discussion to private email, to another list or to
a newsgroup. There are plenty of options.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

[OT] RE: Web.inf questions

Posted by Edas Pazera <ed...@usa.net>.
ALL:

I disagree with you or anyone who wants to remove someone from any list.
Consider it my two cents as I have found myself in situations where I asked
questions which either went unanswered or, possibly, even were off-topic at
times.

If you are or someone else are an "advanced user" or "developer" cannot find
time to answer questions--and that is perfectly understandable--please
don't.  When the question gets unanswered I just assume that: (1) no-one
knows how to answer it, (2) no-one cares to answer it because of one
assumption or the other on their part, or (3) my question is off-topic and
is being ignored.  And that was and is fine with me, as frustrating as it
may feel sometime.

I believe that pointing out the OT mails is necessary for the reasons you
all pointed out but after that these should be just ignored.  Removing
sounds a little bit too fascist, don't you think?  What next, we will start
removing people who ask too many questions? :-)

--Edas


-----Original Message-----
From: ulim [mailto:ulim]On Behalf Of Ulrich Mayring
Sent: Friday, January 12, 2001 8:44 AM
To: cocoon-users@xml.apache.org
Subject: Re: Web.inf questions


Michael Bierenfeld wrote:
>
> Hi,
>
> removing people from the list is imho the wrong way. I think that the
> list is a valuable source of information related to cocoon. And nobody
> should be excluded from that.
>
> I have subscribed both cocoon-users and mullberrytech. This lists rocks
> for xsl-questions. But anyway you can make the same experiences in any
> list or newsgroup. A lot of people are not willing to read manuals or
> faq's. Its the pokemon generation. Suggestions ?

What we are currently doing is tell people, when they make a mistake,
and assume that they'll learn from it. There are really only two
mistakes: posting off-topic and not reading FAQ/mailarchive before
posting. Very simple, actually, so this procedure ensures that the
reasonable people have a way to stay on this list. The unreasonable
people must be excluded, I see no alternative. However, I want to stress
that we haven't had any unreasonable people on this list yet - but it is
to be expected that some kind of spammer will eventually get on it.

Ulrich

--
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org



Re: Web.inf questions

Posted by Ulrich Mayring <ul...@denic.de>.
Michael Bierenfeld wrote:
> 
> Hi,
> 
> removing people from the list is imho the wrong way. I think that the
> list is a valuable source of information related to cocoon. And nobody
> should be excluded from that.
> 
> I have subscribed both cocoon-users and mullberrytech. This lists rocks
> for xsl-questions. But anyway you can make the same experiences in any
> list or newsgroup. A lot of people are not willing to read manuals or
> faq's. Its the pokemon generation. Suggestions ?

What we are currently doing is tell people, when they make a mistake,
and assume that they'll learn from it. There are really only two
mistakes: posting off-topic and not reading FAQ/mailarchive before
posting. Very simple, actually, so this procedure ensures that the
reasonable people have a way to stay on this list. The unreasonable
people must be excluded, I see no alternative. However, I want to stress
that we haven't had any unreasonable people on this list yet - but it is
to be expected that some kind of spammer will eventually get on it.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Web.inf questions

Posted by Michael Bierenfeld <mi...@atmiralis.de>.
Hi,

removing people from the list is imho the wrong way. I think that the
list is a valuable source of information related to cocoon. And nobody
should be excluded from that.

I have subscribed both cocoon-users and mullberrytech. This lists rocks
for xsl-questions. But anyway you can make the same experiences in any
list or newsgroup. A lot of people are not willing to read manuals or
faq's. Its the pokemon generation. Suggestions ?

Michael

Re: Web.inf questions [last one on this]

Posted by Ivan <if...@latinia.com>.
First of all, sorry for spamming this list. My
apologies to all the list.
Thanks Donald, and thanks Ulrich too. My first
question was on the topic, but anyway, I could
understand that the second one, would not be
about Cocoon (didn't know it yesterday), but
thought that some other people were using
Cocoon and Tomcat together in this list too,
eventhough some people could be using
Cocoon and Tomcat to serve WML files.
But's not that case. I was in a error.
Robin, or other else people who may be
f*ck*d (and sorry for the expression), if you
want, remove me from the list, but anyway,
now I'm a begginer, and I'm learning,
because I would like to help people in a near
future, and be an acitve part on this list too ...

Thanks for your three valuable minutes.

OT: Ludovic, that didn't work =(

Iván Fontán
Technical Department

LATINIA CORPORATION
www.latinia.com

Spain Office
Barcelona
Trav. Gràcia, 342-344
08025 Barcelona (Spain)
Tel.: +34 934 465 026

US Offices
New York
885 3rd Avenue
Suite 2800
New York, NY 10022

Miami
1210 Brickell Avenue
Suite 430
Miami, FL 33131


Re: Web.inf questions

Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
> 
> if we let that go unchecked, the
> cocoon developers and advanced users are going to unsubscribe from the
> list because there's too much damned noise.

Exactly. But instead of those, who play by the rules, leaving the list,
I vote for removing those, who don't.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Web.inf questions

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 11 Jan 2001, Ivan wrote:

> And, OT ... Robin, it's not necesary that you remind us 4 times, that
> this question could be off the topic in this list. If you don't want
> to help, or you don't know how to solve this problem, don't do it, but
> let us try to solve this problem if we can ... There are many many off
> topic mails in this list to bother you for 3 or 4 mails ... Thanks for
> your comprehension. Maybe Ludovic could help some other people too
> with this topic :)

apparantly it is necessary, because people keep bringing up off-topic
questions here - you said so yourself. if we let that go unchecked, the
cocoon developers and advanced users are going to unsubscribe from the
list because there's too much damned noise. i can't _tell_ you how many
times i've been ready to drop cocoon-users to try to restore some sanity
to my mailbox. i haven't, because i wrote a couple of things i'm fairly
happy with and i'd like to help other people use them successfully.

you want to discuss your problems, fine, yes, communication is what this
whole damned internet is about - but do it in the proper forum. please.

(note i'm not trying to flame here, just trying to explain where the
long-time denizens of the list are coming from)

- donald


Re: Web.inf questions

Posted by Ivan <if...@latinia.com>.
Thanks Ludovic, I'm trying all you send to me ...

And, OT ... Robin, it's not necesary
that you remind us 4 times, that this question could be
off the topic in this list. If you don't want to help, or
you don't know how to solve this problem, don't do
it, but let us try to solve this problem if we can ...
There are many many off topic mails in this list to
bother you for 3 or 4 mails ... Thanks for your
comprehension. Maybe Ludovic could help some
other people too with this topic :)

Iván Fontán
Technical Department

LATINIA CORPORATION
www.latinia.com

Spain Office
Barcelona
Trav. Gràcia, 342-344
08025 Barcelona (Spain)
Tel.: +34 934 465 026

US Offices
New York
885 3rd Avenue
Suite 2800
New York, NY 10022

Miami
1210 Brickell Avenue
Suite 430
Miami, FL 33131
----- Original Message -----
From: "Ludovic Maitre" <Lu...@sophia.inria.fr>
To: <co...@xml.apache.org>
Sent: Thursday, January 11, 2001 2:38 PM
Subject: Re: Web.inf questions


> 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
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Web.inf questions

Posted by Ludovic Maitre <Lu...@sophia.inria.fr>.
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




Re: Web.inf questions

Posted by Ivan <if...@latinia.com>.
First of all, thanks, the encoding topic works for me now.
The second part it wasn't accurate explained in my first
mail ... let me try again :)

I already know how to tell Cocoon that I would like to serve
XML if the client is a web browser, and WML if the client is
a Wap Browser (it's not my case because all content is for
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.

Thanks again for your help :)

Iván Fontán
Technical Department

LATINIA CORPORATION
www.latinia.com

Spain Office
Barcelona
Trav. Gràcia, 342-344
08025 Barcelona (Spain)
Tel.: +34 934 465 026

US Offices
New York
885 3rd Avenue
Suite 2800
New York, NY 10022

Miami
1210 Brickell Avenue
Suite 430
Miami, FL 33131


Re: Web.inf questions

Posted by Ludovic Maitre <Lu...@sophia.inria.fr>.
Ivan wrote:

> Hi all! Well my questions are all about encoding and directory
> storage.About encoding, where can I choose the WML(XML) encoding ,
> becauseI'm using cocoon to serve wml files made with XML+XSL and the
> defaultencoding is UTF-8. I would like to get iso-8859-1 encoding to
> see specialcaracters and tildes in spanish language. Tried to change
> encoding incocoon.properties, but no way out. The other thing, is how
> could I store in the same directory XML andWML(WBMP too) files,
> because only recognises the XML ones, butthe WML are served like text
> only file (no way to get anything in a WAPbrowser), or get an 404
> error.

I was having the same problem and adding the line
formatter.text/wml.encoding=iso-8859-1
in cocoon.properties have solved the problem.

Next, why do you want to make two files while you can specify the the
format of the output depending on the user/agent ?
(ie in the samples/WAP/ :
<?xml-stylesheet href="portfolio-html.xsl" type="text/xsl"?>
<?xml-stylesheet href="portfolio-wml.xsl" type="text/xsl" media="wap"?>
for the XML content file
and
<xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction> (in
"portfolio-html.xsl" )
or
<xsl:processing-instruction
name="cocoon-format">type="text/wml"</xsl:processing-instruction> (in
"portfolio-wml.xsl" )
)

I hope this could be useful (but all is in the samples),

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