From a purely architectural point of view, it is never ever wise to have the
web app access things on the local file system, as it is both non platform
independent, and also opens up security issues.
If you are to take this approach of extracting the config from the web app,
it would be better to serve the file up over http, and write a servlet to
access it on a URL - but this means you introducing another webserver to the
equation (through which you can apply appropriate security etc if needbe).
From what you mention, you are running on windows - if you were on linux,
you could workaround it by mounting the directory, but that is messy too...
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Andrea
Aime
Sent: Tuesday, March 20, 2007 11:48 AM
To: Alex Chew
Cc: Geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Can I put config files and wmc files outside
of webapp directorys?
Alex Chew ha scritto:
Hi,
I'd like to move my config.xml and wmc.xml files out of tomcat webapps
directory. how can I make reference to config.xml in html?
Hum, I don't think you can. Mapbuilder, on the browser side, needs to
access these files to configure itself. These files are served by
the web container only if they are under the web application
directory.
The only workaround I can think of, is that you write your own servlet
that knows where to pick files outside of the webapp directory and
serves them accordingly. It's not as easy as it seems thought, to do
it properly you'll have to set the mime headers and the like.
I think you'll have to look at the code in Tomcat or some other
open source server to get it fully right.
Well, if you just need to serve those xml files, you can simply
do an hack and always set the mime type of xml files...
Cheers
Andrea
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users