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

Error 404 - Not found

Babu Singh
Ranch Hand

Joined: Aug 17, 2009
Posts: 83
i am calling a JSP from a servlet but i am getting a error Error 404- Not found.

Servlet file is reside in E:\Simple\WEB-INF\classes\servlet folder.

web.xml is:

please suggest.
Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3782

Your have not correctly configured your web.xml for the JSP nor the Servlet.
here is an example of how to setup a JSP file in the DD. In particular, you will need to use a <servlet-mapping> element for mapping them to a url pattern.

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63532

Why would the JSP need to be mapped?

[Asking smart questions] [About Bear] [Books by Bear]
Yushi Zhang

Joined: Mar 18, 2010
Posts: 8
# <servlet>
# <servlet-name>ServletHome</servlet-name>
# <servlet-class>servlet.ServletHome</servlet-class>
# </servlet>
# ===========
# <servlet-nameVij.jsp</servlet-name>
# <url-pattern>*.do</url-pattern>

Try again
Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3782

"Blues Jj", please check your private messages regarding an important administrative matter.
I agree. Here's the link:
subject: Error 404 - Not found
It's not a secret anymore!