aspose file tools*
The moose likes JSP and the fly likes compilation error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "compilation error" Watch "compilation error" New topic
Author

compilation error

Ambika Jain
Ranch Hand

Joined: Jan 27, 2005
Posts: 48
Hi,

I am getting the following error in my jsp, for the following piece of code.
Also, using application.getInitParameter("admim") works fine. But I want
to know the meaning of this error.

-CODE-------------------------------------------------------------------------------------------
String admin=getServletContext.getInitParameter("admim");

-ERROR------------------------------------------------------------------------------------------
error.jsp:12:33: The qualifier of this name is a package, which cannot contain methods.
String admin=getServletContext.getInitParameter("admim");
^--------------^
------------------------------------------------------------------------------------------------
Thanks


Ambika Jain
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Clue: what is getServletContext? A variable? A method?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Amba,

Its a method. I hope you knew it but forgot to put "()" after the name. If not read the docs.

cheers.
Vijay Sharma
Ranch Hand

Joined: Feb 02, 2005
Posts: 32
Hi Amba,
I think getServletContext() is a method.So,if u write
getServletContext().getInitParameter("Admin");
It should work fine.Just try this out.And if it works.Let me know also.


Vijay Sharma
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: compilation error