Announcement Announcement Module
Collapse
No announcement yet.
Strange parameter values in context-param Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange parameter values in context-param

    Hi all,

    I am trying to understand an application that is running under Tomcat and uses the Spring framework.
    In the web.xml is a ContextLoaderListener and a correponding context parameter entry. The context parameter block is looking like this:

    Code:
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    file:///myopt/shibboleth-idp-2.0.0/conf/internal.xml; file:///myopt/shibboleth-idp-2.0.0/conf/service.xml;</param-value>
    </context-param>
    This is the first time I see someone using a prefix like this (file:///). What does the ContextLoader doing with this string? Does he ignore the prefix?

    Another question is related to the file service.xml that is loaded in the context loader (-->
    Code:
    file:///myopt/shibboleth-idp-2.0.0/conf/service.xml
    ). This is not a application context configuration file but a xml file with a proper syntax (the context configuration file for the Spring beans is internal.xml). What does this mean to the context loader? Will this be ignore or is there a possibility to access to the parameters declared in service.xml?

    service.xml:
    -- snipp
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <Services xmlns="urn:mace:shibboleth:2.0:services"
    xmlns:attribute-afp="urn:mace:shibboleth:2.0:afp"
    xmlns:attribute-authority="urn:mace:shibboleth:2.0:attribute:authority"
    xmlns:attribute-resolver="urn:mace:shibboleth:2.0:resolver"
    xmlnsrofile="urn:mace:shibboleth:2.0:idprofile-handler"
    xmlns:relyingParty="urn:mace:shibboleth:2.0:relyin g-party"
    xmlns:resource="urn:mace:shibboleth:2.0:resource"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:mace:shibboleth:2.0:servic es classpath:/schema/shibboleth-2.0-services.xsd
    urn:mace:shibboleth:2.0:afp classpath:/schema/shibboleth-2.0-afp.xsd
    urn:mace:shibboleth:2.0:attribute:authority classpath:/schema/shibboleth-2.0-attribute-authority.xsd
    urn:mace:shibboleth:2.0:resolver classpath:/schema/shibboleth-2.0-attribute-resolver.xsd
    urn:mace:shibboleth:2.0:idprofile-handler classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd
    urn:mace:shibboleth:2.0:relying-party classpath:/schema/shibboleth-2.0-relying-party.xsd
    urn:mace:shibboleth:2.0:resource classpath:/schema/shibboleth-2.0-resource.xsd">
    
    <Service id="shibboleth.AttributeResolver"
    xsi:type="attribute-resolver:ShibbolethAttributeResolver">
    <ConfigurationResource file="/myopt/shibboleth-idp-2.0.0/conf/attribute-resolver.xml" xsi:type="resource:FilesystemResource" />
    </Service>
    
    <Service id="shibboleth.AttributeFilterEngine"
    xsi:type="attribute-afp:ShibbolethAttributeFilteringEngine">
    <ConfigurationResource file="/myopt/shibboleth-idp-2.0.0/conf/attribute-filter.xml" xsi:type="resource:FilesystemResource" />
    </Service>
    ...
    -- snapp

    Any help will be appreceated!

    -- Franck
    Edit/Delete Message

  • #2
    The 'file:' prefix indicates that it is a resource to load from the file system. Handling/loading resources are handled by chapter 4 of the reference guide.

    The other file you mention is also an application context file however as of Spring 2.0 you can define your own BeanDefinitionParsers, with which it is quite easy to create your own xml namespaces (like the util: and context: one of spring. They created one called Service... This is explained in appendix B

    Comment


    • #3
      Thanks a lot!

      This helps ;-).

      -- Franck

      Comment

      Working...
      X