0

How to create a parameter in JSP? I want to make a parameter of String type. Are all parameters of String type only? I have tried this:

 <% request.setAttribute("testID", "1"); %>

And this:

<% String testID="1"; %>

But on fetching value of parameter, through this:

String testID=request.getParameter("testID");

I am receiving null. How to fetch value of parameter testID? Also, what is difference between parameter and attribute?

Malwinder Singh
  • 6,644
  • 14
  • 65
  • 103

0 Answers0