File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes RequestDispatcher error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher error" Watch "RequestDispatcher error" New topic

RequestDispatcher error

Shilpa Jain

Joined: Aug 17, 2000
Posts: 16
I have written the following line in doGet() method
but the compiler is giving an error saying that : Method getRequestDispatcher (java.lang.String) not found in interface javax.servlet.ServletContext.

Can anyone pls explain this?
thank you

[This message has been edited by Shilpa Jain (edited October 19, 2000).]
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
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?

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
Looks like he's using Servlets 2.0 ...?

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Shilpa Jain

Joined: Aug 17, 2000
Posts: 16
Yes Iam using version 2.0. do i need to upgrade the version.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hai Shilpa Jain
The Request Dispature mechanisum works with only JavaServlet vertion 2.1 on words.
Thank u
I agree. Here's the link:
subject: RequestDispatcher error
It's not a secret anymore!