Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have installed GeoServer as part of the OpenGeo package. I am trying to create my own application but I am having problems. At first I couldn't save over my html files. Using Notepad2 I can now overwrite my files but the changes do not appear when looking with a browser.

I am guessing this is because the files are being cached somewhere on the server (not in the browser - I've checked that). This could make sense for a live project but is very frustrating for development. Is there some way to bypass the cache?

Also - and this might sound a little dumb - GeoServer is the component that's serving up the HTML files, right? It's the only server in the bundle but the only information I can find about it is about serving up geographical data (which is obviously its main feature).

share|improve this question
    
Geoserver has nothing to do with the HTML pages of your application. Are you running an Apache maybe? Are you sure that you are modifying the correct files? –  underdark Apr 11 '11 at 12:14
    
I'm definitely modifying the right files. Apache isn't running. Hmm. Looking at the http headers it seems I'm running Jetty 6.1.8. –  Mr_Chimp Apr 11 '11 at 12:31
    
I think this must be a browser or operating system issue as I regularly edit html files in Notepad++ and view the changes in FireFox using the Jetty GeoServer set up. –  iant Apr 11 '11 at 13:44
    
It's definitely a Jetty issue. See my answer below. If you don't have the problem you must have useFileMappedBuffer set to false - or you're running Linux. –  Mr_Chimp Apr 11 '11 at 13:58

2 Answers 2

As said, it is probably a HTTP server configuration issue more than geoserver. If you use Jetty (which I don't know at all!), have a look on that : http://christiansons.net/mike/blog/2009/09/jetty-browser-cache-control/

share|improve this answer
    
Yep, it's a Jetty configuration issue. Apparently it's as "easy" as changing useFileMappedBuffer to false in webdefault.xml. The problem is there is no webdefault.xml! The OpenGeo version of Jetty seems to be nonstandard. It's possible to create your own webdefault.xml and link it in by editing jetty.xml (as per this docs.codehaus.org/display/JETTY/Files+locked+on+Windows). I must be doing something wrong as Jetty then won't start. I'm new to Jetty and I don't know much about Java so configuring it is a nightmare! –  Mr_Chimp Apr 12 '11 at 13:00
1  
Have you seen that page ? docs.codehaus.org/display/JETTY/webdefault.xml. By the way, maybe a response here : stackoverflow.com/questions/4988019/… –  simo Apr 12 '11 at 13:06
    
I took the easy way out. I'm using Linux instead. –  Mr_Chimp Apr 13 '11 at 8:35
    
And, I hope you don't have cache problem anymore! ;-) –  simo Apr 13 '11 at 9:29
up vote 0 down vote accepted

Ok, I worked it out.

The problem apparently stems a limitation of Windows - "that having the file open in one process (Jetty has mapped the file to it's cache) means that you can't write that file with another process". The Jetty server seems to open the file when you request it and then doesn't close the file until you shut down the server.

There is a brief answer as to why this happens on the Jetty Codehaus wiki.

Unfortunately the file it tells you to update - webdefault.xml - doesn't exist in the default OpenGeo installation. You therefore have to create it. A bit more digging led me to an in-depth walk-through on how to create this file.

I still haven't managed to fix this - I installed it on Linux instead and no longer have the issue.

I hope this is some help to anyone else who comes across this problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.