This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between tags?

 
yamini nadella
Ranch Hand
Posts: 257
  • 0
  • 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
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic