Note that there are some explanatory texts on larger screens.

plurals
  1. POI cannot deploy a basic html file in apache tomcat
    primarykey
    data
    text
    <p>I am making a small website as my first project. I have finalized to use Java Servlets and JSP for my Server-side scripting. I am learning it from O'Reilly's HeadFirst Servlets and JSP. I decided to use Apache-Tomcat as my web server and container. I downloaded it. I even have jdk 1.6 update 21. I unzipped apache in C: It is running successfully as i get the default Tomcat home page when I type <a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a> in my browser.</p> <p>In chapter 3 there is a small project called beer. So I tried to make it. I created a directory called beer under webapps <code>C:\apache-tomcat-7.0.0\webapps\beer</code>. Inside it to just check the basics I created a html file called <code>form.html</code>. But when I try to access it via the browser <code>http://localhost:8080/beer/form.html</code> I get the following error:</p> <blockquote> <p>HTTP Status 404 - /beer/form.html</p> <p>type Status report</p> <p>message /beer/form.html</p> <p>description The requested resource (/beer/form.html) is not available.</p> <p>Apache Tomcat/7.0.0</p> </blockquote> <p>I have even tried using tomcat 6, but to no use.</p> <hr> <p>Thank you for replying... Actually my doubt is..that here i am trying to access a .html file which is not a servlet so does it even require a Deployment description????</p> <p>well, there is only 1 servlet i planned to make (initially)....the one which is mentioned in the form (action= "....") in the html file i made.... so i thought of checking the basic html file before i deployed a servlet....btw...if i have to include the html file also in the DD, then what should i write in place of ServletName in the xml code u gave? here are the contents of my web.xml (i modified it as u said...but dunno what to write in the Servlet Name)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;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"&gt; &lt;servlet&gt; &lt;servlet-name&gt;html page&lt;/servlet-name&gt; &lt;servlet-class&gt;form&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;html page&lt;/servlet-name&gt; &lt;url-pattern&gt;/beer/form.html&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet&gt; &lt;servlet-name&gt;Ch3 Beer&lt;/servlet-name&gt; &lt;servlet-class&gt;com.example.web.BeerSelect&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Ch3 Beer&lt;/servlet-name&gt; &lt;url-pattern&gt;/SelectBeer.do&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;/web-app&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload