Re: Tomcat gives 404 for file that exists

2019-02-05 Thread Joel Griffith
On Tue, Feb 5, 2019 at 9:49 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Joel,
>
> On 2/5/19 08:56, Joel Griffith wrote:
> > On Mon, Feb 4, 2019 at 4:50 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Joel,
> >
> > On 2/4/19 16:35, Joel Griffith wrote:
>  I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle
>  VirtualBox) and I'm using it to access a webapp through the
>  laptop the VM is local to. The VM port-forwards 3081 to 8080,
>  so I can access Tomcat as ` http://127.0.0.1:3081/`
> 
>   in
> > my laptop browser.
> >
> > Are you sure it's going to the Tomcat you think it's going to?
> >
> > I'm not at all certain.  I didn't even know there was more than
> > one.  How can I tell?
>
> I was thinking that maybe you had either more than one Tomcat running
> or that your port-forwarding wasn't working the way you thought it was.
>
> >> Accessing `http://127.0.0.1:3081/`  <
> http://127.0.0.1:3081/> gives
> >> the default page stored in
> >> `/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able
> >> to find and serve from the `webapps/` directory.
> >>
> >> However, if I try to access
> >> `http://127.0.0.1:3081/myWebapp/index.html`
> , which exists as
> >> `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat returns a
> >> 404, reporting that the requested resource in unavailable.
> >>
> >> `/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and
> >> is identical to that used in a functioning setup on a different
> >> server.
> >>
> >> What am I missing?  Why can Tomcat find
> >> `webapps/ROOT/index.html` but not `webapps/myWebapp/index.html`?
> >
> > Do you have an AccessLogVave enabled for the server? Is it showing
> > your requests and the 404 response when you make a request?
> >
> >
> >> Yes, and yes.
>
> Okay, that's (sort of) good. It means that your request is going to
> the right place.
>
> If you delete your log files and start Tomcat cleanly, what does
> catalina.out say about which applications were started? You should
> have some log entries that look like this:
>
> INFO: Deploying web application directory [/path/to/your/webappp]
> ...
> INFO: Deployment of web application directory [/path/to/your/webapp]
> has finished in [6,417] ms
>
> That's the ticket.  The webapp wasn't deploying because I was missing a
class required by the webapp's web.xml.  I'll get that fixed.  Thanks for
your help!

>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxZon8ACgkQHPApP6U8
> pFho+Q//XYLSHMBzQKSWR4luiMXRaml5ahpWUqcgUa8h/753Aeeiks2Dgr0KcXgB
> dwCWxN/9VE1s+MHzKPWcvoaX2pWHW3ceABw8EzpftMQqrl6pMT9cfqY29d8B0Sbz
> mKyaIrV1qJrnG5bb+G89a8DhCyTroRF5BOXvkKQCiHIJhQ4Q6lihRa/HEYWFLA4l
> cKdfaTjSTfBtkJLfDaQ8+BlDRSY+lfk6joi0P3BOqkNn+kEgM6uTDBadN2NwsBP8
> C7rOK8+Fk2t938it9yPdi3lJ67NUCFbjb8HCYyt36UPuurPZV0ZVf4UdOqYmdPWF
> U+0fqh8XFIH+HLnLS85c+y0BSZ+MukjdkVqRGgiVGhF53icTtv6K1SVOUdI5jw8x
> LdOdn3s7QFCTV2Of3er3Vw/s4NcZRchKZhttd1KnEjAH3Op+IHo88YAGk+3R6bAg
> kCCDHXHs378o7SqVRqW10cujkUN4dAWfkt3/agS+VoRH92VtXFy/zOS++UlD+eBm
> 4tglZSwwhqkEs2tYA+ZDXe1A9e+op4dZ7y48yGo91dDo4E0uRnqrVWDNoROE7a4i
> nyCT4C8NrtP1UUyt43fYcUtbiWlYf1pQcUsVuYOSDkGWNA3Ejj7F8hDaj0XuwB9E
> XLxpjgbZSuf5+ifC+lJat8tBqKBDw+vDBJyKYAs1XqLMIm7WgFw=
> =fay0
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat gives 404 for file that exists

2019-02-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Joel,

