• 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

Scriptlet ...

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if a particulat scriptlet is repeated in several places withing a JSP..what JSP V1.0 tag would be best to code this?
JSP Expression ? TagLib directive? or JSP declaration..?
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP 1.0 does not support custom tags. Only JSP 1.1.
Sounds like a "job for" <jsp:include page="scriptlet.jsp"/>
Off the top of my head (or what's left of it!), you could code the scriptlet solely in that JSP.
Admonition: (In general) don't use scriptlets especially in Enterprise environments where HTML coders and so-called "Page Designers" are the ones who are going to be "doing" the JSPs.
They are not programmers (nor do they play one on TV!) and they wish they didn't have to learn Java just to keep their jobs.
This need has been recognized from day one and in the "old days", the name "Architecture type 2" was coined for the architecture in which "presentation" (the coding of a JSP which of course is translated to HTML so any browser can see it) is as much separated as possible from business logic (the "if then elses" and new thisOrTheOther() of Java code etc...)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic