Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher error

 
Shilpa Jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written the following line in doGet() method
getServletContext().getRequestDispatcher("/servlet/ShowSession").include(request,response);
but the compiler is giving an error saying that :
HelloWorld.java:44: Method getRequestDispatcher (java.lang.String) not found in interface javax.servlet.ServletContext.
getServletContext().getRequestDispatcher("/servlet/ShowSession").include(request
,response);

Can anyone pls explain this?
thank you

[This message has been edited by Shilpa Jain (edited October 19, 2000).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This probably means you are using a servlet container which only implements an older version of the Servlet API. What server or container are you using, and which version?
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like he's using Servlets 2.0 ...?
 
Shilpa Jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Iam using version 2.0. do i need to upgrade the version.
Shilpa
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Shilpa Jain
The Request Dispature mechanisum works with only JavaServlet vertion 2.1 on words.
Thank u
suresh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic