I have a set of JSP Pages for each I have a set of links to use for the response time measurements. In order to aggregate the results correctly I am trying to run a foreach controller over a loop controller using the csv data set config element. Somehow I cannot get the setup to parameterize the filename of the CSV config element.

  • ThreadGroup
    • JSP Names
    • Foreach JSP Controller
      • Loop Controller
        • CSV config reading from ${jspPage}.csv (not working)
        • HTTP Request

any ideas?

2 Answers 2


Given that your foreach controller works and ${jspPage}.csv is being correctly populated it should be fine to read CSV data.

Assuming that you have each link in a new line could you please make sure that following configuration is applied:

For Loop Controller: should be > than 1 loop. Elsewise it'll read only the first line.

For CSV Data Set Config:

  1. Filename - ${jspPage}.csv (should resolve to csv file)
  2. File encoding - must match your file encoding (it's recommended to use UTF-8)
  3. Variable name - anything meaningful. If you're using full URLs like protocol://host:port/path you need to split it via Beanshell function elsewise you'll be getting errors like "Host is null"
  4. Delimiter - something like "\r\n" (without quotes). You may wish to use


    as line separator may vary on Windows, MacOSX and Linux.

Other properties are according to your use case. With defaults which are

  • Allow quoted data - false
  • Recycle on EOF - true
  • Stop Thread on EOF - true
  • Sharing mode - all threads

You should get the number of requests per JSP CSV file equal to loops, defined in your Loop Controller.


One thing that is confusing, why do you need the foreach controller if you use the loop controller. Also, I would recommend to not use any of these controllers and simply allow JMeter to iterate through the CSV file. Also, it looks like you determine the file name is realtime. This can cause unexpected behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.