You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Emre Ersoz <em...@gmail.com> on 2006/09/05 15:19:44 UTC

How to disable PUT and DELETE methods in Tomcat 4.1.27?

Dear all,

I am a newbie to the list. I did some research on the topic, but couldn't
get any idea. I found on 5.5.X

http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html

On web.xml file you can add following parameter for this purpose:

   readonly
 Is this context "read only", so HTTP commands like PUT and DELETE are
rejected? [true]

What about 4.1.X ? Do we have solution?

Thanks and regards,

EE

RE: How to disable PUT and DELETE methods in Tomcat 4.1.27?

Posted by Ivan Balashov <ib...@gmail.com>.
I guess those methods are left to be implemented e.g. by Webdav servlets,
and while no implementation is present they simply return access error.

-----Original Message-----
From: Emre Ersoz [mailto:emreersoz@gmail.com] 
Sent: Wednesday, September 06, 2006 1:53 PM
To: Tomcat Users List
Subject: Re: How to disable PUT and DELETE methods in Tomcat 4.1.27?

added below lines to web.xml:

        <init-param>
            <param-name>readonly</param-name>
            <param-value>true</param-value>
        </init-param>

but actually i see no difference:

DELETE /tcell-um-cc-portal/a HTTP/1.0

HTTP/1.1 403 Forbidden
Content-Type: text/html;charset=ISO-8859-9
Content-Language: tr
Date: Wed, 06 Sep 2006 12:48:33 GMT
Server: Apache Coyote/1.0
Connection: close

<html><head><title>Apache Tomcat/4.1.27 - Error
report</title><STYLE><!--H1{font-family :
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;}
H3{font-family : sans-s
erif,Arial,Tahoma;color : white;background-color : #0086b2;}
BODY{font-family : sans-serif
,Arial,Tahoma;color : black;background-color : white;} B{color :
white;background-color :
#0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP Status 403
- </h1><HR siz
e="1" noshade><p><b>type</b> Status report</p><p><b>message</b>
<u></u></p><p><b>descripti
on</b> <u>Access to the specified resource () has been forbidden.</u></p><HR
size="1" nosh
ade><h3>Apache Tomcat/4.1.27</h3></body></html>

I see access error but DELETE seems to be not disabled. wht do you think?

thx,

EE
On 9/6/06, Mark Thomas <ma...@apache.org> wrote:
>
> Emre Ersoz wrote:
> > Dear
> > Is this context "read only", so HTTP commands like PUT and DELETE are
> > rejected? [true]
> >
> > What about 4.1.X ? Do we have solution?
>
> Yes. The same one. Take a look at conf/web.xml
>
> Mark
>
>

Re: How to disable PUT and DELETE methods in Tomcat 4.1.27?

Posted by Emre Ersoz <em...@gmail.com>.
added below lines to web.xml:

        <init-param>
            <param-name>readonly</param-name>
            <param-value>true</param-value>
        </init-param>

but actually i see no difference:

DELETE /tcell-um-cc-portal/a HTTP/1.0

HTTP/1.1 403 Forbidden
Content-Type: text/html;charset=ISO-8859-9
Content-Language: tr
Date: Wed, 06 Sep 2006 12:48:33 GMT
Server: Apache Coyote/1.0
Connection: close

<html><head><title>Apache Tomcat/4.1.27 - Error
report</title><STYLE><!--H1{font-family :
sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;}
H3{font-family : sans-s
erif,Arial,Tahoma;color : white;background-color : #0086b2;}
BODY{font-family : sans-serif
,Arial,Tahoma;color : black;background-color : white;} B{color :
white;background-color :
#0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP Status 403
- </h1><HR siz
e="1" noshade><p><b>type</b> Status report</p><p><b>message</b>
<u></u></p><p><b>descripti
on</b> <u>Access to the specified resource () has been forbidden.</u></p><HR
size="1" nosh
ade><h3>Apache Tomcat/4.1.27</h3></body></html>

I see access error but DELETE seems to be not disabled. wht do you think?

thx,

EE
On 9/6/06, Mark Thomas <ma...@apache.org> wrote:
>
> Emre Ersoz wrote:
> > Dear
> > Is this context "read only", so HTTP commands like PUT and DELETE are
> > rejected? [true]
> >
> > What about 4.1.X ? Do we have solution?
>
> Yes. The same one. Take a look at conf/web.xml
>
> Mark
>
>

Re: How to disable PUT and DELETE methods in Tomcat 4.1.27?

Posted by Mark Thomas <ma...@apache.org>.
Emre Ersoz wrote:
> Dear 
> Is this context "read only", so HTTP commands like PUT and DELETE are
> rejected? [true]
> 
> What about 4.1.X ? Do we have solution?

Yes. The same one. Take a look at conf/web.xml

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org