On 2/5/19 08:56, Joel Griffith wrote:
> On Mon, Feb 4, 2019 at 4:50 PM Christopher Schultz < 
> ch...@christopherschultz.net> wrote:
> 
> Joel,
> 
> On 2/4/19 16:35, Joel Griffith wrote:
 I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle 
 VirtualBox) and I'm using it to access a webapp through the
 laptop the VM is local to. The VM port-forwards 3081 to 8080,
 so I can access Tomcat as ` http://127.0.0.1:3081/`
  in
> my laptop browser.
> 
> Are you sure it's going to the Tomcat you think it's going to?
> 
> I'm not at all certain.  I didn't even know there was more than
> one.  How can I tell?

I was thinking that maybe you had either more than one Tomcat running
or that your port-forwarding wasn't working the way you thought it was.

>> Accessing `http://127.0.0.1:3081/`  gives
>> the default page stored in
>> `/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able 
>> to find and serve from the `webapps/` directory.
>> 
>> However, if I try to access 
>> `http://127.0.0.1:3081/myWebapp/index.html`, which exists as 
>> `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat returns a 
>> 404, reporting that the requested resource in unavailable.
>> 
>> `/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and
>> is identical to that used in a functioning setup on a different 
>> server.
>> 
>> What am I missing?  Why can Tomcat find
>> `webapps/ROOT/index.html` but not `webapps/myWebapp/index.html`?
> 
> Do you have an AccessLogVave enabled for the server? Is it showing 
> your requests and the 404 response when you make a request?
> 
> 
>> Yes, and yes.

Okay, that's (sort of) good. It means that your request is going to
the right place.

If you delete your log files and start Tomcat cleanly, what does
catalina.out say about which applications were started? You should
have some log entries that look like this:

INFO: Deploying web application directory [/path/to/your/webappp]
...
INFO: Deployment of web application directory [/path/to/your/webapp]
has finished in [6,417] ms


- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxZon8ACgkQHPApP6U8
pFho+Q//XYLSHMBzQKSWR4luiMXRaml5ahpWUqcgUa8h/753Aeeiks2Dgr0KcXgB
dwCWxN/9VE1s+MHzKPWcvoaX2pWHW3ceABw8EzpftMQqrl6pMT9cfqY29d8B0Sbz
mKyaIrV1qJrnG5bb+G89a8DhCyTroRF5BOXvkKQCiHIJhQ4Q6lihRa/HEYWFLA4l
cKdfaTjSTfBtkJLfDaQ8+BlDRSY+lfk6joi0P3BOqkNn+kEgM6uTDBadN2NwsBP8
C7rOK8+Fk2t938it9yPdi3lJ67NUCFbjb8HCYyt36UPuurPZV0ZVf4UdOqYmdPWF
U+0fqh8XFIH+HLnLS85c+y0BSZ+MukjdkVqRGgiVGhF53icTtv6K1SVOUdI5jw8x
LdOdn3s7QFCTV2Of3er3Vw/s4NcZRchKZhttd1KnEjAH3Op+IHo88YAGk+3R6bAg
kCCDHXHs378o7SqVRqW10cujkUN4dAWfkt3/agS+VoRH92VtXFy/zOS++UlD+eBm
4tglZSwwhqkEs2tYA+ZDXe1A9e+op4dZ7y48yGo91dDo4E0uRnqrVWDNoROE7a4i
nyCT4C8NrtP1UUyt43fYcUtbiWlYf1pQcUsVuYOSDkGWNA3Ejj7F8hDaj0XuwB9E
XLxpjgbZSuf5+ifC+lJat8tBqKBDw+vDBJyKYAs1XqLMIm7WgFw=
=fay0
-END PGP SIGNATURE-

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



Re: Tomcat gives 404 for file that exists

2019-02-05 Thread Joel Griffith
On Mon, Feb 4, 2019 at 4:50 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Joel,
>
> On 2/4/19 16:35, Joel Griffith wrote:
> > I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle
> > VirtualBox) and I'm using it to access a webapp through the laptop
> > the VM is local to. The VM port-forwards 3081 to 8080, so I can
> > access Tomcat as ` http://127.0.0.1:3081/`  in
> my laptop browser.
>
> Are you sure it's going to the Tomcat you think it's going to?
>
> I'm not at all certain.  I didn't even know there was more than one.  How
can I tell?

