开发者

echo instruction in jsp

开发者 https://www.devze.com 2023-02-27 03:23 出处:网络
How to make \"echo\" (php) but in jsp开发者_开发技巧?You can do like this: out.print(\"whatever you want to echo\"); also:

How to make "echo" (php) but in jsp开发者_开发技巧?


You can do like this:

out.print("whatever you want to echo"); also:

<c:out value="${variableName}" /> where variableNmae would the value you want to output.

Hope that helps.


<%="Hello Word"%>

Or even better

 <c:out value="hello World"/>


Let say we have 'some' variable:

String some = "Hello World";

Lets then print it on html as follow:

<%
    out.print("<h1>"+some+"</h1>");
%>
0

精彩评论

暂无评论...
验证码 换一张
取 消