• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

cannot use getInitParameter()  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I compile the above code using "javac -classpath C:\Apache\tomcat\lib\servlet-api.jar test.java" and receive the following error:
error: cannot find symbol
               out.println("main email"+ getServletConfig().getInitParamater("mainEmail"));
                                                                               ^
 symbol:   method getInitParamater(String)
 location: interface ServletConfig
1 error

Any help is appreciated.
 
Saloon Keeper
Posts: 2089
77
Eclipse IDE Google Web Toolkit Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe its because you misspelled: getInitParamater, it should be getInitParameter.
 
Siddharth Yashaswee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. I had been stuck for over an hour checking my classpath and JAVA_HOME variables.
I even downloaded different versions of the servlet api.
You saved my day
 
salvin francis
Saloon Keeper
Posts: 2089
77
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Siddharth Yashaswee wrote:...You saved my day


You're welcome. The error message gives you this hint :
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!