I can't turn the WAR into Tomcat.
Hello. Yesterday, I started dating the usual.
Java Servletsand container
Tomcat♪ I work in IntelliJ IDEA 15. What's the problem: I can't make a good project at Tomcat. Anyway, I have a class.
MyServlet(with a minimum shell)
web.xml(Servette), pom.xml (Mven Configuration File). In pom.xml, I pointed out that we'll be packed in WAR Archive.
It's my web.xml:
I'm getting WAR.
I'm changing my WAR-Nick in %TOMCAT_HOME%/webapps, starting startup.bat, localhost:8080/TestServlet/hello 404 from Tomcat. ♪ Starting from Wednesday. It's also nothing, still 404. If you move without WAR nicknames, it works, and it's beautiful. I think I wrote it down. I don't understand the problem.
Logs: localhost_access_log. 2015-12-08:
0:0:0:0:0:0:0:1 - - [08/Dec/2015:15:13:08 +0300] "GET /TestServlet/hello HTTP/1.1" 404 985
Dec 08, 2015 3:12:59 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Dec 08, 2015 3:12:59 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Dec 08, 2015 3:12:59 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@269372d7')
I'm not strong at this, but I'm learning, I may have missed a little bit.
P.S. - It doesn't work at the end anymore.
By default tomcat, the context is an equal name of war'nick. I mean, I don't have to knock.
localhost:8080/TestServlet-1.0/hello♪ In order to launch the IDE, you need to create a separate configuration. http://devcolibri.com/4249 Good guidance for starters. The only, it does not specify that the default is the root context (reassignment can be made in the contribution
deploymentI'll have to knock.
localhost:8080/hello♪ Plus, you're in.
web.xmlspecified the specification of the series 3.1.and tomcat version 7 supports only 3.0