The declarative tag <%! %> creates instance variables in the servlet into
which your jsp page is compiled. This means that such variables are shared
by all threads running through the servlet. Because the declarative tag is
evaluated at compile time, none of the "implicit" objects (request,
response, session, application) are available. These items only exist at
run time.
Variables created using <% %>, on the other hand, become local variables in
the jsp's service method, which is only invoked at run time. Thus, all the
implicit objects are available.
-----Original Message-----
From: Gerard Menezes [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 17, 2000 2:37 PM
To: [EMAIL PROTECTED]
Subject: Prob of Servlet objects in JSP functions
Hi all,
I have a problem while defining JSP functions in the
Declarative tag <%! %>.
I cannot access the pre-defined servlet objects,
like request,response,session,application etc.
It gives errors such as :
*** Error: "request" is either a misplaced package name or a non-existent
entity.
It becomes very difficult to include all code in the scriptlets without
using
functions. Please Help !!!!!
Thanx a lot
Gerard.M/..
===========================================================================
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