Announcement Announcement Module
Collapse
No announcement yet.
surf.xml endpoint from System Properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X