Re: Enabling HTTP Put
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
Re: Enabling HTTP Put
Stacy Mobley wrote: Hi, I was wondering if there was a way to enable HTTP Put via the API's. What makes you think it is not enabled ? (at least, presuming you are talking about Tomcat) I've tried using ServletContext.setAttribute(readonly, false) without any success. What would that have to do with enabling HTTP PUT requests ? Tomcat itself does not forbid or disable any type of valid HTTP request, PUT included. Now, it is your responsibility to provide an application, within Tomcat, which can handle PUT requests. For an example, look at the DAV application usually distributed along with Tomcat. That one allows appropriate clients to upload files to a server, and this works among other things via PUT requests. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Enabling HTTP Put
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-nameComminterface2Servlet/servlet-name servlet-classgov.fmcsa.wribosservice.client.CommInterface2Servlet/servlet-class init-param param-namereadonly/param-name param-valuefalse/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: mo...@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
RE: Enabling HTTP Put
From: Martin Gainty [mailto:mgai...@hotmail.com] Subject: RE: Enabling HTTP Put since doPut disallows request processing if readOnly is true as seen here protected void doPut(HttpServletRequest req, HttpServletResponseresp) 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-nameComminterface2Servlet/servlet-name servlet- classgov.fmcsa.wribosservice.client.CommInterface2Servlet/servlet-class init-param param-namereadonly/param-name param-valuefalse/param-value /init-param /servlet setting at command line as you had suggested would affect ALL servlets (which load from that JVM) Absolutely none of the above is accurate or has any bearing on the OP's somewhat misguided question, which André already answered correctly. I think you forgot this is 2 April - no longer April Fool's day... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Enabling HTTP Put
André Warnier a...@ice-sa.com wrote in message news:4bb5a06e.4080...@ice-sa.com... Stacy Mobley wrote: Hi, I was wondering if there was a way to enable HTTP Put via the API's. What makes you think it is not enabled ? (at least, presuming you are talking about Tomcat) I've tried using ServletContext.setAttribute(readonly, false) without any success. What would that have to do with enabling HTTP PUT requests ? I think that the OP wants to enable PUT in the DefaultServlet in an embedded configuration. If my psychic powers are even close, then the OP needs to override the settings for DefaultServlet in his own web.xml to enable it. It looks like it would be possible from the Embedding API, using a totally obscene combination of JMX and reflection ;). Tomcat itself does not forbid or disable any type of valid HTTP request, PUT included. Now, it is your responsibility to provide an application, within Tomcat, which can handle PUT requests. For an example, look at the DAV application usually distributed along with Tomcat. That one allows appropriate clients to upload files to a server, and this works among other things via PUT requests. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org