Yep, very helpful.  You've saved me lots of research time.
Regards,
Alessandro Ferrucci

On Fri, Aug 5, 2011 at 10:41 AM, Justin Deoliveira <[email protected]>wrote:

> Hi Alessandro,
>
> There are multiple levels of routing... the first is defined in web.xml:
>
>  <!-- spring dispatcher servlet, dispatches all incoming requests -->
>>
>>  <servlet>
>>
>>   <servlet-name>dispatcher</servlet-name>
>>
>>
>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>
>>  </servlet>
>>
>>
>
>>   <!-- single mapping to spring, this only works properly if the advanced
>>> dispatch filter is active -->
>>
>>  <servlet-mapping>
>>
>>   <servlet-name>dispatcher</servlet-name>
>>
>>   <url-pattern>/*</url-pattern>
>>
>>  </servlet-mapping>
>>
>>
>
> This essentially routes everything to the spring mvc framework. From there
> routing is defined by various entries in the spring applicationContext.xml
> files for all the modules. For instance in main:
>
>  <!--  dispatcher -->
>>
>>  <bean id="dispatcher" class="org.geoserver.ows.Dispatcher"/>
>>
>>
>>>   <bean id="dispatcherMapping"
>>>  class="org.geoserver.ows.OWSHandlerMapping">
>>
>>     <constructor-arg ref="catalog"/>
>>
>>      <property name="alwaysUseFullPath" value="true"/>     <property
>>> name="mappings">      <props>
>>
>>         <prop key="/ows">dispatcher</prop>
>>
>>         <prop key="/ows/**">dispatcher</prop>
>>
>>       </props>
>>
>>     </property>
>>
>>   </bean>
>>
>>
> This routes any requests with path "ows" to the ows dispatcher. There are
> similar entities set up in the wms/wfs/wcs/etc.. .modules. This is also used
> to route to other destinations, for instance with rest endpoints:
>
>  <bean id="restWrapper" class="org.geoserver.rest.RESTDispatcher">
>>
>>   <constructor-arg ref="geoServer"/>
>>
>>  </bean>
>>
>>
>
>>   <alias name="restWrapper" alias="restDispatcher"/>
>>
>>
>
>>   <bean id="restletDispatcherMapping"
>>> class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
>>
>>   <property name="alwaysUseFullPath" value="true"/>
>>
>>   <property name="mappings">
>>
>>    <props>
>>
>>     <prop key="/rest">restWrapper</prop>
>>
>>     <prop key="/rest/**">restWrapper</prop>
>>
>>    </props>
>>
>>   </property>
>>
>>  </bean>
>>
>>
> From there the the two dispatchers to their own routing to dispatcher to
> the service (ows) or the restlet (rest) to handle the request.
>
> Hope that helps.
>
> -Justin
>
> On Fri, Aug 5, 2011 at 6:26 AM, Alessandro Ferrucci <
> [email protected]> wrote:
>
>> Hello, I'm writing some custom modules for geoserver and am curious as to
>> how a request is routed (I know about OWS but I'd like to look over some of
>> the built-in modules like WMS).. is there an explicit entry point into
>> geoserver that performs the routing of request or is that wholly within
>> spring?
>> is the fetching of the appropriate data stores (from the layer list)
>> performed within each module or before the module is even chosen?
>> If anyone has any documentation to start off with I'd rather get a more
>> targeted approach before I just start from the start and search the entire
>> source source tree myself,
>>
>> Thank you!
>> --
>> Signed,
>> Alessandro Ferrucci
>>
>>
>> ------------------------------------------------------------------------------
>> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>> The must-attend event for mobile developers. Connect with experts.
>> Get tools for creating Super Apps. See the latest technologies.
>> Sessions, hands-on labs, demos & much more. Register early & save!
>> http://p.sf.net/sfu/rim-blackberry-1
>> _______________________________________________
>> 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.
>
>
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to