Hi Antonio,

The way you wrote it right now, getServletContext() should be a method of
your current jsp and it isn't. That's what the error is telling you.

The correct way to access the servlet context is to use the implicit object
'application'. This is a predefined variable in every jsp.

For a complete list of these implicit objects, see the jsp 1.1
specification, section 2.8. It's at <orion>\docs\jsp\jsp1_1-spec.pdf

Good luck,
Marcel

----- Original Message -----
From: "Antonio Vazquez" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 9:39 AM
Subject: Problem with jsp pages


> Hi all,
> I'm a newbie using Orion and I have a problem.
> I need to get Servlet Context to get an attribute, but when I use
> getServletContext().getAttribute("Attribute") I receive the follow error:
>
> /jsp/adestadoc.jsp.java:35: Method getServletContext() not found in class
> /jsp/adestadoc.jsp. (JSP page line 9)
>         Vector vectorUsuarios =
> (Vector)getServletContext().getAttribute("vu");
>
> I've put tools.jar and rt.jar in the Orion directory. I havenīt any other
> problems executing servlets and jsp pages.
> Can anybody help me?
>
> Thanks in advance.
>
> Antonio
>
>



Reply via email to