tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikola Milutinovic" <Nikola.Milutino...@ev.co.yu>
Subject Re: Tomcat support HTTP PUT? Do HTTP PUT from HTML?
Date Tue, 06 Aug 2002 06:04:42 GMT
> 1. Does Tomcat 4.03 support HTTP PUT?

Tomcat doesn't mind, since it is the job of particular HttpServlet to support PUT. See docs
on HttpServlet and "doPut()"

> 2. [A slightly off-topic question] Is there any way to do an HTTP PUT
> from HTML?  I would like to have an HTML form that gets filled in by the
> user.  Upon the user clicking the Submit button, some script kicks in to
> harvest all the data in the HTML form, create an XML string using the
> data, and then HTTP PUT the XML string to the Tomcat server.  I can 
> write Javascript to harvest the HTML form data, and compose an XML
> string.  However, I don't know how to then HTTP PUT the XML string to
> the server.  Any ideas?  /Roger

The main usage of "PUT" HTTP method is to place an object on the server. HTML forms can use
either "GET" or "POST" methods to submit their data. "PUT" is reserved for Web Authoring tools,
like Netscape Composer.

Anyhow, today the prefered method for placing content on the web server is WebDAV, which is
present in Tomcat and supported by at least Macromedia Dreamweaver, if not others, by now.

As for servlets writing into the WebApp directory tree, I guess they can do that (I haven't
checket the specs, but if WebDAV servlet can do it, than any other servlet can). So, there
is no need to play with "PUT", since you'll hardly see it from the client, the way you're
going.

Nix.
Mime
View raw message