0

My webapps contains ROOT folder and ROOT war only, as i have deleted everything from webapps and rename my custom war name to ROOT.war.

Tomcat Version : apache-tomcat-10.0.2

Java Version : 8

\webapps\ROOT\WEB-INF\web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
    <listener>
        <listener-class>acl.listeners.VerifiedSMSContextListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>hello</servlet-name>
        <servlet-class>core.PrintHello</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>hello</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>


    <security-constraint>
        <web-resource-collection>
            <web-resource-name>restricted methods</web-resource-name>
            <url-pattern>/*</url-pattern>
            <http-method>PUT</http-method>
            <http-method>DELETE</http-method>
            <http-method>OPTIONS</http-method>
            <http-method>TRACE</http-method>
            <http-method>HEAD</http-method>
            <http-method>PATCH</http-method>
        </web-resource-collection>
        <auth-constraint/>
    </security-constraint>
</web-app>

if I hit http://localhost:8080/hello it is giving below error, not sure why?

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Diwakar Bhatt
  • 495
  • 2
  • 11
  • 24

1 Answers1

0

I have downgraded my tomcat version to 8.5 and it worked for me.

Diwakar Bhatt
  • 495
  • 2
  • 11
  • 24