0

I am trying to save a parameter to a string variable in JSP but cannot figure out how to do it.

The request is working as it should and the data is being retrieved.

<%= request.getParameter("page") %>

But how can I save it as a string?

<% String temp = '<%= request.getParameter("page") %>'; %>

The above code doesn't work. :(

AndreyAkinshin
  • 17,723
  • 28
  • 93
  • 152
user1334130
  • 1,021
  • 3
  • 16
  • 25

1 Answers1

0

<% String temp = request.getParameter("page"); %> is enough to store the value...

Luiggi Mendoza
  • 83,472
  • 15
  • 149
  • 315
Kanagaraj M
  • 938
  • 8
  • 18