Re: [Geoserver-devel] Shutting down old GeoServer documentation (GEOSDOC)

2011-01-30 Thread Andrea Aime
On Mon, Jan 31, 2011 at 7:56 AM, Mike Pumphrey  wrote:
> Thanks for your thoughts, folks.
>
>> what about
>> just locking down that space to authorized users and hide it from the
>> rest of the
>> world instead?
>
> I think that's perfectly fine.  If we put the pages behind a login
> page, they might still show up in Google though (although I guess it
> could be as simple as an entry in robots.txt to prevent this).

Mumble, don't see how. As far as Google is concerned those pages
should simply disappear. It should just take the time to have Google
reindex the docs site.
Is there any way to force or strongly suggest a revisit?

Cheers
Andrea


-- 
Ing. Andrea Aime
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] Shutting down old GeoServer documentation (GEOSDOC)

2011-01-30 Thread Mike Pumphrey
Thanks for your thoughts, folks.

> what about
> just locking down that space to authorized users and hide it from the
> rest of the
> world instead?

I think that's perfectly fine.  If we put the pages behind a login
page, they might still show up in Google though (although I guess it
could be as simple as an entry in robots.txt to prevent this).  But
I'd also like to ensure that the user when trying to go to a page on
GEOSDOC doesn't just a see a "Log In To Confluence" page, but instead
either gets redirected or is given a note saying that the page is no
longer here.  What is the best way to accomplish these tasks?

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org





On Fri, Jan 28, 2011 at 11:45 PM, Andrea Aime
 wrote:
> On Fri, Jan 28, 2011 at 11:33 PM, Mike Pumphrey  wrote:
>> Hi all.  I'd like to bring up the subject of shutting down our old 
>> documentation, hosted at:
>>
>>   http://geoserver.org/display/GEOSDOC
>>
>> This was the location of the original GeoServer documentation, before the 
>> migration to Sphinx (with projects now hosted at http://docs.geoserver.org). 
>>  We elected to leave up all of the historical content in order to help 
>> migration/transition.  It has now been almost two years, so I think it's 
>> high time to get tough with ourselves, and force people to migrate to the 
>> new content.
>>
>> There are other, more pragmatic reasons to do this.  Do a search for 
>> "geoserver shapefile" on Google, and you get:
>>
>>   http://geoserver.org/display/GEOSDOC/User+Tutorial+Shapefile
>>
>> This page has screenshots from GeoServer _1.5.1_.  Users should be instead 
>> looking here:
>>
>>   
>> http://docs.geoserver.org/stable/en/user/gettingstarted/shapefile-quickstart/index.html
>>
>> Or maybe here:
>>
>>   http://docs.geoserver.org/stable/en/user/data/shapefile.html
>>
>> Try searching for pretty much anything involving GeoServer, and chances are 
>> that it points to the old documentation.  That's unfortunate, because we've 
>> all done a lot of great work to produce updated quality documentation, so 
>> people should see it.
>>
>> By the way, I'm not talking about the GEOS space, which should remain.  The 
>> space contains not only the download pages and the GSIPs, but also the 
>> homepage itself.
>>
>>
>> So I am proposing the following:
>>
>> * Redirect (301) users who navigate to the old documentation to 
>> http://docs.geoserver.org/stable/en/user/index.html or maybe just 
>> http://docs.geoserver.org
>> * Take down the GEOSDOC space (storing it somewhere safe so we can extract 
>> information we find we need).
>>
>> Thoughts?
>
> I think the idea is sound, from a user point of view it's better not
> to end up reading
> the old docs that might be outdated.
> I'm however not certain we ported over all the info from the old
> docs what about
> just locking down that space to authorized users and hide it from the
> rest of the
> world instead?
>
> Cheers
> Andrea
>
>
> --
> Ing. Andrea Aime
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584962313
> fax:     +39 0584962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -
>

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] Shutting down old GeoServer documentation (GEOSDOC)

2011-01-30 Thread Ben Caradoc-Davies
+1. Please. The old docs get far too much Google-attention.

On 31/01/11 14:02, Gabriel Roldán wrote:
>> what about
>> just locking down that space to authorized users and hide it from the
>> rest of the
>> world instead?
> +1
>
> Gabriel.
>>
>> Cheers
>> Andrea
>>
>>
>


-- 
Ben Caradoc-Davies 
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] Shutting down old GeoServer documentation (GEOSDOC)

2011-01-30 Thread Gabriel Roldán
> what about
> just locking down that space to authorized users and hide it from the
> rest of the
> world instead?
+1

Gabriel.
> 
> Cheers
> Andrea
> 
> 

-- 
Gabriel Roldan
grol...@opengeo.org
Expert service straight from the developers


