Hi Gerard,
If you make a study of your JSP generated servlet, you'll notice that that the
contents of your declarative tag go in as instance mathods/variables of the
servlet.
The implicit objects are extracted from the page context object within the
_jspService method and so are not available to other methods.
May be you should look into tag extensions to separate your controller logic from
the view.
-Kiran.
Gerard Menezes wrote:
> 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
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.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