tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Enabling HTTP Put
Date Fri, 02 Apr 2010 11:55:21 GMT

since doPut disallows request processing if readOnly is true as seen here


    protected void doPut(HttpServletRequest req=2C HttpServletResponse resp=
)
        throws ServletException=2C IOException {

        if (readOnly) {
            resp.sendError(HttpServletResponse.SC_FORBIDDEN)=3B
            return=3B
        }


you will need to implement setting readOnly to 'false'  (as specified in Se=
rvlet's init-params of web.xml)

 <servlet>
      <servlet-name>Comminterface2Servlet</servlet-name>
      <servlet-class>gov.fmcsa.wribosservice.client.CommInterface2Servlet</=
servlet-class>
      <init-param>
          <param-name>readonly</param-name>
          <param-value>false</param-value>
       </init-param>     =20
 </servlet>


setting at command line as you had suggested would affect ALL servlets (whi=
ch load from that JVM)


Martin=20
______________________________________________=20
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng=
er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter=
leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l=
ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin=
dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w=
ir keine Haftung fuer den Inhalt uebernehmen.

=20

> From: mobes@adelphia.net
> To: users@tomcat.apache.org
> Subject: Re: Enabling HTTP Put
> Date: Thu=2C 1 Apr 2010 23:22:32 -0700
>=20
> Hi=2C
>=20
> I was wondering if there was a way to enable HTTP Put via the API's. I've=
 tried using ServletContext.setAttribute("readonly"=2C "false") without any=
 success.
>=20
> -- Stacy
 		 	   		 =20
_________________________________________________________________
The New Busy is not the old busy. Search=2C chat and e-mail from your inbox=
.
http://www.windowslive.com/campaign/thenewbusy?ocid=3DPID28326::T:WLMTAGL:O=
N:WL:en-US:WM_HMP:042010_3=

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message