--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] GeoServer trunk now using GeoTools 2.8-SNAPSHOT

2011-01-30 Thread Justin Deoliveira
Thanks Ben, was going to notify the list but totally forgot :)

On Sun, Jan 30, 2011 at 6:38 PM, Ben Caradoc-Davies
 wrote:

> For the benefit those who might not be following the GT lists:
>
> Over the weekend, Justin branched GeoTools 2.7.x and upgraded GeoTools
> trunk poms to be 2.8-SNAPSHOT. In addition, GeoServer trunk now depends
> on 2.8-SNAPSHOT. Thanks, Justin!
>
> In a nutshell:
>
> - The GeoServer development trunk (2.2-SNAPSHOT) depends on GeoTools
> 2.8-SNAPSHOT
>
> - The new GeoServer stable branch 2.1.x (2.1-SNAPSHOT) depends on
> GeoTools 2.7-SNAPSHOT
>
> --
> Ben Caradoc-Davies 
> Software Engineering Team Leader
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>
>
> --
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> ___
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


[Geoserver-devel] GeoServer trunk now using GeoTools 2.8-SNAPSHOT

2011-01-30 Thread Ben Caradoc-Davies
For the benefit those who might not be following the GT lists:

Over the weekend, Justin branched GeoTools 2.7.x and upgraded GeoTools 
trunk poms to be 2.8-SNAPSHOT. In addition, GeoServer trunk now depends 
on 2.8-SNAPSHOT. Thanks, Justin!

In a nutshell:

- The GeoServer development trunk (2.2-SNAPSHOT) depends on GeoTools 
2.8-SNAPSHOT

- The new GeoServer stable branch 2.1.x (2.1-SNAPSHOT) depends on 
GeoTools 2.7-SNAPSHOT

-- 
Ben Caradoc-Davies 
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] Multiple rendering requests for a single WMS call

2011-01-30 Thread Simone Giannecchini
Ciao Gabriel,
i delete the nurc:mosaic store and recreated it likewise the old one.

Now, I have put a breakpoint inside the read method if
ImageMosaicReader and then I have sent this request:

http://localhost:8080/geoserver/wms?LAYERS=mosaic&FORMAT=image%2Fjpeg&TILED=false&TILESORIGIN=706433.48857411%2C4368532.7140124&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=epsg%3A3857&BBOX=706433.48857411,4368532.7140124,2318784.9932239,5980884.2186622&WIDTH=256&HEIGHT=256

I hit the breakpoint twice in a row, which means I am going to read
from disk twice.

As I said, I did not investigate, but I noticed this while doing some
optimizations on the mosaic and I though it was worth reporting.


Ciao,
Simone.

---
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Founder

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:      +39 0584962313
mob:    +39 333 8128928


http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini
http://twitter.com/simogeo

---



On Fri, Jan 28, 2011 at 4:26 PM, Gabriel Roldán  wrote:
> scary as it sounds I dont't seem to be able of reproducing.
>
> Simone can you send a request against the default nurc:mosaic layer that
> makes this happen? I'd be certainly surprised that rendering is called
> twice for a single request and can't think of a reason for that to
> happen, but in any case will fix it asap if that's the case, I just
> can't reproduce so far.
>
> Gabriel
>
>
> On Fri, 2011-01-28 at 15:09 +0100, Simone Giannecchini wrote:
>> I am seeing it with a raster mosaic.
>> Put a brakpoint anywhere inside the direct raster path.
>>
>> Simone.
>> ---
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Founder
>>
>> Via Poggio alle Viti 1187
>> 55054  Massarosa (LU)
>> Italy
>>
>> phone: +39 0584962313
>> fax:      +39 0584962313
>> mob:    +39 333 8128928
>>
>>
>> http://www.geo-solutions.it
>> http://geo-solutions.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>> http://twitter.com/simogeo
>>
>> ---
>>
>>
>>
>> On Fri, Jan 28, 2011 at 2:42 PM, Andrea Aime
>>  wrote:
>> > On Fri, Jan 28, 2011 at 1:58 PM, Simone Giannecchini
>> >  wrote:
>> >> Dear All,
>> >> I noticed that  a single WMS call generates multiple underlying
>> >> rendering requests.
>> >> Is this a side effect of the latest changes with the refactor on WMS
>> >> tht Gabriel did?
>> >> I guess it is worth double checking since this is rather scary :).
>> >
>> > Simone,
>> > do you have details on how to reproduce this? Like, is this happening for
>> > any request, does it have to have a particular layout (thinking 
>> > compatibility
>> > with the GWC tilesets).
>> > Where does one put the breakpoint to see the multiple requests happening?
>> >
>> > Cheers
>> > Andrea
>> >
>> > --
>> > Ing. Andrea Aime
>> > Technical Lead
>> >
>> > GeoSolutions S.A.S.
>> > Via Poggio alle Viti 1187
>> > 55054  Massarosa (LU)
>> > Italy
>> >
>> > phone: +39 0584962313
>> > fax:     +39 0584962313
>> >
>> > http://www.geo-solutions.it
>> > http://geo-solutions.blogspot.com/
>> > http://www.linkedin.com/in/andreaaime
>> > http://twitter.com/geowolf
>> >
>> > -
>> >
>> >
>>
>> --
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>> February 28th, so secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsight-sfd2d
>> ___
>> Geoserver-devel mailing list
>> Geoserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
> --
> Gabriel Roldan
> grol...@opengeo.org
> Expert service straight from the developers
>
>
> --
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> ___
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using 

