maxt
Posts: 15
Joined: Fri Mar 24, 2006 12:19 am

Wait for folder creation

Hi

When starting Tomcat for a servlet based application, we must copy a .WAR file to one of Tomcat's folders when the Tomcat Service has been started.

Tomcat gets around to seeing this .WAR file in its own time (after a few seconds) and Tomcat then creates a new folder that is an expansion of the .WAR file.

We must wait for this folder to be created before launching the application using a browser and URL.

How do we wait for this folder creation before launching with a browser?

Regards

Max
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I'm afraid that I don't exactly understand what you are trying to achieve. What I understand is that the Tomcat service creates a folder and you need to copy a file in that folder, is that right? If not then please give me more details.

If this is what you what then you can create a custom action under "InstallFinalize" that copy's a file (file in your package) in that directory created by the Tomcat service.
We must wait for this folder to be created before launching the application using a browser and URL
That folder is created by the service so it is created before windows installer reach to the finish dialog (launch the application by pressing the Finnish button).

If I don't understand correctly then please give me more details.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
maxt
Posts: 15
Joined: Fri Mar 24, 2006 12:19 am

Wait for folder creation

Hi again

The sequence is:
1. AI installs the Tomcat exe files and folders.
2. AI copies the .WAR file into one of the Tomcat folders
3. AI starts the Tomcat service
4. Tomcat sees the .WAR file (after a pause) and Tomcat creates a folder of the files and folders archived in the .WAR file.
5. When this folder has been created by Tomcat, we want AI to launch the browser with a URL that will access a file in the newly created folder.

Between 4 and 5 AI must wait until Tomcat has created the folder.

How can we make AI wait?

Regards

Max
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The problem is that windows installer reaches at the custom action that launch the browser before that folder gets created. I don't think that you can control this because standard action or custom action that start the service returns immediately after the service is started.

I don't know if this solves the problem but you can try to schedule the custom action that launch the browser when user press the finish button or under "InstallFinalize" standard action.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
maxt
Posts: 15
Joined: Fri Mar 24, 2006 12:19 am

Wait for folder creation

Hi again

It seems that we cannoot hold up the sequence directly with AI and wait for an event to occur, such as the creation of a folder. Correct?

Perhaps I could write an application that loops until the folder is created, and then exits.

Then put this into a custom action.

Possible?

Regards

Max
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Perhaps I could write an application that loops until the folder is created, and then exits.
I think you can create a program that wait for the folder to be crated and schedule it as a deferred custom action right after the service is started.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”