For the record, rooting causes a violation of the garantuee policy of Samsung. Furthermore there is a possibility of demaging the Android-system(bricking). This has not happend as far as I know, but it should be mentioned. As advanced user it is usually always possible to recover the system, but still, just to let you know.
So whoever takes the risk, takes the responsibility
Advice: Use a PC without any drivers or software from other Android devices, this may causes conflicts with the drivers in the AD
Rooting via Recovery mode(SD card)
Note: This instructions is written for the stock recovery. It has been reported that custom recoverys are causing problems during rooting. If you use a custom recovery which causes problems, please flash the stock recovery via ODIN first(scroll down to Other). Than apply the rooting
1. Download this Zip-file copy this into the internal SD card.
2. While switched off, keep the following buttons pressed. Release the power-button once the Samsung Galaxy W(I8150) is switched on.
As soon as you see the Android with the box, release the Home- and Volume Up-button.
After you hit the menu-button shown on the last image, the screen will gray out, you will have to wait until the recovery menu appears.
3. Navigate with the volume up and down to apply sdcard:update.zipin Recovery Menu. To confirm your selection use the home-button.
4. Choose (with volume buttons) the update.zipfile on your internal sd card and confirm again with Home-button. You will have to wait 5 seconds.
5. Now choose reboot system nowand confirm with home button.
Now you device should be rooted.