Question: I would like that my Spring-based web application were able to *validate* its configuration during startup.

This means for example:

* check if the **required folders** exist and are readable/writable
* check if the required **configuration keys** are set and consistent
* ...
* check any other **constraint** that is required for the correct functioning

How can you perform these checks and **notify** the system administrator if something is wrong?

The goal is to reduce the risk that some critical error arises when the application is actually going to need those resources that are bound to the wrong configuration.

**NOTE:** my approach is to use a special **EnvironmentValidation** bean that checks if the configuration/folder structure is ok and if not it throws an exception

Answer: 
\**when you click a image get the paht/uri of that image and create intent and put the value with intent and get it in another activity and show it.*

ex:

gridview.setOnItemClickListener(new OnItemClickListener() {

```
    public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
              int i=R.drawable.ic_launcher;

             Intent intent = new Intent(SamaaActivity.this,kl.class); 
            intent.putExtra("intVariableName", i);
            startActivity(intent);
    }
});

```

and get this on other activity

```
Intent mIntent = getIntent();
    int intValue = mIntent.getIntExtra("intVariableName", 0);

```
You can also pass the uri of the image as extras in the intent used to invoke the second activity. This way you will avoid decoding the data until the point you really need it.