wood burning stoves 2.0*
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
Author

Error 404 - Not found

Babu Singh
Ranch Hand

Joined: Aug 17, 2009
Posts: 70
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.

ServletHome.java


web.xml is:


please suggest.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2885
    
  13

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
My Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Why would the JSP need to be mapped?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yushi Zhang
Greenhorn

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


Try again
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2885
    
  13

"Blues Jj", please check your private messages regarding an important administrative matter.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error 404 - Not found
 
Similar Threads
issue with web.xml
jsp:include a servlet and the servlet forwards to a jsp file
Weblogic deployment problem
Unable to Run Servlet
Upload Image to database through Servlet