Kishore Kumar Kochi Ram Mohan wrote:
>
> Hi JSP Gurus,
>
> I am a new user of JSP.
>
> I am in the process of converting JSP 0.91 version to
> JSP 1.0. In the JSP 0.91 version, there is provision
> of using <if condition = "<%...%>">...<else>...</if>.
>
> My question is will the same syntax holds true for JSP
> 1.0 (or) is there any other syntax.
>
> I also checked Sun's JSP Syntax, I couldn't able to
> find syntax for if, for, loop. Also Pls let me know
> where can I find these Syntax.
All the conditional tags you found in 0.92 were removed in JSP 1.0
since there was a lot of other basic stuff that needed to be formalized
and time was running out. In JSP 1.1 a formal custom tag interface is
defined and you can use it to define tags similar to the ones in
JSP 0.92 yourself. It's also likely that standard tags like these will
be introduced in a future version of JSP.
If you're using a JSP 1.0 container, you can use simple scriptlets
for conditions and loops instead, e.g.
<% if (someCondition) { %>
The text that should be produced only if the condition is true.
<% } %>
and
<% for (int i = 0; i < someArray.length; i++) { %>
<li>Current value: <%= somArray[i] %>
<% } %>
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html