• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between tags?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between these two types of tags <% %> and <%= %> ?

JSP Beginner.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic