http status 404 hello.jsp (apache tomcat 6)

ryuuuuuusei

im new to using apache and spring framework and i've been using this tutorial for learning: http://docs.spring.io/docs/Spring-MVC-step-by-step/part1.html i made an .jsp file however my browser tells me "The requested resource is not available."

the .jsp file is pretty simple

<html>
  <head><title>Hello :: Spring Application</title></head>
  <body>
    <h1>Hello - Spring Application</h1>
    <p>Greetings.</p>
  </body>
</html>

entering http://localhost:8080/project/hello.htm gives me a 404. my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >

  <servlet>
    <servlet-name>project</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>project</servlet-name>
    <url-pattern>*.htm</url-pattern>
  </servlet-mapping>       

  <welcome-file-list>
    <welcome-file>
      index.jsp
    </welcome-file>
  </welcome-file-list>

</web-app>

any idea how to fix this?

Dominic Philip

404 error means the requested resource is not in the server. Your problem can be either

1. Not properly matching hello.htm to any controller

bean id="/hello.htm" class="foo.controller" or

2. You have to put your hello.jsp in webcontent folder, along with index.jsp. Not in WEB-INF folder. Refer tutorial.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

HTTP Status 404 Tomcat Apache

Apache Tomcat 9 - HTTP Status 404 on browser

HTTP Status 404 - /SpringMvcDemo/hello

Apache Tomcat 8 not working. Throws HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

JSP/JDBC: HTTP Status 404 - Not Found

HTTP Status 404 - Not Found - Servlet and JSP

Eclipse & Tomcat Error: HTTP Status 404 – Not Found:

tomcat changes 404 status into 403 for http delete

Http Status 404 after installing Tomcat 9

HTTP Status 404 – Not Found tomcat spring

HTTP Status 404 – Not Found on Tomcat server

HTTP Status 404 - /com.demo/rest/hello - with Rest project

Insertion of image in mysql using jsp HTTP Status 404 not found

HTTP Status 500 – Internal Server Error-JSP-Tomcat server

Tomcat 8 Http status 404 The requested resource is not available

How to redirect "HTTP Status 404 – Not Found" to an error information page in tomcat?

HTTP Status 404 - on Eclipse with Tomcat (with no generated web.xml)

HTTP status 404 not found after requesting http://localhost:4080/testAPI/rest/hello

HTTP Status 404 - /LoginAuth

HTTP Status 404 -

Getting HTTP Status 404 - / error message when hitting URL http://localhost:8080/ in Tomcat?

Redirection error in spring MVC (http status 404 the requested resource is not available jsp )

Spring MVC @Autowired and @ModelAttribute HTTP Status 404 - /WEB-INF/circle.jsp

Apache: forcing a 404 status code

How can I ignore the error of HTTP Status 404 in Tomcat v7.0?

JAX-RS Rest service giving "HTTP Status 404 – Not Found" error tomcat while accessing in docker

Tomcat started but the database tables aren't being created and localhost:8080 shows "HTTP Status 404"

jsp servlet Etat HTTP 404

Tomcat JSP/JSTL without HTTP

TOP Ranking

HotTag

Archive