This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "difference between tags?" Watch "difference between tags?" New topic
Author

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
 
 
subject: difference between tags?
 
Similar Threads
what is the difference between <s,<mx,<fx tabs
Why is there a listener-element in the TLD?
ejb-jar.xml (Help!)
nested:iterate tag
struts tag & html