An alternative easy way is to install the Blazemeter Chrome Extension for your Chrome browser. Once installed, all you need to do is click and start recording your application.
00:00 Open Blazemeter
00:15 Recording
01:00 saving the recording
2:05 View recorded steps in JMeter