File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes difference between tags? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "difference between tags?" Watch "difference between tags?" New topic

difference between tags?

yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
What is the difference between these two types of tags <% %> and <%= %> ?

JSP Beginner.
Sumitro Palit
Ranch Hand

Joined: Dec 13, 2003
Posts: 37
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
I agree. Here's the link:
subject: difference between tags?
jQuery in Action, 3rd edition