This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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.
 
Bartender
Posts: 2164
92
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
Bartender
Posts: 2164
92
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 :
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!