You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bhagyashri Pawar <aj...@gmail.com> on 2011/04/11 07:33:35 UTC

tomcat shows 404 error for existing pages

Dear all members


Currently I have purchase one domain name and virtual dedicated server(Linux
- Red hat fedora). I am using java and tomcat 5.5 on that server.

The problem I am facing is tomcat shows 404 error (description: The
requested resource (/mytestpage.jsp) is not available.).

Is there any settings I require to view css and all jsp and html pages,
Because when I installed tomcat it shows prper installetion and display
tomcat default page properly.

:confused:


My directory structure is like


Tomcat-5.5/webapps/ROOT/WEB-INF

Tomcat-5.5/webapps/ROOT/extra/css

Tomcat-5.5/webapps/ROOT/extra/images

Tomcat-5.5/webapps/ROOT/extra/js



My all JSP and html pages are inside ROOT directory

My css, images, js are inside extra/css, extra/images and extra/js directory
resp.


my web.xml file is inside WEB-INF directory.


Actually  extra  is a one of the directory where I put my all files which I
am using in JSP and html pages.

e.g.



Also here I try both href="/extra/css/style.css" and
href="extra/css/style.css"


And about other jsp pages like mytestpage.jsp, which I put inside ROOT
directory directly. 

-- 
View this message in context: http://old.nabble.com/tomcat-shows-404-error-for-existing-pages-tp31367435p31367435.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

Re: tomcat shows 404 error for existing pages

Posted by Thomas Freitag <th...@freit.ag>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bhagyashri,

On 04/11/2011 07:33 AM, Bhagyashri Pawar wrote:
> Currently I have purchase one domain name and virtual dedicated server(Linux
> - Red hat fedora). I am using java and tomcat 5.5 on that server.

Consider upgrading to 6.0.32 or 7.0.12, because these versions will be
support much longer by the committers! Don't use the versions shipped by
(any) Linux distributor, a tomcat installation is quite simple and you
won'nt end up with a messed directory structure.

> The problem I am facing is tomcat shows 404 error (description: The
> requested resource (/mytestpage.jsp) is not available.).
> 
> Is there any settings I require to view css and all jsp and html pages,
> Because when I installed tomcat it shows prper installetion and display
> tomcat default page properly.

If you can see the the default ROOT application after installing your
basic setup is ok. Enable the access log (see the example AccessLogValve
configuration in the default server.xml). Are there any errors in the
logs? Filenames are case sensitive, double check the spelling.

> My directory structure is like
> Tomcat-5.5/webapps/ROOT/WEB-INF
> Tomcat-5.5/webapps/ROOT/extra/css
> Tomcat-5.5/webapps/ROOT/extra/images
> Tomcat-5.5/webapps/ROOT/extra/js
> 
> 
> 
> My all JSP and html pages are inside ROOT directory
> 
> My css, images, js are inside extra/css, extra/images and extra/js directory
> resp.

That looks fine. Post your server.xml and check wether appBase is
correctly set.

Regards,
- -- 
Thomas Freitag
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk2jbBIACgkQGE5pHr3PKuVcnwCeIQAH1vu1sKvzS5cBPEdxaNhT
eRUAnisPIKI/xfpz1iFSvc4ghQVXIYoo
=RiP4
-----END PGP SIGNATURE-----

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