[Geoserver-users] Location of freemarker templates for specific FeatureTypes

Hello fellow GeoServer users,

I’m a brand-new member of this list, and a new user of GeoServer as well. I’m extremely “chuffed” about the things GeoServer can do, and am having a great time setting up a little demo to display KML and GeoRSS output from a PostGIS database. However, I seem to have hit a small snag in my use of .ftl template files. I’ve been able to successfully control the output of a single layer by using global overrides and template files located under, “GEOSERVER_DATA_DIR/featureTypes/”. Now that I have a few more layers to display, I would like to have type-specific templates, and have moved my .ftl files into the specific featureType directory, “GEOSERVER_DATA_DIR/featureTypes/myfeatureType/”. As a result of this change, myfeatureType now lacks any sort of templated control.

I’m using version 1.6.0 RC 2 of the geoserver.war, and would like to know if anyone could shed some light on this behavior.

Thanks,

Roger

Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

Hi Roger,

So the output "myFeatureType" is behaving as if there was no template?
Which template are you attempting to use? title? description?

Also do you see any errors that occur in the log when you make a request
against the layer which has the template? I wonder if perhaps the
template has an error in it and is just being skipped.

-Justin

Roger.Andre@anonymised.com wrote:

Hello fellow GeoServer users,

I'm a brand-new member of this list, and a new user of GeoServer as
well. I'm extremely "chuffed" about the things GeoServer can do, and am
having a great time setting up a little demo to display KML and GeoRSS
output from a PostGIS database. However, I seem to have hit a small
snag in my use of .ftl template files. I've been able to successfully
control the output of a single layer by using global overrides and
template files located under, "GEOSERVER_DATA_DIR/featureTypes/". Now
that I have a few more layers to display, I would like to have
type-specific templates, and have moved my .ftl files into the specific
featureType directory,
"GEOSERVER_DATA_DIR/featureTypes/myfeatureType/". As a result of this
change, myfeatureType now lacks any sort of templated control.

I'm using version 1.6.0 RC 2 of the geoserver.war, and would like to
know if anyone could shed some light on this behavior.

Thanks,

Roger
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

!DSPAM:4007,477e7fe7129412085621377!

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,477e7fe7129412085621377!

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e7fe7129412085621377!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

That's correct, "myFeatureType" behaves as though no template were set. I have; title.ftl, description.ftl, time.ftl, and content.ftl set under that FeatureType. Looking at the log hadn't even crossed my mind, thanks for the suggestion. I cleared it out and then made a couple requests for data. There doesn't appear to be anything related to this problem in the output, but I've included it below for you to see. It seems more like the presense of the templates isn't even registering. Is there some sort of process to, "enable templates for this FeatureType"? I didn't spot one in the docs, it seemed more like the presence of an .ftl causes it to be read and used.

Log output below:

2008-01-05 11:19:12,843 WARN [geoserver.ows] -
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.vfny.geoserver.util.PartialBufferedOutputStream2.flush(PartialBufferedOutputStream2.java:185)
  at java.io.FilterOutputStream.flush(Unknown Source)
  at org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:167)
  at org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:561)
  at org.geoserver.ows.adapters.ResponseAdapter.write(ResponseAdapter.java:60)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:615)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 50 more
2008-01-05 11:19:12,843 INFO [geoserver.ows] - Problem writing exception information back to calling client:
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.geoserver.ows.LegacyServiceExceptionHandler.handleServiceException(LegacyServiceExceptionHandler.java:189)
  at org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1179)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:198)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 46 more

--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Justin Deoliveira
Sent: Friday, January 04, 2008 10:58 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for specificFeatureTypes

Hi Roger,

So the output "myFeatureType" is behaving as if there was no template?
Which template are you attempting to use? title? description?

Also do you see any errors that occur in the log when you make a request against the layer which has the template? I wonder if perhaps the template has an error in it and is just being skipped.

-Justin

Roger.Andre@anonymised.com wrote:

Hello fellow GeoServer users,

