java - HTML Displays when the web.xml isn't there but as soon as its added I get a 404 Error -
this first run servlets , problem such, name of webapp config-v1 , here below form.html (only included essential part):-
<form class="form-horizontal" method="post" action="givepaths">...</form>
now when run webapp in tomcat using http://localhost:8080/config-v1/form.html
works fine , displays form correctly, after next step did create web-inf folder within config-v1 , set in web.xml 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 seek http://localhost:8080/config-v1/form.html
gives me error:
404: requested resource not available.
i read around there must problem xml file , tried various different urls life of me can't figure out. help much appreciated!
the log 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
java xml tomcat servlets
No comments:
Post a Comment