Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between tags?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between these two types of tags <% %> and <%= %> ?

JSP Beginner.
 
Sumitro Palit
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. <% %> - jsp scriptlet.
Whatever java code you write here becomes part of the _jspService method after translation. For example: <% int i = 0; %>

2. <%= %> - jsp expression.
Whaterever you write here will be outputted to the html page generated by your jsp page.

I suggest that you pick up a jsp book and start reading about the basic java tags and practice using them using a free servlet/jsp container like Tomcat.

- ortimuS
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic