aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Regarding tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Regarding tomcat" Watch "Regarding tomcat" New topic
Author

Regarding tomcat

babu sharath
Ranch Hand

Joined: Jul 06, 2006
Posts: 42
Hi ,
I am using tomcat as webserver . Iam new to serveltes .
I have following questions .

1. In tomcat directory i created deployement directory structure. Then I added one html file. In browser I typed http://localhost:8080/sample/form.html
. And form is appearing in the browser .
Later I added xml file ( as mentioned in HFSJ). Then I typed above same url.
but it is giving following error .
message /sample/form.html
description The requested resource (/sample/form.html) is not available.
Than I added all files ( java class files ) ,than also same error is coming.
My dobut is error in any file ( xml ) will cause the above error .

2. When I change any file ( like java ,xml ) do I need to restart the
tomcat ?

Reghards,
Sharath
Martyn Clark
Ranch Hand

Joined: Apr 16, 2005
Posts: 108
Hi,
You may want to check you web.xml file to make sure you have no typo's in it if there is any the app will not load. Also it is a good idea to restart tomcat if you change the web.xml file or reload the app, because this is what it reads when first loading your application. Are you getting 404 error or 500? If your still having problems post you web.xml code and some one can check it.


Martyn...<br /> <br />SCJP 1.4 SCWCD 1.4
babu sharath
Ranch Hand

Joined: Jul 06, 2006
Posts: 42
error is 404 error
Martyn Clark
Ranch Hand

Joined: Apr 16, 2005
Posts: 108
Hi babu,
Have you checked to make sure the app is running int tomcat?
http://127.0.0.1:8080/manager/html
Just to make sure it is up and running.
babu sharath
Ranch Hand

Joined: Jul 06, 2006
Posts: 42
it is working fine ( /manager/html)
xml file i written is :
<web-app xmlns="http://java.sun.com/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> select </servlet-name>
<servlet-class>com.example.web.Status </servlet-class>
</servlet>

<servlet-mapping>
<servlet-name> select </servlet-name>
<url-pattern> /Selectname.do </url-pattern>
<servlet-mapping>

</web-app>
 
jQuery in Action, 2nd edition
 
subject: Regarding tomcat