This is my first run with Servlets and my problem is such, The name of my webapp is Config-v1 and here below is the form.html (Only included essential part):-
<form class="form-horizontal" method="POST" action="GivePaths">...</form>
Now when i run this webapp in Tomcat using http://localhost:8080/Config-v1/form.html
it works fine and displays the form correctly, after that the next step i did was create a WEB-INF folder within my Config-v1 and put in web.xml which is as follows:-
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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/web-app_2_4.xsd”
version=”2.4”>
<servlet>
<servlet-name>bad</servlet-name>
<servlet-class>com.obp.web.PathSelect</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>bad</servlet-name>
<url-pattern>/GivePaths</url-pattern>
</servlet-mapping>
</web-app>
Now when i try http://localhost:8080/Config-v1/form.html
it gives me an error:
404: The requested resource is not available.
I read around SO that there must be some problem with my xml file and i tried various different urls but for the life of me I can't figure it out. Help would be much appreciated!
The log is such:
127.0.0.1 - - [18/Jun/2014:10:01:12 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:01:25 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5326
127.0.0.1 - - [18/Jun/2014:10:01:26 +0530] "GET /Config-v1/cssjs/bootstrap.css HTTP/1.1" 200 125569
127.0.0.1 - - [18/Jun/2014:10:01:26 +0530] "GET /Config-v1/cssjs/bootswatch.min.css HTTP/1.1" 200 2712
127.0.0.1 - - [18/Jun/2014:10:01:26 +0530] "GET /Config-v1/cssjs/bootstrap.min.js HTTP/1.1" 200 29110
127.0.0.1 - - [18/Jun/2014:10:09:46 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:10:16 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:10:16 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:10:21 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:10:35 +0530] "GET /Config-v1/ HTTP/1.1" 404 967
127.0.0.1 - - [18/Jun/2014:10:10:43 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:11:16 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:11:35 +0530] "GET /Config-v1 HTTP/1.1" 404 965
127.0.0.1 - - [18/Jun/2014:10:12:26 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:12:27 +0530] "GET /favicon.ico HTTP/1.1" 200 21630
127.0.0.1 - - [18/Jun/2014:10:12:46 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:12:48 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:12:53 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:12:59 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5326
127.0.0.1 - - [18/Jun/2014:10:13:55 +0530] "GET /Config-v1/form.html HTTP/1.1" 304 -
127.0.0.1 - - [18/Jun/2014:10:14:32 +0530] "POST /Config-v1/GivePaths.do HTTP/1.1" 404 991
127.0.0.1 - - [18/Jun/2014:10:49:49 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:49:53 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:50:03 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:53:01 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:53:02 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:53:05 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:10:56:18 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:57:13 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:57:13 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:10:57:19 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5360
127.0.0.1 - - [18/Jun/2014:10:57:26 +0530] "POST /GivePaths HTTP/1.1" 404 969
127.0.0.1 - - [18/Jun/2014:10:58:15 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5368
127.0.0.1 - - [18/Jun/2014:10:58:18 +0530] "POST /Config-v1/GivePaths HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:58:42 +0530] "GET /Config-v1/form.html HTTP/1.1" 304 -
127.0.0.1 - - [18/Jun/2014:10:58:46 +0530] "POST /Config-v1/GivePaths HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:10:59:11 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5359
127.0.0.1 - - [18/Jun/2014:10:59:15 +0530] "POST /Config-v1/GivePaths HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:11:01:27 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:11:04:42 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:11:04:48 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:11:04:53 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:11:09:08 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:11:19:53 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:11:19:59 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:11:21:43 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:11:21:47 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:11:32:03 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:11:32:51 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5394
127.0.0.1 - - [18/Jun/2014:11:32:51 +0530] "GET /Config-v1/cssjs/bootstrap.css HTTP/1.1" 304 -
127.0.0.1 - - [18/Jun/2014:11:32:51 +0530] "GET /Config-v1/cssjs/bootswatch.min.css HTTP/1.1" 304 -
127.0.0.1 - - [18/Jun/2014:11:32:51 +0530] "GET /Config-v1/cssjs/bootstrap.min.js HTTP/1.1" 304 -
127.0.0.1 - - [18/Jun/2014:11:33:00 +0530] "POST /Config-v1/$%7BpageContext.request.contextPath%7D/GivePaths HTTP/1.1" 404 1063
127.0.0.1 - - [18/Jun/2014:11:33:23 +0530] "POST /Config-v1/$%7BpageContext.request.contextPath%7D/GivePaths HTTP/1.1" 404 1063
127.0.0.1 - - [18/Jun/2014:11:33:38 +0530] "POST /Config-v1/$%7BpageContext.request.contextPath%7D/GivePaths HTTP/1.1" 404 1063
127.0.0.1 - - [18/Jun/2014:11:34:05 +0530] "GET /Config-v1/ HTTP/1.1" 404 967
127.0.0.1 - - [18/Jun/2014:11:34:12 +0530] "POST /Config-v1/$%7BpageContext.request.contextPath%7D/GivePaths HTTP/1.1" 404 1063
127.0.0.1 - - [18/Jun/2014:11:37:41 +0530] "GET /Config-v1/form.html HTTP/1.1" 200 5347
127.0.0.1 - - [18/Jun/2014:11:37:47 +0530] "POST /Config-v1/GivePaths HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:11:41:00 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:11:42:44 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:11:42:48 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:11:54:47 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:12:07:28 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:12:07:30 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 949
127.0.0.1 - - [18/Jun/2014:12:09:53 +0530] "GET / HTTP/1.1" 200 11418
127.0.0.1 - - [18/Jun/2014:12:09:57 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985
127.0.0.1 - - [18/Jun/2014:12:10:00 +0530] "GET /Config-v1/form.html HTTP/1.1" 404 985