i have made test cases in Jmeter and saved the test plan but when i restart my server and run those testplan i found the errors in samples that your session has expired and i got errors in jsf application due to view state problem
You need to extract the value of
javax.faces.viewstate field (which is basically a hidden input in the response body) of previous request, convert it into a JMeter Variable and add it as a parameter to the next request.
You can use one of the following PostProcessors for it:
The process of extracting dynamic data and reusing it later in the test script is known as correlation
Don't forget to add HTTP Cookie Manager to your test plan as well, it automatically handles cookies and will handle and maintain the session for each virtual user