This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 78
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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3112

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: 61315

Why would the JSP need to be mapped?

[Asking smart questions] [Bear's FrontMan] [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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3112

"Blues Jj", please check your private messages regarding an important administrative matter.
GeeCON Prague 2014
subject: Error 404 - Not found