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
  • 18,603
  • 29
  • 96
  • 155
user1334130
  • 1,131
  • 3
  • 18
  • 25

1 Answers1

0

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

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
Kanagaraj M
  • 956
  • 8
  • 18