Good afternoon,
I'm trying to run my first servlet on Tomcat, and am continually getting an
HTTP Status 404 (I've also gotten 500 previously, with the root cause being an
apparent compiler mismatch (it would say that it's being compiled by version
63.0, which is Java 19, but that the latest version that was currently accepted
was version 59.0, or Java 15), but then after upgrading to JDK 19, changing the
JAVA_HOME variable and trying to run, it would still give me the same error)?
I have my Servlet, called HelloWorldServlet, located in the
"C:\apache-tomcat-10.1.4\webapps\ROOT\WEB-INF\classes\" directory, with the
web.xml file being located outside of the classes folder, directly inside of
the WEB-INF folder.
I've included both files. StackOverflow wasn't much help as of yet, so I'm
hoping that the Tomcat Users community can help me solve this so that I can
continue learning servlets. I'm working on building my own software company.
Any help is appreciated.
Thank you very much,
Anthony Dell'Anno
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- Declare the XML version and encoding...open the document-->
<web-app> <!-- Declare a web-app document-->
<servlet> <!--Give the servlet's information-->
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>webapps.HelloMotherFuckerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name> <!--Provide the servlet name-->
<url-pattern>/HelloWorld</url-pattern> <!--Provide the servlet URL pattern-->
</servlet-mapping>
</web-app> <!-- Close the web-app document-->
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org