> <% out.println(dt.getHours()  + ":" + dt.getMinutes() + ":" +
> dt.getSeconds()); %>
>
> than
>
> <%=dt.getHours()%>:<%=dt.getMinutes()%>:<%=dt.getSeconds()%>
>
> (if nothing else it's faster to spot errors in the first for me, cause
> I've got The Eye) so I'd like to maybe just stick to <% if I can.
>
> So I guess my question is - is <%= truly just  a shortcutty kind of
> thing? Or is there more to it than that - do I actually need it
> sometimes.

It's pretty much just a convenience for non-Java programmers, which most
page designers are. You are more the exception than the rule if you know a
lot of Java syntax and do the web pages too.  One benefit is that the <%=%>
syntax will do simple toString() conversions for you, so stuff like <%=i%>
for an int index can be used, and it's even more compact than
<%out.println(""+i)%>  (or out.println(Integer.toString(i)). I believe the
move is away from Java code in the pages themselves, and the JSP spec is
moving towards taglets and such to do the work, again mostly because the
typical web page designer is not a Java programmer.

David

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to