> Accessing `http://127.0.0.1:3081/`  gives the
> default page stored
> > in `/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able
> > to find and serve from the `webapps/` directory.
> >
> > However, if I try to access
> > `http://127.0.0.1:3081/myWebapp/index.html`
> , which exists as
> > `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat returns a
> > 404, reporting that the requested resource in unavailable.
> >
> > `/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and is
> > identical to that used in a functioning setup on a different
> > server.  It was originally written for a Tomcat 7 deployment, I
> > think, but there's nothing in it that seems to have anything to do
> > with these URLs, so I don't think it's a problem with that file.
> > Similarly, `/var/lib/tomcat8/conf/server.xml` exists and is
> > virtually identical to that used in the other (functioning)
> > deployment.
> >
> > All of the information I've been able to scrape together from web
> > searches over the past two days indicate that the presence of a
> > folder within the `webapps/` directory is sufficient for Tomcat to
> > recognize and register it as a Context.  I'm at a complete loss for
> > what else I need to do to have Tomcat serve the file
> > `webapps/myWebapp/index.html`
> >
> > What am I missing?  Why can Tomcat find `webapps/ROOT/index.html`
> > but not `webapps/myWebapp/index.html`?
>
> Do you have an AccessLogVave enabled for the server? Is it showing
> your requests and the 404 response when you make a request?
>

Yes, and yes.


> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxYs5gACgkQHPApP6U8
> pFgDGQ//VQnrKG77d+ciLUx5hgapoTR73DEHIIXD1vrbkPR9XLydjRcgnbTXFWzf
> xIH2rB2hROWAsA0T/GjaG87EfqFehlGmqa5isFNLqoah6Ss3wCvjvquwtdS+1OPX
> 0wxl2uqxgDmFVpMAOgmYGmp3HLi87nP/8h5Rn/Ef/Iqg3Z4CTKjvcUUhKRf3Lupw
> CYoPe3AFUOXTG40EKBDqzJ8IW2+Mt0rNfkU3T5v4BUtrKKc3ARof5CygVvgVS+5Q
> qpjH/p+hskvXWWuAz9is6+qAgu7WPyoV7KhOq93M9yQQ/bR7fNMfjVYg9q6z+UKO
> m6bNf+eQCtXfaHnDJp5Bytied0nUlCfBbHP6tvvNNl9B2jdaV4nT+9ZQIykOXN4E
> p64PvpHk8V2v/6GIlJ04E1LNiMwNycu3l24DnSn27sVxD6JKIMoTlyf4dvPK+zsw
> Jp8Bguiqog6geBpo+CNU1vzToWpiGHP/8rSwh9pbX7xpyTfWgq3bnvJmzNaVYJQ5
> ggPCRiMRFgPurIr5edvvlyaGp8gfeFtb1FgCTKNTg2J9j8yxVI2p30lT8L+I+Rxp
> Tpapvum6q1/NAtKigCuq7ylXpN3XQnOmJq7fb1a7+lYwzA0NQ3IC8uooSys4GNBb
> ijeTnYsCTJqXNZ9k5BiCkUgMEr5yo4qiAtmppTbelGoNsWno+Jc=
> =VZa6
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat gives 404 for file that exists

2019-02-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Joel,

On 2/4/19 16:35, Joel Griffith wrote:
> I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle
> VirtualBox) and I'm using it to access a webapp through the laptop
> the VM is local to. The VM port-forwards 3081 to 8080, so I can
> access Tomcat as ` http://127.0.0.1:3081/` in my laptop browser.

Are you sure it's going to the Tomcat you think it's going to?

> Accessing `http://127.0.0.1:3081/` gives the default page stored
> in `/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able
> to find and serve from the `webapps/` directory.
> 
> However, if I try to access
> `http://127.0.0.1:3081/myWebapp/index.html`, which exists as
> `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat returns a
> 404, reporting that the requested resource in unavailable.
> 
> `/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and is
> identical to that used in a functioning setup on a different
> server.  It was originally written for a Tomcat 7 deployment, I
> think, but there's nothing in it that seems to have anything to do
> with these URLs, so I don't think it's a problem with that file.
> Similarly, `/var/lib/tomcat8/conf/server.xml` exists and is
> virtually identical to that used in the other (functioning)
> deployment.
> 
> All of the information I've been able to scrape together from web
> searches over the past two days indicate that the presence of a
> folder within the `webapps/` directory is sufficient for Tomcat to
> recognize and register it as a Context.  I'm at a complete loss for
> what else I need to do to have Tomcat serve the file
> `webapps/myWebapp/index.html`
> 
> What am I missing?  Why can Tomcat find `webapps/ROOT/index.html`
> but not `webapps/myWebapp/index.html`?

Do you have an AccessLogVave enabled for the server? Is it showing
your requests and the 404 response when you make a request?

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxYs5gACgkQHPApP6U8
pFgDGQ//VQnrKG77d+ciLUx5hgapoTR73DEHIIXD1vrbkPR9XLydjRcgnbTXFWzf
xIH2rB2hROWAsA0T/GjaG87EfqFehlGmqa5isFNLqoah6Ss3wCvjvquwtdS+1OPX
0wxl2uqxgDmFVpMAOgmYGmp3HLi87nP/8h5Rn/Ef/Iqg3Z4CTKjvcUUhKRf3Lupw
CYoPe3AFUOXTG40EKBDqzJ8IW2+Mt0rNfkU3T5v4BUtrKKc3ARof5CygVvgVS+5Q
qpjH/p+hskvXWWuAz9is6+qAgu7WPyoV7KhOq93M9yQQ/bR7fNMfjVYg9q6z+UKO
m6bNf+eQCtXfaHnDJp5Bytied0nUlCfBbHP6tvvNNl9B2jdaV4nT+9ZQIykOXN4E
p64PvpHk8V2v/6GIlJ04E1LNiMwNycu3l24DnSn27sVxD6JKIMoTlyf4dvPK+zsw
Jp8Bguiqog6geBpo+CNU1vzToWpiGHP/8rSwh9pbX7xpyTfWgq3bnvJmzNaVYJQ5
ggPCRiMRFgPurIr5edvvlyaGp8gfeFtb1FgCTKNTg2J9j8yxVI2p30lT8L+I+Rxp
Tpapvum6q1/NAtKigCuq7ylXpN3XQnOmJq7fb1a7+lYwzA0NQ3IC8uooSys4GNBb
ijeTnYsCTJqXNZ9k5BiCkUgMEr5yo4qiAtmppTbelGoNsWno+Jc=
=VZa6
-END PGP SIGNATURE-

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



Tomcat gives 404 for file that exists

2019-02-04 Thread Joel Griffith
I've installed Tomcat 8.0.32 a local Ubuntu 16.04 VM (Oracle VirtualBox)
and I'm using it to access a webapp through the laptop the VM is local to.
The VM port-forwards 3081 to 8080, so I can access Tomcat as `
http://127.0.0.1:3081/` in my laptop browser.

Accessing `http://127.0.0.1:3081/` gives the default page stored in
`/var/lib/tomcat8/webapps/ROOT/index.html`.  So, Tomcat is able to find and
serve from the `webapps/` directory.

However, if I try to access `http://127.0.0.1:3081/myWebapp/index.html`,
which exists as `/var/lib/tomcat8/webapps/myWebapp/index.html`, Tomcat
returns a 404, reporting that the requested resource in unavailable.

`/var/lib/tomcat8/webapps/myWebapp/WEB-INF/web.xml` exists and is identical
to that used in a functioning setup on a different server.  It was
originally written for a Tomcat 7 deployment, I think, but there's nothing
in it that seems to have anything to do with these URLs, so I don't think
it's a problem with that file.  Similarly,
`/var/lib/tomcat8/conf/server.xml` exists and is virtually identical to
that used in the other (functioning) deployment.

All of the information I've been able to scrape together from web searches
over the past two days indicate that the presence of a folder within the
`webapps/` directory is sufficient for Tomcat to recognize and register it
as a Context.  I'm at a complete loss for what else I need to do to have
Tomcat serve the file `webapps/myWebapp/index.html`

What am I missing?  Why can Tomcat find `webapps/ROOT/index.html` but not
`webapps/myWebapp/index.html`?

Thanks