0

Here is the example of what i am asking

<%
String variable="Value";
out.println("<input type='hidden' value="<%=variable%>" "/);
%>
  • 2
    Possible duplicate of [How to avoid Java code in JSP files?](http://stackoverflow.com/questions/3177733/how-to-avoid-java-code-in-jsp-files) – Eldelshell Jan 22 '17 at 17:00

1 Answers1

0

In the Scriptlet you can use the java syntax like this:

<%
String variable="Value";
out.println("<input type='hidden' value='" + variable + "'>");
%>

But you should try avoiding scriptlets at all. Read more: How to avoid Java code in JSP files?

Community
  • 1
  • 1
code_angel
  • 1,537
  • 1
  • 11
  • 21