On Mon, 8 May 2000, Kevin Guan wrote:

> What is the difference between declaring variables in <%! %>  and <% %> ?

<%! %> puts the contents in class scope, and <% %> inlines the
contents. <% %> is suitable for short-term variable declarations, whereas
<%! %> is perfect for declaring functions and servlet-scope variables.

> Geert Van Damme wrote:
> > Most important thing:
> > Stay away from <%! tags.
> > I know sometimes you need them, but I've seen people use a lot of these tags
> > when in fact they needed <% %>

Okay, I'm lost. Why in the WORLD would you stay away from something that
you say "sometimes you need them?" Proper design is by far the thing to
adhere to, and using <%! %> allows you another tool to acheiving proper
design; there's no reason to go out of your way to avoid the tools JSP
offers you. These things don't reduce threadability, unless you declare a
lot of statics, and even then, sometimes it's useful (if you, um, know
what you're doing.)

> > There are other issues of course, but IMO that's the most important
> > regarding JSP.
> >
> > Geert 'Darling' Van Damme
> >
> > > -----Original Message-----
> > > From: A mailing list about Java Server Pages specification and reference
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Allen Hillman
> > > Sent: maandag 8 mei 2000 21:53
> > > To: [EMAIL PROTECTED]
> > > Subject: JSP Thread safety
> > >
> > >
> > > Can anyone supply tips to ensure thread safety within a JSP page?
> > >
> > > Specific things to look for, things to do and not do.
> > >
> > > Thanks,
> > >
> > > Allen Hillman
> > >
> > > Software Engineer
> > >
> > > Kana Communications
> > > 50 Phillippe Cote Street
> > > Manchester NH 03101
> > > Voice: 603-665-1382
> > > Fax: 603-665-1982
> > >
> > > ==================================================================
> > > =========
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > JSP-INTEREST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> > >
> >
> > ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

-----------------------------------------------------------
Joseph B. Ottinger               [EMAIL PROTECTED]
http://cupid.suninternet.com/~joeo      HOMES.COM Developer

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to