wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 60810
    
  65

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
 
jQuery in Action, 2nd edition
 
subject: compilation error
 
Similar Threads
deploying axis service on ssl
Session Handling- How restrict to only one admin login
admin-console hidden behind apache http proxy
Web.config file like
Getting Error while creating new user.