JSP Basics - Basic variable insertion and using the get method


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <html>
  2. <% String userName = request.getParameter("name");
  3. if (userName == null) userName = "World"; %>
  4. Hello, <%= userName %> // The <%= means that you are going to output the value
  5. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.