This week's giveaway is in the Beginning Java forum.
We're giving away four copies of Bad Programming Practices 101 (e-book) and have Karl Beecher on-line!
See this thread for details.
Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error 404 - Not found  RSS feed

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 5941
882
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 and ninkuma
Marshal
Posts: 66727
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would the JSP need to be mapped?
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
# <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
Sheriff
Posts: 5941
882
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Blues Jj", please check your private messages regarding an important administrative matter.
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!