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, HttpServletResponse resp)
        throws ServletException, IOException {

        if (readOnly) {
            resp.sendError(HttpServletResponse.SC_FORBIDDEN);
            return;
        }


you will need to implement setting readOnly to 'false'  (as specified in Servlet'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>      
 </servlet>


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


Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.

 

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