This might be a slight deviation .. but i just want to
know..

If we declare a variable in <%! %> and after that if
you include a file. Can i be able to access the above
variable in the included file?

Eg:

file : first.jsp

<%!
   String name = "sample";
%>
....
<jsp:include ..."abc.jsp" >

Can i be able to access "name" in abc.jsp ?

Cheers,
Venu

--- Geert Van Damme <[EMAIL PROTECTED]> wrote:
> Yes
> and in most cases (IMHO nearly always) you should
> use <% %>.
> I've seen many problems from people using <%! %>
> without any understanding
> of how it works.
>
> Geert Van Damme
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages
> specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of
> SANDEEP UPPAL
> > Sent: maandag 25 september 2000 11:08
> > To: [EMAIL PROTECTED]
> > Subject: Re: difference between <%!...%> and
> <%....%>
> >
> >
> > can we declare a variable like <% public int =
> 1;%>
> >
> > regards,
> >
> > Sandeep
> > ----- Original Message -----
> > From: Rathna <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, September 25, 2000 2:19 PM
> > Subject: Re: difference between <%!...%> and
> <%....%>
> >
> >
> > This <%! ...%> scriptlet is used to define a
> global functions
> > and variables, means out side the serivce
> method.The second
> > one is to declare the functions and variables
> inside the service
> > method ...
> >
> > hope this helps,
> >
> > with regards,
> >            rathna.
> >
> >
> > SANDEEP UPPAL wrote:
> >
> > > both <%!...%> and <%.....%> can be used for
> declaring variables.
> > >
> > > What is the difference between both and which to
> use ?
> > >
> > > regards,
> > >
> > > Sandeep Uppal
> > >
> > >
> >
>
==================================================================
> > =========
> > > 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
> >
> > --
> > Cheers,
> >     rathna
> >
> >
> > ø¤°`°¤ø,¸¸¸,ø¤°`°¤ø,¸¸»«¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø
> >
> >   P Rathinavel
> >   Sr.Systems Engineer - eCommerce Division
> >   Wipro Technologies
> >   Electronic City
> >   Bangalore 561229, India
> >   Tel  : 8520420/416/424/408  Extn : 1313
> >   E-mail: [EMAIL PROTECTED]
> >   www.wipro.com
> >
> > ø¤°`°¤ø,¸¸¸,ø¤°`°¤ø,¸¸»«¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø
> >
> >
>
==================================================================
> > =========
> > 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


__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

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