I'm a brand-new member of this list, and a new user of GeoServer as
well. I'm extremely "chuffed" about the things GeoServer can do, and
am having a great time setting up a little demo to display KML and
GeoRSS output from a PostGIS database. However, I seem to have hit a
small snag in my use of .ftl template files. I've been able to
successfully control the output of a single layer by using global
overrides and template files located under,
"GEOSERVER_DATA_DIR/featureTypes/". Now that I have a few more layers
to display, I would like to have type-specific templates, and have
moved my .ftl files into the specific featureType directory,
"GEOSERVER_DATA_DIR/featureTypes/myfeatureType/". As a result of this
change, myfeatureType now lacks any sort of templated control.

I'm using version 1.6.0 RC 2 of the geoserver.war, and would like to
know if anyone could shed some light on this behavior.

Thanks,

Roger
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

!DSPAM:4007,477e7fe7129412085621377!

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

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,477e7fe7129412085621377!

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e7fe7129412085621377!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hmmm... strange. You are right, its the presence of the file that
dictates if it engages or not. I will have to look into this one. Do you
mind sharing an example of one of your templates that does not work?

Also, can you humor me by trying a request against the topp:states layer
(this assumes that you are running with the data directory that ships
with geoserver). It has templates included with it. Can you tell us if
they are engaging or not?

-Justin

Roger.Andre@anonymised.com wrote:

Hi Justin,

That's correct, "myFeatureType" behaves as though no template were set. I have; title.ftl, description.ftl, time.ftl, and content.ftl set under that FeatureType. Looking at the log hadn't even crossed my mind, thanks for the suggestion. I cleared it out and then made a couple requests for data. There doesn't appear to be anything related to this problem in the output, but I've included it below for you to see. It seems more like the presense of the templates isn't even registering. Is there some sort of process to, "enable templates for this FeatureType"? I didn't spot one in the docs, it seemed more like the presence of an .ftl causes it to be read and used.

Log output below:

2008-01-05 11:19:12,843 WARN [geoserver.ows] -
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.vfny.geoserver.util.PartialBufferedOutputStream2.flush(PartialBufferedOutputStream2.java:185)
  at java.io.FilterOutputStream.flush(Unknown Source)
  at org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:167)
  at org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:561)
  at org.geoserver.ows.adapters.ResponseAdapter.write(ResponseAdapter.java:60)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:615)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 50 more
2008-01-05 11:19:12,843 INFO [geoserver.ows] - Problem writing exception information back to calling client:
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.geoserver.ows.LegacyServiceExceptionHandler.handleServiceException(LegacyServiceExceptionHandler.java:189)
  at org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1179)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:198)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 46 more

--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Justin Deoliveira
Sent: Friday, January 04, 2008 10:58 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for specificFeatureTypes

Hi Roger,

So the output "myFeatureType" is behaving as if there was no template?
Which template are you attempting to use? title? description?

Also do you see any errors that occur in the log when you make a request against the layer which has the template? I wonder if perhaps the template has an error in it and is just being skipped.

-Justin

Roger.Andre@anonymised.com wrote:

Hello fellow GeoServer users,

I'm a brand-new member of this list, and a new user of GeoServer as
well. I'm extremely "chuffed" about the things GeoServer can do, and
am having a great time setting up a little demo to display KML and
GeoRSS output from a PostGIS database. However, I seem to have hit a
small snag in my use of .ftl template files. I've been able to
successfully control the output of a single layer by using global
overrides and template files located under,
"GEOSERVER_DATA_DIR/featureTypes/". Now that I have a few more layers
to display, I would like to have type-specific templates, and have
moved my .ftl files into the specific featureType directory,
"GEOSERVER_DATA_DIR/featureTypes/myfeatureType/". As a result of this
change, myfeatureType now lacks any sort of templated control.

I'm using version 1.6.0 RC 2 of the geoserver.war, and would like to
know if anyone could shed some light on this behavior.

Thanks,

Roger
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

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

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,477e7fe7129412085621377!

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e7fe7129412085621377!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e85c3138206491211187!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Happy to share a copy of some ftl's, here they are.

