This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Journal Article - Embrace Writing Script-less JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Journal Article - Embrace Writing Script-less JSP" Watch "Journal Article - Embrace Writing Script-less JSP" New topic
Author

Journal Article - Embrace Writing Script-less JSP

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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 ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jeffrey Hunter
Ranch Hand

Joined: Apr 16, 2004
Posts: 305
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

Joined: May 31, 2004
Posts: 24
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

Joined: Sep 05, 2004
Posts: 2

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


Embrace, Extend, Extinguish <br /> (TM) Microsoft Corp.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Journal Article - Embrace Writing Script-less JSP
 
Similar Threads
String literal constants - opinion sought.
Journal Article - Meet the Author - Thomas B. Passin
Journal Article - Looking "Under the Hood" with javap
Journal Article - Debugging Server-side Code through IntelliJ IDEA with BEA Weblogic
Journal Article - Automate the build process of your J2ME project with Antenna