Re: [Geoserver-devel] Shutting down old GeoServer documentation (GEOSDOC)

2011-01-30 Thread Simone Giannecchini
I agree with andrea here.

It would be great to be able to get to it somehow although by default
we do show only the new one.

Regards,
Simone.
---
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Founder

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:      +39 0584962313
mob:    +39 333 8128928


http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini
http://twitter.com/simogeo

---



On Sat, Jan 29, 2011 at 8:45 AM, Andrea Aime
 wrote:
> On Fri, Jan 28, 2011 at 11:33 PM, Mike Pumphrey  wrote:
>> Hi all.  I'd like to bring up the subject of shutting down our old 
>> documentation, hosted at:
>>
>>   http://geoserver.org/display/GEOSDOC
>>
>> This was the location of the original GeoServer documentation, before the 
>> migration to Sphinx (with projects now hosted at http://docs.geoserver.org). 
>>  We elected to leave up all of the historical content in order to help 
>> migration/transition.  It has now been almost two years, so I think it's 
>> high time to get tough with ourselves, and force people to migrate to the 
>> new content.
>>
>> There are other, more pragmatic reasons to do this.  Do a search for 
>> "geoserver shapefile" on Google, and you get:
>>
>>   http://geoserver.org/display/GEOSDOC/User+Tutorial+Shapefile
>>
>> This page has screenshots from GeoServer _1.5.1_.  Users should be instead 
>> looking here:
>>
>>   
>> http://docs.geoserver.org/stable/en/user/gettingstarted/shapefile-quickstart/index.html
>>
>> Or maybe here:
>>
>>   http://docs.geoserver.org/stable/en/user/data/shapefile.html
>>
>> Try searching for pretty much anything involving GeoServer, and chances are 
>> that it points to the old documentation.  That's unfortunate, because we've 
>> all done a lot of great work to produce updated quality documentation, so 
>> people should see it.
>>
>> By the way, I'm not talking about the GEOS space, which should remain.  The 
>> space contains not only the download pages and the GSIPs, but also the 
>> homepage itself.
>>
>>
>> So I am proposing the following:
>>
>> * Redirect (301) users who navigate to the old documentation to 
>> http://docs.geoserver.org/stable/en/user/index.html or maybe just 
>> http://docs.geoserver.org
>> * Take down the GEOSDOC space (storing it somewhere safe so we can extract 
>> information we find we need).
>>
>> Thoughts?
>
> I think the idea is sound, from a user point of view it's better not
> to end up reading
> the old docs that might be outdated.
> I'm however not certain we ported over all the info from the old
> docs what about
> just locking down that space to authorized users and hide it from the
> rest of the
> world instead?
>
> Cheers
> Andrea
>
>
> --
> Ing. Andrea Aime
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584962313
> fax:     +39 0584962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -
>
> --
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> ___
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] Geoserver Stress Testing

2011-01-30 Thread Pedro Mendes
For the reference
http://svn.codehaus.org/geoserver/branches/1.6.x/geoserver/stress


On Fri, Jan 28, 2011 at 2:30 PM, Michael Prieß <
mailingliste...@googlemail.com> wrote:

> Hi,
>
> i like to test my geoserver productive environment. I found this old wiki
> page http://geoserver.org/display/GEOS/Stress+Testing.
>
> Where can i find the source ?
>
> btw. the images looks nice.
>
> Regards,
>
> Michael
>
>
> --
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> ___
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>


-- 
Cumprimentos,
Pedro Mendes
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


[Geoserver-devel] [jira] Created: (GEOS-4341) The rest dispatcher fails to set the content type to "text/plain" when reporting back an error message

2011-01-30 Thread Andrea Aime (JIRA)
The rest dispatcher fails to set the content type to "text/plain" when 
reporting back an error message
--

 Key: GEOS-4341
 URL: http://jira.codehaus.org/browse/GEOS-4341
 Project: GeoServer
  Issue Type: Bug
