You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tomas Rodriguez <ad...@yahoo.ca> on 2009/03/23 08:07:28 UTC

error with tomcat HTTP Status 404 The requested resource() is not available

Ok thanks a lot Charles, jus I followed your advise, I created all 
directory(WEB-INF
/lib, web-inf/classes) under my folder d:/examplestomcat, and I created too 
the file tomas.xml at the directory 
c:\tomcay6.0\conf\Catalina\localhost\tomas.xml
 with the <Context docBase="d:/examplestomcat">, I executed the IE and the 
via URL I wrote http://127.0.0.1:8080/tomas, but at the end I can see 
anything, just show me an error.

the error is:

HTTP Status 404 - /tomas/

--------------------------------------------------------------------------------

type Status report

message /tomas/

description The requested resource (/tomas/) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.18
--------------------------------------------------


I reboot the tomcat services, but I can't get any good result, well I don't 
know what should I do with the web.xml. I just copied the orginal web.xml 
from tomcat directory to d:/examplestomcat/web.xml, I didn't change anything 
in this file.
and I copied as well the mysql/J connect from tomcat/lib to my 
d:/examplestomcat/WEB-INF\lib
I sorry for bother you, but I need to finish with this configuration.
thanks so much
have a great day
sincerely
TOMAS


From: "Caldarale, Charles R" <Ch...@unisys.com>
Sent: Saturday, March 21, 2009 5:49 PM
To: "Tomcat Users List" <us...@tomcat.apache.org>
Subject: RE: mysql + tomcat work already but I need to reconfigurate the 
tomcat for load the examples in other location of the hard driver

>> From: Tomas Rodriguez [mailto:admhardsoft@yahoo.ca]
>> Subject: Re: mysql + tomcat work already but I need to
>> reconfigurate the tomcat for load the examples in other
>> location of the hard driver
>>
>> please tell me how can I create the server.xml and
>> build.xml
>
> You're on your own for the build.xml; setting that up depends entirely on 
> the organization of your source files.
>
>> I will need to create a file named
>> conf/Catalina/[host]/[appName].xml containing a
>> <Context> element with a docBase attribute whose
>> value is the absolute location of the webapp.
>
> Correct.  Unless you are supporting multiple web sites, the existing 
> <Host> will do; you don't have to create another one, so you shouldn't 
> have to add anything to server.xml.  You appear to have decided to place 
> your own examples in the D:\examplestomcat directory, so that's what your 
> docBase attribute will point to.  The only missing piece of information is 
> the URL name used to access your webapp; for brevity, we'll use the name 
> tomas, but you're of course free to use anything you want.
>
> 1) no changes are needed to server.xml
>
> 2) create the file C:\tomcat6.0\conf\Catalina\localhost\tomas.xml
>
> 3) the contents of the above file are just:
> <Context docBase="D:/examplestomcat" />
>
> 4) under D:\examplestomcat, you should have:
> WEB-INF\web.xml - contains your servlet mappings
> WEB-INF\lib - contains jar files (if any) for your webapp
> WEB-INF\classes - contains individual class files (if any) for your webapp
> index.html - the home page of your webapp.
>
> You would access the above via the URL http://127.0.0.1:8080/tomas, 
> assuming your browser is on the same machine that Tomcat is running on and 
> you're using the default server.xml.
>
> You can, of course, vary #4 considerably to meet your needs, as long as 
> you stick with the structure required by the servlet spec.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you 
> received this in error, please contact the sender and delete the e-mail 
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: error with tomcat HTTP Status 404 The requested resource() is not available

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tomas Rodriguez [mailto:admhardsoft@yahoo.ca] 
> Subject: error with tomcat HTTP Status 404 The requested 
> resource() is not available
> 
> c:\tomcay6.0\conf\Catalina\localhost\tomas.xml

I hope that was tomcat6.0, not tomcay6.0.

> <Context docBase="d:/examplestomcat">

You're missing the closing slash; the above should be:
<Context docBase="d:/examplestomcat"/>

> I wrote http://127.0.0.1:8080/tomas, but at the end I can see 
> anything, just show me an error.
> 
> the error is:
> 
> HTTP Status 404 - /tomas/

Did you put a welcome file in D:\examplestomcat?  If not, you should get a 404.

> The requested resource (/tomas/) is not available.

What's in the Tomcat logs?  Did you get any errors trying to deploy the webapp?

> I don't know what should I do with the web.xml.

Read the servlet spec, and build a web.xml appropriate for your webapp.

> I just copied the orginal web.xml from tomcat directory 

What Tomcat directory?  There are numerous web.xml files distributed with Tomcat.  Regardless, copying any existing web.xml is almost always wrong.

> to d:/examplestomcat/web.xml

That's not where web.xml belongs, even if you had an appropriate one.  Read the servlet spec.  Also read this:
http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org