Also, I tested the topp:states layer and 'lo and behold', the templates are working for it, and I could also add a content.ftl under the "states" featureType dir and it was picked up. So the problem must be in my featureType itself, which for some reason doesn't have it's directory scanned for the presence of templates. This kinda makes sense, as opposed to the templates being wrong, as they work properly when set as global ones.

Here's what I have for that featureType:

- Namespace Info:
    Name = CH2M
    prefix = http://www.openplans.org/topp
- DataStore Info:
    Feature Data Set ID = WORLD_PROJECTS
    Namespace = CH2M
  
- featureType Info:
    Name = WORLD_PROJECTS:vw_worldprojects (points to a PostGIS view named "vw_worldprojects")

- Geoserver Directory structure look like this:
Tomcat5
-->webapps
---->geoserver
------>data
-------->featureTypes
---------->WORLD_PROJECTS_vw_worldprojets

- When I select the data from the Demo Map Preview section, the data set is named:
CH2M:vw_worldprojects

Se anything grossly out of place?

--
Roger

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Friday, January 04, 2008 11:36 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for specificFeatureTypes

Hmmm... strange. You are right, its the presence of the file that dictates if it engages or not. I will have to look into this one. Do you mind sharing an example of one of your templates that does not work?

Also, can you humor me by trying a request against the topp:states layer (this assumes that you are running with the data directory that ships with geoserver). It has templates included with it. Can you tell us if they are engaging or not?

-Justin

Roger.Andre@anonymised.com wrote:

Hi Justin,

That's correct, "myFeatureType" behaves as though no template were set. I have; title.ftl, description.ftl, time.ftl, and content.ftl set under that FeatureType. Looking at the log hadn't even crossed my mind, thanks for the suggestion. I cleared it out and then made a couple requests for data. There doesn't appear to be anything related to this problem in the output, but I've included it below for you to see. It seems more like the presense of the templates isn't even registering. Is there some sort of process to, "enable templates for this FeatureType"? I didn't spot one in the docs, it seemed more like the presence of an .ftl causes it to be read and used.

Log output below:

2008-01-05 11:19:12,843 WARN [geoserver.ows] -
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.vfny.geoserver.util.PartialBufferedOutputStream2.flush(PartialBufferedOutputStream2.java:185)
  at java.io.FilterOutputStream.flush(Unknown Source)
  at org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:167)
  at org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:561)
  at org.geoserver.ows.adapters.ResponseAdapter.write(ResponseAdapter.java:60)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:615)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source) Caused by:
java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 50 more
2008-01-05 11:19:12,843 INFO [geoserver.ows] - Problem writing exception information back to calling client:
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.geoserver.ows.LegacyServiceExceptionHandler.handleServiceException(LegacyServiceExceptionHandler.java:189)
  at org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1179)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:198)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source) Caused by:
java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 46 more

--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: Friday, January 04, 2008 10:58 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for
specificFeatureTypes

Hi Roger,

So the output "myFeatureType" is behaving as if there was no template?
Which template are you attempting to use? title? description?

Also do you see any errors that occur in the log when you make a request against the layer which has the template? I wonder if perhaps the template has an error in it and is just being skipped.

-Justin

Roger.Andre@anonymised.com wrote:

Hello fellow GeoServer users,

I'm a brand-new member of this list, and a new user of GeoServer as
well. I'm extremely "chuffed" about the things GeoServer can do, and
am having a great time setting up a little demo to display KML and
GeoRSS output from a PostGIS database. However, I seem to have hit a
small snag in my use of .ftl template files. I've been able to
successfully control the output of a single layer by using global
overrides and template files located under,
"GEOSERVER_DATA_DIR/featureTypes/". Now that I have a few more
layers to display, I would like to have type-specific templates, and
have moved my .ftl files into the specific featureType directory,
"GEOSERVER_DATA_DIR/featureTypes/myfeatureType/". As a result of
this change, myfeatureType now lacks any sort of templated control.

I'm using version 1.6.0 RC 2 of the geoserver.war, and would like to
know if anyone could shed some light on this behavior.

Thanks,

Roger
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

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

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,477e7fe7129412085621377!

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e7fe7129412085621377!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e85c3138206491211187!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

