This is the first time i am using Tomcat and i wanted to see an html file by running http:localhost:8080/DirName/form.html.I have put form.html in both tomcat/webapps folder and also in D:/dirname/web/. But its giving a file not found exception.What else i need to do?
Thanks, Anila.
chsanthosh kumar
Ranch Hand
Joined: Jun 28, 2005
Posts: 56
posted
0
Hi,
This is the first time i am using Tomcat and i wanted to see an html file by running http:localhost:8080/DirName/form.html.I have put form.html in both tomcat/webapps folder and also in D:/dirname/web/. But its giving a file not found exception.What else i need to do?
Thanks, Anila.
Hi Anila ,
U can place those html files in under webapps/jsp-examples folder.
And u can access from them.
http:localhost:8080/jsp-examples/form.html
Like this.
thanks. Regards. Santhosh.Ch
---------------------<br />SCJP(1.4)With 95%<br /> <br />Do it Right and Forget it!
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35249
7
posted
0
The right place would be tomcat/webapps/DirName/form.html.
I have placed the form.html in the directory structure you have specified.I have a WEB_INF directory also, but it has an empty web.xml file.Do i need to specify anything in the web.xml to access only the form.html.
No but your spelling of WEB-INF incorrectly (you're using an underscore).
Ramaswamy Srinivasan
Ranch Hand
Joined: Aug 31, 2004
Posts: 295
posted
0
Hi,
Place the html file under Tomcat's WebApps folder directly and try calling it from web browser using the following URL, http:localhost:8080/form.html
-------
If you want to call the file with the following URL http:localhost:8080/DirName/form.html you have to create a Web project with J2EE specified web application structure , read "Web application structure and deployment for J2EE applications" for more info.
Regards Sanjiv
Ray Stojonic
Ranch Hand
Joined: Aug 08, 2003
Posts: 326
posted
0
Originally posted by Ramaswamy Srinivasan: Place the html file under Tomcat's WebApps folder directly and try calling it from web browser using the following URL, http:localhost:8080/form.html
Not quite. Even the server root path is a context. It is contained in, no surprise, webapps/ROOT.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.