Tomcat Not Finding JSP File

eclipse, java, jsp, tomcat

Solution

From screenshot you try to access to `http://localhost:8080/Test.jsp`, but I guess the application is reacheable on `/Test` path; so you have to access with:

`http://localhost:8080/Test/Test.jsp`

You can see and change this base path name on Eclipse from Project properties on tab `Web Project Settings -> Context root`. Default value is project name.

Problem

I am learning Java EE, so I started with JSP. I set up my eEclipse environment, and got a simple project running. When I attempt to run the project Tomcat cannot find my JSP file. I put my JSP file under the `WebContent` folder, but Tomcat still cannot find it. I don't understand why it won't work. Do I place my files somewhere else? I left my `web.xml` at default: ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>Test</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app> ```

Original source