content.ftl (1.9 KB)

description.ftl (1.68 KB)

Hi Roger,

Sorry for the late reply. I don't see anything immediately wrong with
the templates... and based on all this data everything appears to be in
the right place. So i am somewhat baffled by this.

The only thing left would be for me to try and replicate it over here.
Which I am happy to do however will need some of your data. If that is
possible and there are no license or confidentiality issues feel free to
send me a dump of your table(s), or a subset if they are large. You can
send them in an email directly to me instead of the public list.

-Justin

Roger.Andre@anonymised.com wrote:

Happy to share a copy of some ftl's, here they are.

Also, I tested the topp:states layer and 'lo and behold', the templates are working for it, and I could also add a content.ftl under the "states" featureType dir and it was picked up. So the problem must be in my featureType itself, which for some reason doesn't have it's directory scanned for the presence of templates. This kinda makes sense, as opposed to the templates being wrong, as they work properly when set as global ones.

Here's what I have for that featureType:

- Namespace Info:
    Name = CH2M
    prefix = http://www.openplans.org/topp
- DataStore Info:
    Feature Data Set ID = WORLD_PROJECTS
    Namespace = CH2M
  
- featureType Info:
    Name = WORLD_PROJECTS:vw_worldprojects (points to a PostGIS view named "vw_worldprojects")

- Geoserver Directory structure look like this:
Tomcat5
-->webapps
---->geoserver
------>data
-------->featureTypes
---------->WORLD_PROJECTS_vw_worldprojets

- When I select the data from the Demo Map Preview section, the data set is named:
CH2M:vw_worldprojects

Se anything grossly out of place?

--
Roger

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Friday, January 04, 2008 11:36 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for specificFeatureTypes

Hmmm... strange. You are right, its the presence of the file that dictates if it engages or not. I will have to look into this one. Do you mind sharing an example of one of your templates that does not work?

Also, can you humor me by trying a request against the topp:states layer (this assumes that you are running with the data directory that ships with geoserver). It has templates included with it. Can you tell us if they are engaging or not?

-Justin

Roger.Andre@anonymised.com wrote:

Hi Justin,

That's correct, "myFeatureType" behaves as though no template were set. I have; title.ftl, description.ftl, time.ftl, and content.ftl set under that FeatureType. Looking at the log hadn't even crossed my mind, thanks for the suggestion. I cleared it out and then made a couple requests for data. There doesn't appear to be anything related to this problem in the output, but I've included it below for you to see. It seems more like the presense of the templates isn't even registering. Is there some sort of process to, "enable templates for this FeatureType"? I didn't spot one in the docs, it seemed more like the presence of an .ftl causes it to be read and used.

Log output below:

2008-01-05 11:19:12,843 WARN [geoserver.ows] -
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.vfny.geoserver.util.PartialBufferedOutputStream2.flush(PartialBufferedOutputStream2.java:185)
  at java.io.FilterOutputStream.flush(Unknown Source)
  at org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:167)
  at org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:561)
  at org.geoserver.ows.adapters.ResponseAdapter.write(ResponseAdapter.java:60)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:615)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source) Caused by:
java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 50 more
2008-01-05 11:19:12,843 INFO [geoserver.ows] - Problem writing exception information back to calling client:
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  at org.geoserver.ows.LegacyServiceExceptionHandler.handleServiceException(LegacyServiceExceptionHandler.java:189)
  at org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1179)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:198)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source) Caused by:
java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(Unknown Source)
  at java.net.SocketOutputStream.write(Unknown Source)
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 46 more

--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of
Justin Deoliveira
Sent: Friday, January 04, 2008 10:58 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for
specificFeatureTypes

Hi Roger,

So the output "myFeatureType" is behaving as if there was no template?
Which template are you attempting to use? title? description?

Also do you see any errors that occur in the log when you make a request against the layer which has the template? I wonder if perhaps the template has an error in it and is just being skipped.

-Justin

Roger.Andre@anonymised.com wrote:

Hello fellow GeoServer users,

