Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Journal Article - Embrace Writing Script-less JSP

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The just-released August 2004 edition of The JavaRanch Journal includes an article by Bear Bibeault, "Embrace Writing Script-less JSP".

Please use this thread to comment on and discuss the article.
[ August 26, 2004: Message edited by: Dirk Schreckmann ]
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I first arrived at the Ranch, my JSP pages were rather ugly, socially-inept creatures with bodies full of Java scriplets, business logic, and everything else including the kitchen sink. I'm happy to report that I've made the transition to JSTL, and how proud I am to look at the finely-polished, handsome new JSPs I've created. Bear is right on, and you, new JSP programmer, do yourself a favor, READ BEAR'S ARTICLE. Learn the right way to do things from the start, it makes the process a whole lot healthier.

And to Bear, thanks. You've been a great help in my transition from sloppy, newbie code, to stream-lined professional-grade applications.
 
Dan Johnsson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really nice article. In the summary it catches in one sentence the crusial insight to get a nice structure of the web tier.

I think it is worth pointing out that the philosophy is not restricted to JSP 2.0, it is even more important if you want your structure to make sence if you are restricted to, say JSP 1.2 + Struts.
 
jan de rijke
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In a scriptless JSP this is a problem because even though we can obtain the names of the scoped variables as an EL-friendly enumeration (using ${pageContext.servletContext.attributeNames}), you must make a call to a method that takes the name as a parameter in order to obtain the value. And that is something that the EL cannot do.2

2 Someone is sure to point out that with JSTL 1.1 it is possible...

Congratulations: you are gifted with second sight!

Alas, as the evil PageContext doen not have this EL friendly enum it does not work there.

Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic