aspose file tools*
The moose likes Tomcat and the fly likes Tomcat installation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat installation" Watch "Tomcat installation" New topic
Author

Tomcat installation

Anila Mathew
Ranch Hand

Joined: Jun 16, 2004
Posts: 69

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.
chsanthosh kumar
Ranch Hand

Joined: Jun 28, 2005
Posts: 56
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: 39547
    
  27
The right place would be tomcat/webapps/DirName/form.html.


Ping & DNS - updated with new look and Ping home screen widget
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Ulf Dittmer:
The right place would be tomcat/webapps/DirName/form.html.


Yes, and DirName needs to contain a folder named "WEB-INF" in order for Tomcat to see this directory as a web application.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Anila Mathew
Ranch Hand

Joined: Jun 16, 2004
Posts: 69

Hi Ulf, Ben,

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.

Thanks,
Anila
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

No but your spelling of WEB-INF incorrectly (you're using an underscore).
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
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
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://aspose.com/file-tools
 
subject: Tomcat installation
 
Similar Threads
How to Operate Safely
how to read file into applet in weblogic server
IO
How to get parent dir in shell
Head First Sample Code