I'm a brand-new member of this list, and a new user of GeoServer as
well. I'm extremely "chuffed" about the things GeoServer can do, and
am having a great time setting up a little demo to display KML and
GeoRSS output from a PostGIS database. However, I seem to have hit a
small snag in my use of .ftl template files. I've been able to
successfully control the output of a single layer by using global
overrides and template files located under,
"GEOSERVER_DATA_DIR/featureTypes/". Now that I have a few more
layers to display, I would like to have type-specific templates, and
have moved my .ftl files into the specific featureType directory,
"GEOSERVER_DATA_DIR/featureTypes/myfeatureType/". As a result of
this change, myfeatureType now lacks any sort of templated control.

I'm using version 1.6.0 RC 2 of the geoserver.war, and would like to
know if anyone could shed some light on this behavior.

Thanks,

Roger
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

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

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e7fe7129412085621377!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e85c3138206491211187!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

!DSPAM:4007,477eae99194188992556831!

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,477eae99194188992556831!

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477eae99194188992556831!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

No worries on the late reply, I suspect this will be a long-term investigation for me. Unfortunately the data set that I’m using isn’t one that I can send you. I think what I’ll do is load one of the sample data sets that ships with GeoServer into a PostGIS DB and will test if I can define specific ftl’s for it under the featureType. That way I can record the process I’m using and you can replicate my setup easily. I suspect that the problem has something to do with the way I’m creating the DataStore, or the featureType.

In the meantime, as I need to have a working prototype soon, I’m going to add conditional statements to the .ftl’s. That way I can check for the presence of certain attribute fields to identify the layer type, and style the output accordingly.

Thanks for your help with this so far,

Roger


From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Mon 1/7/2008 1:12 PM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for specificFeatureTypes

Hi Roger,

Sorry for the late reply. I don’t see anything immediately wrong with
the templates… and based on all this data everything appears to be in
the right place. So i am somewhat baffled by this.

The only thing left would be for me to try and replicate it over here.
Which I am happy to do however will need some of your data. If that is
possible and there are no license or confidentiality issues feel free to
send me a dump of your table(s), or a subset if they are large. You can
send them in an email directly to me instead of the public list.

-Justin

Roger.Andre@anonymised.com wrote:

Happy to share a copy of some ftl’s, here they are.

Also, I tested the topp:states layer and ‘lo and behold’, the templates are working for it, and I could also add a content.ftl under the “states” featureType dir and it was picked up. So the problem must be in my featureType itself, which for some reason doesn’t have it’s directory scanned for the presence of templates. This kinda makes sense, as opposed to the templates being wrong, as they work properly when set as global ones.

Here’s what I have for that featureType:

  • Namespace Info:
    Name = CH2M
    prefix = http://www.openplans.org/topp

  • DataStore Info:
    Feature Data Set ID = WORLD_PROJECTS
    Namespace = CH2M

  • featureType Info:
    Name = WORLD_PROJECTS:vw_worldprojects (points to a PostGIS view named “vw_worldprojects”)

  • Geoserver Directory structure look like this:
    Tomcat5
    –>webapps
    ---->geoserver
    ------>data
    -------->featureTypes
    ---------->WORLD_PROJECTS_vw_worldprojets

  • When I select the data from the Demo Map Preview section, the data set is named:
    CH2M:vw_worldprojects

Se anything grossly out of place?


Roger

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Friday, January 04, 2008 11:36 AM
To: Andre, Roger/SEA
Cc: geoserver-users@anonymised.com.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for specificFeatureTypes

Hmmm… strange. You are right, its the presence of the file that dictates if it engages or not. I will have to look into this one. Do you mind sharing an example of one of your templates that does not work?

Also, can you humor me by trying a request against the topp:states layer (this assumes that you are running with the data directory that ships with geoserver). It has templates included with it. Can you tell us if they are engaging or not?

-Justin

Roger.Andre@anonymised.com wrote:

Hi Justin,

