Results 1 to 2 of 2

Thread: surf.xml endpoint from System Properties

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Location
    Antwerpen
    Posts
    8

    Default surf.xml endpoint from System Properties

    Hi,

    Ive seen lots of posts about reading system variables to beans but not inside the surf.xml file.
    Im using Jboss and set some general system variables. In my classes i can read them out with System.getProperty("endpoint") and the result is correct.

    However i want this variable inside the surf.xml file. Otherwise i would need to configure the war for each instance instead of having the variable inside Jboss.

    Code:
    <config evaluator="string-compare" condition="Remote">
    		<remote>
    			<endpoint>
    				<id>alfresco</id>
    				<name>Alfresco - user access</name>
    				<description>Access to Alfresco Repository WebScripts that require user authentication</description>
    				<connector-id>alfresco</connector-id>
    				<endpoint-url>${endpoint}</endpoint-url>
    				<identity>user</identity>
    			</endpoint>
    
    		</remote>
    	</config>
    At this point i expect the system variable to be set but all get in the log is :

    Code:
    java.net.MalformedURLException: no protocol: ${endpoint}/api/login
    what am i doing wrong ?

  2. #2
    Join Date
    Dec 2010
    Posts
    5

    Default

    I believe the surf.xml configuration file is not a "Spring" file, but a custom XML document parsed manually by the framework. Therefore, variable substitution is not available.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •