• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL too feeble?

 
Al Bambino
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our group some people are proposing to ban scripting altogether in JSP pages (by using the scripting-invalid tag) in favor of EL. However I find it too stupid to do. It is too cumbersome or impossible to do many simple things. For example, I just want to print all headers and their values in the JSP page. It is very trivial to do using scriptlet. But how do I do it in EL? I am totally clueless. Any ideas? Am I missing something here??
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, Welcome to the Ranch "Al Bambino"!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks!
bear
JSP Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now as to your question...
Whether this is sign of feebleness on the part of the EL is perhaps open to interpretation. The JSTL and the EL are certainly not fully-functional Java replacements. And they're not meant to be.
The design focus of the EL is best-aligned with web applications that follow the Model 2 (MVC-like) pattern where a controller (usually a servlet) performs any processing and setup necessary for the page to do its job of formatting the view.
In this scenario, your desire to iterate through the headers could be accomplished by having the controller store a Map of the headers as a scoped variable and accessing it on-page with the forEach action.
Some may call it feebleness -- I see it as marshalling JSP developers in a certain direction.
[ February 20, 2004: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!