Reporter: Andrea Aime
Assignee: Andrea Aime
 Fix For: 2.1-RC2


Since the error message representation is sent back as plain text the content 
type should be set accordingly.

The patch is simply:

{code}
--- a/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
+++ b/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
@@ -91,6 +91,7 @@ public class RESTDispatcher extends AbstractController {
 String reStr = re.getRepresentation().getText();
 if ( reStr != null ) {
 LOG.severe( reStr );
+resp.setContentType("text/plain");
 resp.getOutputStream().write(reStr.getBytes());
 }
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


[Geoserver-devel] any interest in a wps bakeoff

2011-01-30 Thread Jody Garnett
Similar in spirit to the wms shoot out; but I would be content if a wps service 
just turns over at all. Collecting performance numbers would be a bonus.
The idea was ventured at last years foss4g; and nothing much has come of it. I 
figured I would approach the email list here to see if it was a good idea; and 
if I should bother to pursue it.

Jody
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


[Geoserver-devel] Some rest debugging headaches

2011-01-30 Thread Andrea Aime
Hi,
I was writing some tests for the simple feature service implementation
when I got tangled up in a separate issue... the basic test I wrote
was failing to build a valid response, but the response status I got back
was a 200 and just a "[" as the content of the response.
No logs, no way to know what happened.

After some debugging I found that Restlet logged the exception that
was thrown only at the INFO level, which is disabled during tests,
and that it did set the status to 500, but too late because the response
was already committed.

For the first issue I'm attaching a patch that seems to solve it:
the ServletConverter gets subclassed to override the logging level
of the error to SEVERE.

For the second one (setting the status before commiting the request)
I guess we should have a output strategy
handling on the rest path, so that we cache some kb of data before
sending back a response.
I _think_ this may be doable by wrapping the httpservletresponse
into one that would build a stream backed by the output strategy

Opinions?

Cheers
Andrea


-- 
Ing. Andrea Aime
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-
diff --git a/src/rest/src/main/java/org/geoserver/rest/GeoServerServletConverter.java b/src/rest/src/main/java/org/geoserver/rest/GeoServerServletConverter.java
index ed7e2dc..b2c0c56 100644
--- a/src/rest/src/main/java/org/geoserver/rest/GeoServerServletConverter.java
+++ b/src/rest/src/main/java/org/geoserver/rest/GeoServerServletConverter.java
@@ -1,3 +1,7 @@
+/* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
+ * This code is licensed under the GPL 2.0 license, availible at the root
+ * application directory.
+ */
 package org.geoserver.rest;
 
 import java.util.logging.Level;
@@ -12,10 +16,15 @@ import org.restlet.data.Status;
 import com.noelios.restlet.ext.servlet.ServletConverter;
 import com.noelios.restlet.http.HttpResponse;
 
+/**
+ * A custom servlet controller that forces the logging level of errors to SEVERE
+ * 
+ * @author Andrea Aime - GeoSolutions
+ */
 public class GeoServerServletConverter extends ServletConverter {
-
+
 static final Logger LOGGER = Logging.getLogger(GeoServerServletConverter.class);
-
+
 public GeoServerServletConverter(ServletContext context, Restlet target) {
 super(context, target);
 }
@@ -23,14 +32,15 @@ public class GeoServerServletConverter extends ServletConverter {
 public GeoServerServletConverter(ServletContext context) {
 super(context);
 }
-
+
 @Override
 public Logger getLogger() {
 return LOGGER;
 }
-
+
 /**
  * Overridden to get at the very least a log at severe level
+ * 
  * @param response
  */
 @Override
@@ -42,12 +52,11 @@ public class GeoServerServletConverter extends ServletConverter {
 // Send the response to the client
 response.getHttpCall().sendResponse(response);
 } catch (Exception e) {
+// raise the logging level to SEVERE
 LOGGER.log(Level.SEVERE, "Exception intercepted", e);
 response.getHttpCall().setStatusCode(Status.SERVER_ERROR_INTERNAL.getCode());
-response.getHttpCall().setReasonPhrase(
-"An unexpected exception occured");
+response.getHttpCall().setReasonPhrase("An unexpected exception occured");
 }
 }
 
-
 }
diff --git a/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java b/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
index 514227f..87cca6d 100644
--- a/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
+++ b/src/rest/src/main/java/org/geoserver/rest/RESTDispatcher.java
@@ -66,7 +66,7 @@ public class RESTDispatcher extends AbstractController {
 protected void initApplicationContext() throws BeansException {
 super.initApplicationContext();
 
-myConverter = new ServletConverter(getServletContext());
+myConverter = new GeoServerServletConverter(getServletContext());
 myConverter.setTarget(createRoot());
 }
 
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel