• 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

JSP vs HTML

 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI All,

suppose,in jsp i defined <%%>(scriptlet) code as well as <input/>(html tag)...

-----------------------------------------------------------
my question is
1.which one is understand by server first

2.which one is displayed on browser(understand by) first
--------------------------------------------------------------
please anyone explain me in detail...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best way to understand this is to use the "view source" feature of your browser.

Scriptlet tags are never seen by your browser.
HTML tags are nothing more than text to the server.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:

HTML tags are nothing more than text to the server.[/QB]



ok Ben,then html tags or scriptlet which one will understand by server first(means priority)
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi seetharaman,

At first server will *compile* JSP and execute whatever you define in JSP page (both tag and scriptlet). After that the result text will be merged with normal HTML code.

Hope this help.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by seetharaman venkatasamy:


ok Ben,then html tags or scriptlet which one will understand by server first(means priority)



"First" isn't a valid question.
HTML is never interpreted on the server.

All scriptlets, custom tags, JSTL, and EL expressions are interpreted by the JSP compiler. Everything else becomes println(..) statements (including your HTML, CSS, and Javascript).

None of the server side constructs ever make it down to the browser.
Again, get in the habit of always looking at the HTML source from the browser to help get your head around this.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I GOT IT...THANKS
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic