aspose file tools*
The moose likes JSP and the fly likes What is the point of c:out  ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "What is the point of c:out  ?" Watch "What is the point of c:out  ?" New topic
Author

What is the point of c:out ?

Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
I see a lot of people using things like



Or



What the hell is the point? Isn't it easier to just do:



or



??? Same effect, why the extra writing?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
first: little point
second: that's the syntax before JSTL 1.1.
In JSTL 1.0 you could not embed EL directly in the code and have the output added to the output stream, it could only be used inside a tag.
As many servers don't support JSTL 1.1 (JSP 2.0) yet, and many people have gotten into the use to use cut, you'll continue to see it.
Myself I find the extra text using cut to add clarity, plus the project uses Tomcat 4.1 which doesn't support JSTL 1.1.


42
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Just an example of the ultimate in using JSP tags...
Small JSP which is completely prepared for i18n, not a single word of static text on the page.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61773
    
  67

Also, <cut/> will, by default, escape special HTML characters to their HTML entitiy equivalents.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the point of c:out ?