2009/12/27 Justin Deoliveira <[email protected]> > Glad to hear you are making progress :). > > Basically the rule of thumb is that configuration files are stored in the > geoserver data directory. In some cases default configuration are stored in > a module directly, but this is only to be used as a default if the file does > not exist in the data directory. > > That said, what you need to do is use the > org.geoserver.config.GeoServerDataDirectory class via spring injection. So > just declare another constructor argument in your class: > > class YourServlet { > > org.geoserver.config.GeoServerDataDirectory dd; > > public YourServlet(..., org.geoserver.config.GeoServerDataDirectory dd) { > ... > this.dd = dd; > } > } > > Then in the applicationContext do this: > > <bean id="myServlet" ...> > ... > <constructor-arg ref="dataDirectory"/> > </bean> > > Thanks, I check the geoserver svn, and I found that in the version of 2.0.0 there is not a dataDirectory defined in the applicaionContext.xml. You can check it here: http://svn.codehaus.org/geoserver/tags/2.0.0/src/main/src/main/java/applicationContext.xml
And in the version of 2.0.x,it exist. So I wonder which is the related class of GeoserverDataDirectory in 2.0.0? If there is not one ,I think I have to change to version of 2.0,x then. > The "dataDirectory" bean is a singleton bean declared by the main module. > > With the GeoServerDataDirectory class you have numerous lookup methods you > can use to get at lookup files. > > Hope that helps. > > -Justin > > maven apache wrote: > >> Hi: >> This thread is posted for a long time. Thank Justin and other people, I >> have made some progress with their help. :). >> >> However I meet another problem, the ows which I try to add to gs contains >> the following modules ,a web module(ows-web) and a jar module(ows-server), >> and there is a folder named conf under the >> ows-web/src/main/webapp/WEB-INF/conf.. Under this folder there are many >> config files which are to be used in the servlet under the ows-server >> module. And this servelt is just the one I wrapped as a >> org.springframework.web.servlet.mvc.ServletWrappingController. >> >> I do not think it's a good idea to add the config files to the web module >> of gs directly, because 1 ) I do not want to break the gs architecture. >> 2 ) the wcs wms also read data from the local disk, how did them configed? >> Can I use the same way for my ows? >> 2009/12/24 maven apache <[email protected] <mailto: >> [email protected]>> >> >> >> >> 2009/12/24 Andrea Aime <[email protected] <mailto:[email protected]>> >> >> >> maven apache ha scritto: >> >> Yes,I forgot mention that: >> I have add a profile in the pom fo the webapp module: >> ---------------------- >> <profile> >> <id>addking</id> >> <dependencies> >> <dependency> >> <groupId>org.geoserver</groupId> >> <artifactId>king</artifactId> >> <version>2.0.0</version> >> </dependency> >> </dependencies> >> </profile> >> --------------------- Then I run commond: mvn clean install >> -Dmaven.test.skip=true -P addking, and I am sure the >> king.2.0.0.jar is included in the >> web/app/target/geoserver/webinfo/lib. >> >> >> That does not matter. Is the web-app project referring to the king >> project in Eclipse? >> >> No,in the buildpath page,the project king do not exist, I wonder if >> it is caused that" the dependency king is not defined directly ? it >> is defined by profile manner? >> Try running: >> mvn eclipse:eclipse -o -Paddking >> >> Ok, just following your suggestion, first I delete the .class and >> .project file under the web/app module,then run the above >> commond,then run mvn install -P addking. >> >> But problem also . >> The logs can be found here:http://dpaste.com/137319/ >> and then refreshing from Eclipse >> >> >> Cheers >> Andrea >> >> >> -- Andrea Aime >> OpenGeo - http://opengeo.org >> Expert service straight from the developers. >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Geoserver-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geoserver-devel >> > > -- > Justin Deoliveira > OpenGeo - http://opengeo.org > Enterprise support for open source geospatial. >
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
