Question: In my solution I have WinForms application called JCommander and JCommanderSetupProject.
In JCommander Resources folder i have an icon file i want to be placed on Desktop and Start Menu. 

How i do that?

Answer: 
You can use [Zend\_Registry](http://framework.zend.com/manual/en/zend.registry.using.html) to use the variable throughout application.

You can set a variable like this 

```
Zend_Registry::set('email', $EMAIL);

```

and later can get it like this

```
$email= Zend_Registry::get('email');

```
Looks to me like you are making two distinct requests calling, respectively, `checkusernameAction()` and `subscribeAction()`. Since these are distinct requests, the email value you set in the controller during `checkusernameAction()` will be gone on the second request which calls `subscribeAction()`. It's the same controller *class*, but you are looking at two distinct *instances*, one in each request.

As I see it, you can either:

1. Pass the email address in each AJAX request, but this seems unlikely since you get the email address from the first call to `checkusernameAction()`.
2. Save the email in the session during the first `checkusernameAction()` call and then pick it up during the second `subscribeAction()` call.
3. Extract the "get email from username" code into a separate class or method and then call it in both places. After all, you don't want to get bitten by a "race condition" in which the state of the system changes between the two AJAX requests (maybe the user's email changes via some other process or via another set of requests that occur after the first AJAX request containing the call to `checkusernameAction()`.