We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

XML Search

Hi,

I am facing some task which cannot sort. I'm deploying Tomcat web server with my application. In Files and Folder there is server.xml created in path [conf_dir] (APPDIR\Server\Web Server\conf). As one of elements is "port" (set to property [TSL_TOMCAT_PORT] = 80 by default). File is set to not uninstall as I want to preserve setting for future installation. Installation also create shortcut to "http://localhost:[TSL_TOMCAT_PORT]".

It works as expected for new installation and if port is not changed. If user change port and then upgrade then I need set [TSL_TOMCAT_PORT] to value from existing server.xml

I think it is possible in "Search - XML Search" but I am not sure how.
My setup is sollowing:
File Path = [conf_Dir]server.xml
Elements tree: Server - Service - Connector
Locator: Search=Attribute name, Value=port, Store-Attribute value in TSL_TOMCAT_PORT

Issue is that server.xml contain multiple "Connector" elements with "port" attribute but different "protocol" attributes. I need only value where protocol="HTTP/1.1" .

Do you have any solution?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML Search

Hi,

Can you implement the steps bellow and see if it works:
- follow the instructions described in the Problem with Search XML: backup some installed file tags thread
- in the same "Connector" element add a new XML locator configured as follows: Search=Attribute value, Value=HTTP/1.1, uncheck the "Store" option
- build and run the project

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: XML Search

Hi,

That is result I expected, thank you. There is one detail which does not affecting me but it can give wrong result in some cases as it tests existence of Attribute value in any Attribute. Nice to have would be ability to set condition: Search Attribute value in Attribute name.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML Search

You're welcome. I'm glad you got it working.

We'll consider your suggestion for adding this feature, but for the moment there are not immediate plans. Thank you for your suggestion.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”