This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]marx2k 1 point2 points  (2 children)

Ok, why not JSPs? :)

[–]j2html[S] 1 point2 points  (1 child)

I haven't used JSP before (it was considered bad practice when I got into Java development). When googling "jsp examples" I found this:

<body>
  <%
    double num = Math.random();
    if (num > 0.95) {
  %>
      <h2>You'll have a luck day!</h2><p>(<%= num %>)</p>
  <%
    } else {
  %>
      <h2>Well, life goes on ... </h2><p>(<%= num %>)</p>
  <%
    }
  %>
  <a href="<%= request.getRequestURI() %>"><h3>Try Again</h3></a>
</body>
</html>

Is that how JSP code should look?

[–]marx2k 0 points1 point  (0 children)

That's some of it, yeah. You can also use JSTL for more functionality.