[Geoserver-users] Publishing static content

Sorry if this is a FAQ or even too trivial to be dealt with. The manual mentions the fact that GeoServer can be used as a
simple web server. We are allowed to place static files in the www subdirectory of the GeoServer data directory. However, I
wasn't able to locate the directory over HTTP. This is the structure of my HTTP request:

PUT geo.server.fi:8090/geoserver/www/test.htm HTTP/1.1
Host: geo.server.fi:8090
Content-Type: text/html
Content-Length: 618
Pragma: No-Cache
User-Agent: HTTP Request Mediator, ver. 1.0.5 (build 83)
Date: Mon, 20 May 2013 07:11:08 GMT
Authorization: Basic MyEncodededUserNameAndPassword==

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
<HTML>

[My test file]

</HTML>

The server responds with status 405 Request method 'PUT' not supported, headers and an error message:

Allow: POST, HEAD, GET
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1458
Server: Jetty(6.1.8)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 405 Request method 'PUT' not supported</title>
</head>
<body><h2>HTTP ERROR: 405</h2><pre>Request method 'PUT' not supported</pre>
<p>RequestURI=/geoserver/www/test.htm</p><p><i><small><a href="http://jetty.mortbay.org/&quot;&gt;Powered by
Jetty://</a></small></i></p><br/>
<br/>
<br/>

If I switch to the POST method I get status 404 Not Found

What is wrong: URL, method or headers?

On Mon, May 20, 2013 at 9:36 AM, Philip Donner <pdonner@anonymised.com> wrote:

Sorry if this is a FAQ or even too trivial to be dealt with. The manual
mentions the fact that GeoServer can be used as a
simple web server. We are allowed to place static files in the www
subdirectory of the GeoServer data directory.

What is wrong: URL, method or headers?

Method. The www folder only supports GET requests, if you want to add
content by PUT (I assume, authenticating
as admin in the process) code would need to be added to GeoServer.

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------