That’s correct, “myFeatureType” behaves as though no template were set. I have; title.ftl, description.ftl, time.ftl, and content.ftl set under that FeatureType. Looking at the log hadn’t even crossed my mind, thanks for the suggestion. I cleared it out and then made a couple requests for data. There doesn’t appear to be anything related to this problem in the output, but I’ve included it below for you to see. It seems more like the presense of the templates isn’t even registering. Is there some sort of process to, “enable templates for this FeatureType”? I didn’t spot one in the docs, it seemed more like the presence of an .ftl causes it to be read and used.

Log output below:

2008-01-05 11:19:12,843 WARN [geoserver.ows] -
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
at org.vfny.geoserver.util.PartialBufferedOutputStream2.flush(PartialBufferedOutputStream2.java:185)
at java.io.FilterOutputStream.flush(Unknown Source)
at org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:167)
at org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:561)
at org.geoserver.ows.adapters.ResponseAdapter.write(ResponseAdapter.java:60)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:615)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source) Caused by:
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
… 50 more
2008-01-05 11:19:12,843 INFO [geoserver.ows] - Problem writing exception information back to calling client:
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
at org.geoserver.ows.LegacyServiceExceptionHandler.handleServiceException(LegacyServiceExceptionHandler.java:189)
at org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1179)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:198)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source) Caused by:
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:747)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:305)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:996)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
… 46 more


Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@anonymised.comforge.net] On Behalf Of
Justin Deoliveira
Sent: Friday, January 04, 2008 10:58 AM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Location of freemarker templates for
specificFeatureTypes

Hi Roger,

So the output “myFeatureType” is behaving as if there was no template?
Which template are you attempting to use? title? description?

Also do you see any errors that occur in the log when you make a request against the layer which has the template? I wonder if perhaps the template has an error in it and is just being skipped.

-Justin

Roger.Andre@anonymised.com wrote:

Hello fellow GeoServer users,

I’m a brand-new member of this list, and a new user of GeoServer as
well. I’m extremely “chuffed” about the things GeoServer can do, and
am having a great time setting up a little demo to display KML and
GeoRSS output from a PostGIS database. However, I seem to have hit a
small snag in my use of .ftl template files. I’ve been able to
successfully control the output of a single layer by using global
overrides and template files located under,
“GEOSERVER_DATA_DIR/featureTypes/”. Now that I have a few more
layers to display, I would like to have type-specific templates, and
have moved my .ftl files into the specific featureType directory,
“GEOSERVER_DATA_DIR/featureTypes/myfeatureType/”. As a result of
this change, myfeatureType now lacks any sort of templated control.

I’m using version 1.6.0 RC 2 of the geoserver.war, and would like to
know if anyone could shed some light on this behavior.

Thanks,

Roger

Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects



— This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e7fe7129412085621377!


Justin Deoliveira
The Open Planning Project
http://topp.openplans.org


— This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


— This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477e85c3138206491211187!


Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

!DSPAM:4007,477eae99194188992556831!



This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,477eae99194188992556831!



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,477eae99194188992556831!


Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi

I have had a similar issue, where ftl's for some featureTypes have been read
and others haven't. The only difference was that the featureTypes were
coming from different databases. The featureTypes that had this problem came
from a DataStore where the Feature Data Set ID was different from the
postgis database name. Once I changed the data store ID to be the same as
the database name, the tfl worked!

Si

Hi Justin,

No worries on the late reply, I suspect this will be a long-term
investigation for me. Unfortunately the data set that I'm using isn't one
that I can send you. I think what I'll do is load one of the sample data
sets that ships with GeoServer into a PostGIS DB and will test if I can
define specific ftl's for it under the featureType. That way I can record
the process I'm using and you can replicate my setup easily. I suspect that
the problem has something to do with the way I'm creating the DataStore, or
the featureType.

In the meantime, as I need to have a working prototype soon, I'm going to
add conditional statements to the .ftl's. That way I can check for the
presence of certain attribute fields to identify the layer type, and style
the output accordingly.

Thanks for your help with this so far,

Roger
--
--
View this message in context: http://www.nabble.com/Location-of-freemarker-templates-for-specific-FeatureTypes-tp14622769p22225396.html
Sent from the GeoServer - User mailing list archive at Nabble.com.