Why involve yourself in such round about ways , use this -


> On Tue, 5 Oct 1999, Abhijit Tannu wrote

I had faced similar problem some time back.
You may have to use tag -

<script RUNAT="client" language="javascript">  </script>

if you have client side scripts in your JSP file. This is required if you
working on JSP0.92 specification. This is not required for JSP1.0
specificaiton.

Altough the specification states that by-default the scripts are assumed to
be client side scripts , my experience states otherwise.
Happy coding

Abhi

-----Original Message-----
From: Craig McClanahan <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, October 06, 1999 12:06 AM
Subject: Re: JavaScript in JSP (whoops)


>Brien Voorhees wrote:
>
>> Duh.  I meant :
>> Shouldn't that be <%="i"%>, though?.
>> Brien
>>
>
>At least for JSP 1.0, it should be:
>
>    <%= i %>
>
>You can actually include any Java expression that returns a string value in
such a
>scriptlet.  For example, if you have a customer bean with id "customer"
that has a
>"name" property, you might use the following:
>
>    The customer name is <%= customer.getName() %>.
>
>This is also quite useful when creating input forms where you want the
default
>value to be the current value in this field.  For example:
>
>    <tr>
>        <th>Customer Name:</th>
>        <td><input type="text" name="name" size=50
>             value="<%= customer.getName() %>"></td>
>    </tr>
>
>Of course, using this scriptlet ties you to the underlying language you are
using
>(Java in this case), because the text must be a valid expression in that
language.
>Use <jsp:getProperty> if you need a more language-neutral means to retrieve
>properties from beans.
>
>Craig McClanahan
>
>===========================================================================
>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

===========================================================================
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

Reply via email to