aspose file tools*
The moose likes Tomcat and the fly likes Can't run JSP/HTML files in Tomcat 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 "Can Watch "Can New topic
Author

Can't run JSP/HTML files in Tomcat

Mark Henryson
Ranch Hand

Joined: Jul 11, 2005
Posts: 200
Hi,

I am start learning JSP and Servlet with the help of Head First JSP & Servlets. For running JSP and Servlets, the book given some sample codings.

Before that I will tell my enviornment in which I try to work.




Problem
--------
I kept my "form.html" file in c:\tomcat\webapps\Beer-v1\form.html.
I started the Tomcat and the index page is displaying. I also tried some JSP examples and it is working.
But when I had tried to run the form.html(http://localhost:8080/Beer-v1/form.html), but it gives the following error message.

Niyas Ahmed Sheikh
Ranch Hand

Joined: Jun 15, 2005
Posts: 129
Hey,

I tried by placing the the form.html at the JSP-examples folder.
(http://localhost:8080/examples/jsp/dates/form.html)It's Working.
Then I placed the form.html file at http://localhost:8080/examples/jsp/form.html. That's also working.
Then I placed the form.html file at
http://localhost:8080/examples/form.html. That's also working.

Then I placed the form.html file at the root
http://localhost:8080/form.html. IT'S NOT WORKING!!!


From the above thing, whether anyone tell what's the problem for the form.html file is not running while it is placed eithrt at root
http://localhost:8080/form.html and
http://localhost:8080/Beer-v1/form.html

Since I am following Head First JSP and Servlets book, I want to place the file where they intend to place. After two to three pgms, we can try to place the file o our convenience.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
The directory needs to contain a WEB-INF subdirectory, or Tomcat will not recognize it as a web application.


Ping & DNS - updated with new look and Ping home screen widget
Niyas Ahmed Sheikh
Ranch Hand

Joined: Jun 15, 2005
Posts: 129
Hi,

I am using Head first JSP & Servlets. In the book they clearly given what re the folders to be created for deployment and development. The following folders WEB-INF,classes,lib,etc and src I have created for deployment and development.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't run JSP/HTML files in Tomcat
 
Similar Threads
tomcat cant find my form.html?
Head First Servlet JSP: BeerSelect example: requested resource not available
Servlet in Package Issue
Help with Beer-v1 web application from Head First Servlets and JSP
Requested resource() not found