This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

method getServletConfig() is undefined for the type TestInitParams

 
Omar Perez
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings Community, God Bless

I'm currently on page 154 of the Book HeadFirst Servlets and JSP, using eclipse IDE and the servlet.api from Tomcat's latest release. However I'm getting the following error in eclipse "the method getServletConfig() is undefined for the type TestInitParams". I don't know what I'm not doing correctly, could anyone give me a hand explaining me where is my mistake?

Here is my code for the class


And here is the code ffor my DD (web.xml)



Thank you for your time
 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to extend HttpServlet.
 
Omar Perez
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Charles wrote:You need to extend HttpServlet.


Ohh I must be really sleepy, thank you man.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic