Posted By

mattstopa on 02/08/10


Tagged


Versions (?)

JSP Basics - Basic variable insertion and using the get method


 / Published in: Java
 

  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  

You need to login to post a comment.